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

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

export function userHasUmCustomsAction(user: User | null, action: UmCustomsCatalogAction): boolean {
	return userHasPermission(user, `cat_um_customs.${action}`);
}
