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

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

export function userHasUnitConversionsAction(user: User | null, action: UnitConversionsCatalogAction): boolean {
	return userHasPermission(user, `cat_unit_conversions.${action}`);
}
