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

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

export function userHasSealsAction(user: User | null, action: SealsCatalogAction): boolean {
	return userHasPermission(user, `cat_seals.${action}`);
}
