/**
 * Resource Factory Registry Implementation
 *
 * This module provides the registry for managing multiple resource factories.
 *
 * @module declarative-api/factory/factory-registry
 */
import type { ResourceFamily, IResourceFactory, IResourceFactoryRegistry, IResourceDecorator } from '../../../lib/runtime-web/types/declarative-api';
import type { IFrameworkResourceProvider } from '../../interfaces';
/**
 * Error thrown when a factory is already registered.
 */
export declare class DuplicateFactoryError extends Error {
    readonly familyType: ResourceFamily;
    constructor(familyType: ResourceFamily);
}
/**
 * Type guard for DuplicateFactoryError.
 */
export declare function isDuplicateFactoryError(error: unknown): error is DuplicateFactoryError;
/**
 * Error thrown when a factory is not found.
 */
export declare class FactoryNotFoundError extends Error {
    readonly familyType: ResourceFamily;
    readonly availableFamilies: readonly ResourceFamily[];
    constructor(familyType: ResourceFamily, availableFamilies: readonly ResourceFamily[]);
}
/**
 * Type guard for FactoryNotFoundError.
 */
export declare function isFactoryNotFoundError(error: unknown): error is FactoryNotFoundError;
/**
 * Resource Factory Registry.
 *
 * Central registry for all resource factories.
 * Provides methods to register, retrieve, and query factories.
 */
export declare class ResourceFactoryRegistry implements IResourceFactoryRegistry {
    private readonly factories;
    /**
     * Register a factory.
     */
    register<TFamily extends ResourceFamily>(factory: IResourceFactory<TFamily>): void;
    /**
     * Get a factory by family type.
     */
    get<TFamily extends ResourceFamily>(familyType: TFamily): IResourceFactory<TFamily> | undefined;
    /**
     * Get a factory by family type, throwing if not found.
     */
    getOrThrow<TFamily extends ResourceFamily>(familyType: TFamily): IResourceFactory<TFamily>;
    /**
     * Check if a factory is registered.
     */
    has(familyType: ResourceFamily): boolean;
    /**
     * Get all registered factories.
     */
    getAll(): readonly IResourceFactory[];
    /**
     * Get all registered family types.
     */
    getFamilyTypes(): readonly ResourceFamily[];
    /**
     * Unregister a factory.
     */
    unregister(familyType: ResourceFamily): boolean;
    /**
     * Clear all registered factories.
     */
    clear(): void;
    /**
     * Get the number of registered factories.
     */
    count(): number;
}
/**
 * Create a factory registry with all default factories registered.
 *
 * All factories receive the IFrameworkResourceProvider for resource creation,
 * ensuring all resources are created through the framework abstraction layer.
 *
 * @param provider - The IFrameworkResourceProvider (RuntimeInfraStack) for resource creation
 * @param decorators - Optional decorators to apply to all factories
 * @returns A registry with all default factories
 *
 * Validates: Requirements 5.7
 */
export declare function createDefaultFactoryRegistry(provider: IFrameworkResourceProvider, decorators?: readonly IResourceDecorator[]): ResourceFactoryRegistry;
