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

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

export function userHasInpcAction(user: User | null, action: InpcCatalogAction): boolean {
	return userHasPermission(user, `cat_inpc.${action}`);
}
