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

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

export function userHasMultiCurrencyTypesAction(user: User | null, action: MultiCurrencyTypesCatalogAction): boolean {
	return userHasPermission(user, `cat_multi_currency_types.${action}`);
}
