export const DegreeLevels = ['D3', 'D4', 'S1', 'S2', 'S3'] as const;

export type DegreeLevel = (typeof DegreeLevels)[number];

export type Department = {
    id: number;
    code: string;
    name: string;
    degree_level: DegreeLevel | null;
    created_at: string;
    updated_at: string;
};

export function formatDepartmentLabel(department: {
    name: string;
    degree_level?: string | null;
}): string {
    return department.degree_level
        ? `${department.name} (${department.degree_level})`
        : department.name;
}
