'use client'; import { getPaymentTypeLabel, getPaymentMeta } from '@/lib/pay-utils'; import type { Locale } from '@/lib/locale'; interface PaymentMethod { paymentType: string; amount: number; count: number; percentage: number; } interface PaymentMethodChartProps { data: PaymentMethod[]; dark?: boolean; locale?: Locale; } export default function PaymentMethodChart({ data, dark, locale = 'zh' }: PaymentMethodChartProps) { const title = locale === 'en' ? 'Payment Method Distribution' : '支付方式分布'; const emptyText = locale === 'en' ? 'No data' : '暂无数据'; const currency = locale === 'en' ? '$' : '¥'; if (data.length === 0) { return (
{emptyText}