import type { UserRole } from '@/shared/types/app';

/**
 * Roles that may add/remove audio-library entries — mirrors the backend
 * `MANAGE_AUDIO_FILES` grant (director/office_manager/teacher; support_staff is
 * read/play-only). The backend stays the source of truth; this only gates the
 * management UI affordances (Generate / delete).
 */
export function canManageAudioFiles(userRole: UserRole): boolean {
  return (
    userRole === 'director' ||
    userRole === 'office_manager' ||
    userRole === 'teacher'
  );
}
