export const LetterStatuses = [
    'submitted',
    'in_process',
    'completed',
    'rejected',
] as const;

export type LetterStatus = (typeof LetterStatuses)[number];

export const LetterStatusLabels: Record<LetterStatus, string> = {
    submitted: 'Diajukan',
    in_process: 'Diproses',
    completed: 'Selesai',
    rejected: 'Ditolak',
};

export type LetterRequestUser = {
    id: number;
    profile: { full_name: string } | null;
    student: {
        student_number: string;
        department: { id: number; name: string } | null;
    } | null;
};

export type LetterRequestProcessor = {
    id: number;
    profile: { full_name: string } | null;
};

export type LetterRequest = {
    id: number;
    user_id: number;
    user: LetterRequestUser | null;
    letter_type: string;
    purpose: string | null;
    status: LetterStatus | null;
    processed_by: number | null;
    processor: LetterRequestProcessor | null;
    submitted_at: string | null;
    completed_at: string | null;
    result_url: string | null;
    result_name: string | null;
    created_at: string;
    updated_at: string;
};
