'use client'; import { FunctionComponent, useState } from 'react'; import { useTranslations } from 'next-intl'; import { Box, Stack, Tab, Tabs } from '@mui/material'; import { AppIcon, PageHeader } from '@/components'; import WalletPaymentHistory from './WalletPaymentHistory'; import WalletInstallments from './WalletInstallments'; import WalletRefunds from './WalletRefunds'; import WalletReceipts from './WalletReceipts'; type WalletTab = 'payments' | 'installments' | 'refunds' | 'receipts'; /** * /wallet — the customer money hub (ui-phase-6). Four sections replace the old installments-only shell so * a card-paying customer (the default path) finally sees something other than a permanently empty tab: * «پرداخت‌ها» (payment history), «اقساط» (the unchanged f11 D5 installment tracker), «استردادها» (refunds, * REQ-048), «رسیدها» (client-derived invoice links). All four read at the shell's shared `CONTENT_MAX_WIDTH` * — no local width override. */ const WalletScreen: FunctionComponent = () => { const t = useTranslations('bnpl'); const [tab, setTab] = useState('payments'); return ( setTab(value)} variant="scrollable" scrollButtons="auto" allowScrollButtonsMobile sx={{ borderBottom: '1px solid', borderColor: 'divider' }} > } iconPosition="start" /> } iconPosition="start" /> } iconPosition="start" /> } iconPosition="start" /> {tab === 'payments' ? : null} {tab === 'installments' ? : null} {tab === 'refunds' ? : null} {tab === 'receipts' ? : null} ); }; export default WalletScreen;