/**
 * Vehículos — permisos `vehicles.*` (`permissions_transports` en seed_v2.py).
 */
import type { User } from '$lib/auth';
import { userHasPermission } from '$lib/auth';

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

export function userHasVehiclesAction(user: User | null, action: VehiclesCatalogAction): boolean {
	return userHasPermission(user, `vehicles.${action}`);
}
