export type FinanceType = "income" | "expense" | "debt" | "receivable";
export type PaymentMethod = "cash" | "transfer" | "card" | "check" | "other" | "";

export type FinanceRow = {
  id: string;
  type: FinanceType;
  amount: number;
  date: string;
  description: string;
  customerId: string;
  customerName: string;
  paymentMethod: PaymentMethod;
  invoiceId: string;
  bankAccountId: string;
  bankAccountLabel: string;
};

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

export const TYPE_LABEL: Record<FinanceType, string> = {
  income: "Gelir",
  expense: "Gider",
  debt: "Borç",
  receivable: "Alacak",
};

export const TYPE_COLOR: Record<FinanceType, string> = {
  income: "bg-emerald-500/15 text-emerald-700 dark:text-emerald-300 border-emerald-500/30",
  expense: "bg-red-500/15 text-red-700 dark:text-red-300 border-red-500/30",
  debt: "bg-amber-500/15 text-amber-800 dark:text-amber-300 border-amber-500/30",
  receivable: "bg-blue-500/15 text-blue-700 dark:text-blue-300 border-blue-500/30",
};

export const PAYMENT_METHOD_LABEL: Record<PaymentMethod, string> = {
  cash: "Nakit",
  transfer: "Havale / EFT",
  card: "Kart",
  check: "Çek",
  other: "Diğer",
  "": "—",
};
