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

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

export function userHasDriversAction(user: User | null, action: DriversCatalogAction): boolean {
	return userHasPermission(user, `drivers.${action}`);
}
