/**
 * Catálogo general — permisos `cat_company.*` (`permissions_general` en seed_v2.py).
 * Empresa / datos de compañía
 */
import type { User } from '$lib/auth';
import { userHasPermission } from '$lib/auth';

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

export function userHasCompanyCatalogAction(user: User | null, action: CompanyCatalogAction): boolean {
	return userHasPermission(user, `cat_company.${action}`);
}
