import * as plugins from '../plugins.js';
import type { ISecurityProfile, INetworkTarget, IRouteMetadata, IStoredRoute, IRouteSecurity } from '../../dist_ts_interfaces/data/route-management.js';
export declare class ReferenceResolver {
    private profiles;
    private targets;
    initialize(): Promise<void>;
    createProfile(data: {
        name: string;
        description?: string;
        security: IRouteSecurity;
        extendsProfiles?: string[];
        createdBy: string;
    }): Promise<string>;
    updateProfile(id: string, patch: Partial<Omit<ISecurityProfile, 'id' | 'createdAt' | 'createdBy'>>): Promise<{
        affectedRouteIds: string[];
    }>;
    deleteProfile(id: string, force: boolean, storedRoutes?: Map<string, IStoredRoute>): Promise<{
        success: boolean;
        message?: string;
    }>;
    getProfile(id: string): ISecurityProfile | undefined;
    getProfileByName(name: string): ISecurityProfile | undefined;
    listProfiles(): ISecurityProfile[];
    getProfileUsage(storedRoutes: Map<string, IStoredRoute>): Map<string, Array<{
        id: string;
        routeName: string;
    }>>;
    getProfileUsageForId(profileId: string, storedRoutes: Map<string, IStoredRoute>): Array<{
        id: string;
        routeName: string;
    }>;
    createTarget(data: {
        name: string;
        description?: string;
        host: string | string[];
        port: number;
        createdBy: string;
    }): Promise<string>;
    updateTarget(id: string, patch: Partial<Omit<INetworkTarget, 'id' | 'createdAt' | 'createdBy'>>): Promise<{
        affectedRouteIds: string[];
    }>;
    deleteTarget(id: string, force: boolean, storedRoutes?: Map<string, IStoredRoute>): Promise<{
        success: boolean;
        message?: string;
    }>;
    getTarget(id: string): INetworkTarget | undefined;
    getTargetByName(name: string): INetworkTarget | undefined;
    listTargets(): INetworkTarget[];
    getTargetUsageForId(targetId: string, storedRoutes: Map<string, IStoredRoute>): Array<{
        id: string;
        routeName: string;
    }>;
    /**
     * Resolve references for a single route.
     * Materializes security profile and/or network target into the route's fields.
     * Returns the resolved route and updated metadata.
     */
    resolveRoute(route: plugins.smartproxy.IRouteConfig, metadata?: IRouteMetadata): {
        route: plugins.smartproxy.IRouteConfig;
        metadata: IRouteMetadata;
    };
    findRoutesByProfileRef(profileId: string): Promise<string[]>;
    findRoutesByTargetRef(targetId: string): Promise<string[]>;
    findRoutesByProfileRefSync(profileId: string, storedRoutes: Map<string, IStoredRoute>): string[];
    findRoutesByTargetRefSync(targetId: string, storedRoutes: Map<string, IStoredRoute>): string[];
    private resolveSecurityProfile;
    /**
     * Merge two IRouteSecurity objects.
     * `override` values take precedence over `base` values.
     * For ipAllowList/ipBlockList: union arrays and deduplicate.
     * For scalar/object fields: override wins if present.
     */
    private mergeSecurityFields;
    private loadProfiles;
    private loadTargets;
    private persistProfile;
    private persistTarget;
    private clearProfileRefsOnRoutes;
    private clearTargetRefsOnRoutes;
}
