/**
 * Constraint Handler Registry
 * Manages registration and selection of constraint handlers
 */
import { ConstraintHandler, ConstraintHandlingResult, ConstraintType, TableConstraints } from './constraint-types';
export interface ConstraintRegistryOptions {
    enablePriorityHandling?: boolean;
    enableFallbackHandlers?: boolean;
    logHandlerSelection?: boolean;
    validateHandlers?: boolean;
}
export interface HandlerMatch {
    handler: ConstraintHandler;
    confidence: number;
    reason: string;
}
export declare class ConstraintRegistry {
    private handlers;
    private handlersByType;
    private options;
    constructor(options?: ConstraintRegistryOptions);
    /**
     * Initialize constraint type maps
     */
    private initializeTypeMaps;
    /**
     * Register a constraint handler
     */
    registerHandler(handler: ConstraintHandler): void;
    /**
     * Register multiple handlers
     */
    registerHandlers(handlers: ConstraintHandler[]): void;
    /**
     * Unregister a handler
     */
    unregisterHandler(handlerId: string): boolean;
    /**
     * Find the best handler for a constraint
     */
    findHandler(constraint: any, constraintType: ConstraintType, data?: any): HandlerMatch | null;
    /**
     * Handle a constraint using the best available handler
     */
    handleConstraint(constraint: any, constraintType: ConstraintType, data: any): ConstraintHandlingResult;
    /**
     * Handle all constraints for a table
     */
    handleTableConstraints(tableConstraints: TableConstraints, data: any): ConstraintHandlingResult;
    /**
     * Get handler by ID
     */
    getHandler(handlerId: string): ConstraintHandler | undefined;
    /**
     * Get all handlers of a specific type
     */
    getHandlersByType(constraintType: ConstraintType): ConstraintHandler[];
    /**
     * Get all registered handlers
     */
    getAllHandlers(): ConstraintHandler[];
    /**
     * Get registry statistics
     */
    getStats(): {
        totalHandlers: number;
        handlersByType: Record<ConstraintType, number>;
        handlerIds: string[];
    };
    /**
     * Clear all handlers
     */
    clear(): void;
    /**
     * Validate a handler before registration
     */
    private validateHandler;
    /**
     * Calculate confidence score for a handler
     */
    private calculateHandlerConfidence;
    /**
     * Merge two constraint handling results
     */
    private mergeResults;
    /**
     * Test a handler against sample data
     */
    testHandler(handlerId: string, sampleConstraint: any, sampleData: any): {
        canHandle: boolean;
        result?: ConstraintHandlingResult;
        error?: string;
    };
}
//# sourceMappingURL=constraint-registry.d.ts.map