"use client";

interface DepositSummaryWidgetProps {
  height?: number;
}

const MOCK_DEPOSITS = [
  { label: "This Month", amount: "—", trend: "Pending sync" },
  { label: "Last 30 Days", amount: "—", trend: "Pending sync" },
  { label: "Year to Date", amount: "—", trend: "Pending sync" },
];

export function DepositSummaryWidget({ height = 280 }: DepositSummaryWidgetProps) {
  return (
    <div
      className="h-full w-full overflow-hidden rounded-xl border border-border bg-card p-4 flex flex-col gap-3"
      style={{ minHeight: height }}
    >
      <div className="flex items-center justify-between border-b border-border pb-3">
        <span className="text-xs font-semibold uppercase tracking-widest text-muted-foreground">
          Total Deposits
        </span>
        <span className="text-lg font-bold text-foreground">—</span>
      </div>

      <div className="grid grid-cols-1 gap-2">
        {MOCK_DEPOSITS.map((row) => (
          <div
            key={row.label}
            className="rounded-lg border border-border bg-muted/60 px-3 py-2"
          >
            <div className="flex items-center justify-between gap-2">
              <p className="text-xs font-semibold text-foreground">{row.label}</p>
              <p className="text-sm font-semibold text-foreground">{row.amount}</p>
            </div>
            <p className="mt-0.5 text-[10px] text-muted-foreground">{row.trend}</p>
          </div>
        ))}
      </div>

      <div className="mt-auto rounded-lg border border-dashed border-border bg-muted/70 px-3 py-2 text-center">
        <p className="text-[10px] text-muted-foreground">
          Live deposit data appears after backend mapping is enabled.
        </p>
      </div>
    </div>
  );
}
