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

export type PaymentMethodsRefAction = 'view';

export function userHasPaymentMethodsRefAction(user: User | null, action: PaymentMethodsRefAction): boolean {
	return userHasPermission(user, `ref_payment_methods.${action}`);
}
