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

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

export function userHasTrailersAction(user: User | null, action: TrailersCatalogAction): boolean {
	return userHasPermission(user, `trailers.${action}`);
}
