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

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

export function userHasUmAmericanAction(user: User | null, action: UmAmericanCatalogAction): boolean {
	return userHasPermission(user, `cat_um_american.${action}`);
}
