/** One entry of the 10-permission catalogue (the toggle rows). */
export interface PermissionCatalogItem {
  code: string;
  label: string;
  resource: string;
}

/** A role tab in the "Paramètres des rôles" editor. */
export interface InternalRole {
  id: number;
  code: string;
  label: string;
  is_system: boolean;
  count: number;
  /** Permission codes enabled by default for this role. */
  permissions: string[];
}

export interface RolesCatalog {
  permissions: PermissionCatalogItem[];
  roles: InternalRole[];
}

export interface UpdateRolePermissionsResult {
  id: number;
  code: string;
  name: string;
  permissions: string[];
}
