export type RoleWithPermissions = {
    id: number;
    name: string;
    permissions: string[];
};

export type PermissionGroups = Record<string, string[]>;

export const RoleLabels: Record<string, string> = {
    mahasiswa: 'Mahasiswa',
    dosen: 'Dosen',
    'staff-admin': 'Staff Admin',
    'staff-keuangan': 'Staff Keuangan',
    kaprodi: 'Kaprodi',
    developer: 'Developer',
};

export function formatRoleLabel(name: string): string {
    return RoleLabels[name] ?? name;
}
