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

export type StatesRefAction = 'view';

export function userHasStatesRefAction(user: User | null, action: StatesRefAction): boolean {
	return userHasPermission(user, `ref_states.${action}`);
}
