import { CheckCircleOutlined, ExclamationCircleOutlined } from '@ant-design/icons' import { Alert, Button, Card, Typography } from 'antd' import { formatAdminDateTime } from '@/utils/admin-time' import type { ClaimAffiliateDashFlowInfo } from '@/types/claim' import type { ClaimSnapshot } from './claim-snapshot' import { ClaimProductItems, InfoTile, UidEditRow } from './claim-shared' export function AffiliateDashClaimPanel({ affiliateDash, expectedUid, taskLastError, qrCodeDataUrl, submittingUid, submittingSubmit, uidInput, onUidChange, onResubmitUid, onSubmit, }: { affiliateDash: ClaimAffiliateDashFlowInfo expectedUid: string taskLastError?: string qrCodeDataUrl: string submittingUid: boolean submittingSubmit: boolean uidInput: string onUidChange: (value: string) => void onResubmitUid: () => void onSubmit: () => void }) { const bound = Boolean(affiliateDash.bound) const bindMismatch = Boolean(affiliateDash.bindMismatch) return (
{bound ? '第 3 步:确认并提交发货' : '第 2 步:绑定领取账号'}

{bound ? '账号绑定成功,确认无误后提交发货' : '打开绑定链接完成绑定,系统将自动确认'}

{taskLastError ? ( ) : null} {bindMismatch ? ( ) : null} {bound ? ( } message={`已绑定账号:${affiliateDash.boundAccount || affiliateDash.gameAccount || '-'}`} description={affiliateDash.gameChannel ? `渠道:${affiliateDash.gameChannel}` : undefined} style={{ marginBottom: 16 }} /> ) : null} {!bound ? (
Q区用Q扫 {qrCodeDataUrl ? ( 绑定二维码 ) : ( 绑定二维码生成中,请稍候自动刷新… )} V区用V扫
) : ( )}
) } export function AffiliateDashResultStep({ snapshot, }: { snapshot: ClaimSnapshot }) { const affiliateDash = snapshot.affiliateDash const success = Boolean(affiliateDash && !snapshot.isRedeemFailed) return (
{!success ? ( ) : ( )}
{snapshot.resultTitle}

{snapshot.resultDescription}

) }