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

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

export function userHasTransportersAction(
	user: User | null,
	action: TransportersCatalogAction
): boolean {
	return userHasPermission(user, `transporters.${action}`);
}
