import { FinanceWorkbench } from "./FinanceWorkbench";

interface FinanceTabsProps {
  onNavigate?: (tab: string) => void;
  defaultTab?: string;
}

export function FinanceTabs({ onNavigate, defaultTab }: FinanceTabsProps) {
  const viewMap: Record<string, 'dashboard' | 'orders' | 'refunds' | 'analytics' | 'help'> = {
    'cockpit': 'dashboard',
    'transactions': 'dashboard', // 默认显示 dashboard 视图，以便接收 chatbot 的 GenUI 推送
    'orders': 'orders',
  };
  
  return (
    <FinanceWorkbench 
      onNavigate={onNavigate} 
      defaultView={viewMap[defaultTab || 'cockpit'] || 'dashboard'} 
    />
  );
}
