export const PaymentStatuses = ['unpaid', 'partial', 'paid'] as const;

export type PaymentStatus = (typeof PaymentStatuses)[number];

export const PaymentStatusLabels: Record<PaymentStatus, string> = {
    unpaid: 'Belum Bayar',
    partial: 'Sebagian',
    paid: 'Lunas',
};

export const PaymentMethods = ['transfer', 'cash'] as const;

export type PaymentMethod = (typeof PaymentMethods)[number];

export const PaymentMethodLabels: Record<PaymentMethod, string> = {
    transfer: 'Transfer',
    cash: 'Tunai',
};

export type TuitionPayment = {
    id: number;
    invoice_id: number;
    amount_paid: string;
    paid_at: string;
    payment_method: PaymentMethod | null;
    status: PaymentStatus | null;
    recorded_by: number | null;
    recorder: { id: number; full_name: string } | null;
    notes: string | null;
    proof_url: string | null;
    proof_name: string | null;
    created_at: string;
    updated_at: string;
};
