export type CreditCardRow = {
  id: string;
  bankName: string;
  cardName: string;
  last4: string;
  creditLimit: number;
  statementDay: number;
  dueDay: number;
  interestRate: number;
  bankAccountId: string;
  bankAccountLabel: string;
  archived: boolean;
  notes: string;
  scope: "company" | "personal";
};

export type StatementRow = {
  id: string;
  cardId: string;
  period: string; // YYYY-MM
  statementDate: string;
  dueDate: string;
  totalDebt: number;
  minimumPayment: number;
  paidAmount: number;
  status: "pending" | "partial" | "paid" | "overdue";
  notes: string;
};

export type BankAccountOption = { id: string; label: string };

export const STATEMENT_STATUS_LABEL: Record<StatementRow["status"], string> = {
  pending: "Bekliyor",
  partial: "Kısmi ödendi",
  paid: "Ödendi",
  overdue: "Gecikti",
};

export const STATEMENT_STATUS_COLOR: Record<StatementRow["status"], string> = {
  pending: "bg-blue-500/15 text-blue-700 dark:text-blue-300 border-blue-500/30",
  partial: "bg-amber-500/15 text-amber-800 dark:text-amber-300 border-amber-500/30",
  paid: "bg-emerald-500/15 text-emerald-700 dark:text-emerald-300 border-emerald-500/30",
  overdue: "bg-red-500/15 text-red-700 dark:text-red-300 border-red-500/30",
};
