export const RegistrationStatuses = [
    'submitted',
    'approved',
    'rejected',
] as const;

export type RegistrationStatus = (typeof RegistrationStatuses)[number];

export const RegistrationStatusLabels: Record<RegistrationStatus, string> = {
    submitted: 'Diajukan',
    approved: 'Disetujui',
    rejected: 'Ditolak',
};

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

export type CourseRegistrationCourseClass = {
    id: number;
    course: { id: number; code: string; name: string } | null;
};

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

export type CourseRegistration = {
    id: number;
    student_id: number;
    student: CourseRegistrationStudent | null;
    academic_term_id: number;
    academic_term: { id: number; name: string; semester: string } | null;
    course_class_id: number;
    course_class: CourseRegistrationCourseClass | null;
    status: RegistrationStatus | null;
    approved_by: number | null;
    approver: CourseRegistrationApprover | null;
    created_at: string;
    updated_at: string;
};
