"use client"; import { useMemo } from "react"; import { useTranslation } from "react-i18next"; /** 与 `common.export.*` 键一致 */ export type ExportLabelKey = | "drawsList" | "drawFinance" | "adminRoles" | "adminUsers" | "players" | "walletTransferOrders" | "walletTransactions" | "playerWallets" | "tickets" | "settlementBatches" | "jackpotPayouts" | "jackpotContributions" | "riskLockLogs" | "riskPools" | "riskIndex" | "riskPoolDetail" | "auditLogs" | "currencies"; export function useExportLabels(key: ExportLabelKey, params?: Record) { const { t } = useTranslation("common"); return useMemo( () => ({ filename: t(`export.${key}.filename`, params), sheetName: t(`export.${key}.sheetName`, params), }), [key, params, t], ); }