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

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

export function userHasBrokerConceptsAction(user: User | null, action: BrokerConceptsCatalogAction): boolean {
	return userHasPermission(user, `cat_broker_concepts.${action}`);
}
