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

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

export function userHasSignaturesAction(user: User | null, action: SignaturesCatalogAction): boolean {
	return userHasPermission(user, `cat_signatures.${action}`);
}
