import { CanActivateFn } from '@angular/router'; /** * Route guard for protecting routes based on entitlements * * This guard checks if a customer has access to a specific entitlement before * allowing navigation to a route. Supports all entitlement types. * * @example * ```typescript * // In routes configuration * import { Routes } from '@angular/router'; * import { entitlementGuard } from '@subtrak/angular'; * * export const routes: Routes = [ * // BOOLEAN entitlement (feature flag) * { * path: 'analytics', * component: AnalyticsComponent, * canActivate: [entitlementGuard], * data: { * entitlement: 'premium_analytics', * type: 'BOOLEAN', * redirectTo: '/upgrade' * } * }, * * // NUMERIC entitlement (quota check) * { * path: 'projects/create', * component: CreateProjectComponent, * canActivate: [entitlementGuard], * data: { * entitlement: 'max_projects', * type: 'NUMERIC', * checkLimit: true, * getCurrentValue: () => inject(ProjectService).getCount(), * redirectTo: '/upgrade' * } * }, * * // ENUM entitlement (value check) * { * path: 'priority-support', * component: PrioritySupportComponent, * canActivate: [entitlementGuard], * data: { * entitlement: 'support_level', * type: 'ENUM', * requiredValue: 'priority', * redirectTo: '/upgrade' * } * } * ]; * ``` */ export declare const entitlementGuard: CanActivateFn;