/**
 * Datos de referencia — permisos `ref_valuation_methods.*` (seed_v2.py `permissions_reference`).
 * Solo lectura en seed actual; `action` reservado por si se amplía el CRUD.
 * Métodos de valoración
 */
import type { User } from '$lib/auth';
import { userHasPermission } from '$lib/auth';

export type ValuationMethodsRefAction = 'view';

export function userHasValuationMethodsRefAction(user: User | null, action: ValuationMethodsRefAction): boolean {
	return userHasPermission(user, `ref_valuation_methods.${action}`);
}
