export type PaymentFormState = {
  ok: boolean;
  error?: string;
  fieldErrors?: Record<string, string>;
};

export const initialPaymentFormState: PaymentFormState = { ok: false };

export type PaymentActionState = {
  ok: boolean;
  error?: string;
};

export const initialPaymentActionState: PaymentActionState = { ok: false };

export const PAYMENT_METHOD_OPTIONS = [
  { value: "cash", label: "Nakit" },
  { value: "bank", label: "Banka / Havale" },
  { value: "card", label: "Kart" },
  { value: "check", label: "Çek / Senet" },
  { value: "other", label: "Diğer" },
] as const;

export const PAYMENT_METHOD_LABELS: Record<string, string> = Object.fromEntries(
  PAYMENT_METHOD_OPTIONS.map((o) => [o.value, o.label]),
);
