/**
 * Catálogo general — permisos `cat_concepts.*` (`permissions_general` en seed_v2.py).
 * Conceptos
 */
import type { User } from '$lib/auth';
import { userHasPermission } from '$lib/auth';

export type ConceptsCatalogAction = 'view' | 'create' | 'edit' | 'delete';

export function userHasConceptsAction(user: User | null, action: ConceptsCatalogAction): boolean {
	return userHasPermission(user, `cat_concepts.${action}`);
}
