export enum Gender {
    Male = 'male',
    Female = 'female',
}

export const GenderLabels: Record<Gender, string> = {
    [Gender.Male]: 'Laki-laki',
    [Gender.Female]: 'Perempuan',
};

export enum StudentStatus {
    Active = 'active',
    OnLeave = 'on_leave',
    Graduated = 'graduated',
    DroppedOut = 'dropped_out',
}

export const StudentStatusLabels: Record<StudentStatus, string> = {
    [StudentStatus.Active]: 'Aktif',
    [StudentStatus.OnLeave]: 'Cuti',
    [StudentStatus.Graduated]: 'Lulus',
    [StudentStatus.DroppedOut]: 'Drop Out',
};

export type Department = {
    id: number;
    code: string;
    name: string;
};

export type UserProfile = {
    full_name: string;
    phone_number: string | null;
    address: string | null;
    gender: Gender | null;
    birth_date: string | null;
    birth_place: string | null;
};

export type Lecturer = {
    id: number;
    lecturer_number: string;
    department: Department | null;
    user?: {
        profile?: {
            full_name: string;
        } | null;
    } | null;
};

export type Student = {
    id: number;
    student_number: string;
    department: Department | null;
    enrollment_year: number;
    current_semester: number;
    academic_advisor: Lecturer | null;
    status: StudentStatus;
};

export type Role = {
    id: number;
    name: string;
};

export type AdminUser = {
    id: number;
    username: string;
    email: string;
    is_active: boolean;
    roles: Role[];
    profile: UserProfile | null;
    lecturer: Lecturer | null;
    student: Student | null;
    created_at: string;
    updated_at: string;
};
