import { useNavigate } from 'react-router-dom';
import PageHeader from '@dukang/shared-ui/PageHeader';

function fmtMoney(n: number) {
  return n.toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 });
}

/** BUWR-25：经营周报（preV1 占位，待 `/partner/reports/weekly` 接入） */
export default function WeeklyReportPage() {
  const navigate = useNavigate();

  return (
    <div className="page-no-tab">
      <PageHeader title="数据周报" onBack={() => navigate('/')} />

      <main style={{ padding: '0 20px 24px' }}>
        <section className="partner-revenue-card" style={{ marginBottom: 16 }}>
          <p className="partner-revenue-label">近 7 日 GMV (CNY)</p>
          <div className="partner-revenue-amount">{fmtMoney(128450)}</div>
        </section>

        <section className="partner-bento-card" style={{ marginBottom: 12 }}>
          <div className="partner-expansion-split">
            <div>
              <p className="label-md text-muted">购酒订单量</p>
              <p className="headline-lg" style={{ fontSize: 24, marginTop: 4 }}>86</p>
            </div>
            <div>
              <p className="label-md text-muted">活跃门店数</p>
              <p className="headline-lg" style={{ fontSize: 24, marginTop: 4 }}>12</p>
            </div>
          </div>
        </section>

        <section className="partner-bento-card">
          <h2 className="headline-md" style={{ marginBottom: 12 }}>本周新签门店</h2>
          <p className="headline-lg text-primary">3 家</p>
          <p className="label-md text-muted" style={{ marginTop: 8 }}>详细趋势图待 API 接入后展示</p>
        </section>
      </main>
    </div>
  );
}
