/**
 * Base Resource Adapter Implementation
 *
 * This module provides the abstract base class for resource adapters
 * and the adapter registry implementation.
 *
 * @module declarative-api/adapter/base-adapter
 */
import type { IResourceEntity, ResourceMetadata, ResourceType, Stage, AdapterType, AdapterOptions, IResourceAdapter, IResourceAdapterRegistry, ILifecycleState, IResourceVisitor, LifecycleStateType } from '../../../lib/runtime-web/types/declarative-api';
/**
 * Symbol used to store the original construct reference on adapted entities.
 */
export declare const ORIGINAL_CONSTRUCT_SYMBOL: unique symbol;
/**
 * Symbol used to mark entities as adapted.
 */
export declare const ADAPTED_BY_SYMBOL: unique symbol;
/**
 * Error thrown when attempting to register a duplicate adapter.
 */
export declare class DuplicateAdapterError extends Error {
    readonly adapterType: AdapterType;
    readonly code = "DUPLICATE_ADAPTER";
    constructor(adapterType: AdapterType);
}
/**
 * Type guard for DuplicateAdapterError.
 */
export declare function isDuplicateAdapterError(error: unknown): error is DuplicateAdapterError;
/**
 * Error thrown when no adapter can handle a construct.
 */
export declare class AdapterNotFoundError extends Error {
    readonly constructType: string;
    readonly code = "ADAPTER_NOT_FOUND";
    constructor(constructType: string);
}
/**
 * Type guard for AdapterNotFoundError.
 */
export declare function isAdapterNotFoundError(error: unknown): error is AdapterNotFoundError;
/**
 * Interface for adapted entities with original construct reference.
 */
export interface IAdaptedEntity<TOriginal = unknown> extends IResourceEntity<TOriginal> {
    readonly [ORIGINAL_CONSTRUCT_SYMBOL]: TOriginal;
    readonly [ADAPTED_BY_SYMBOL]: AdapterType;
}
/**
 * Abstract base class for resource adapters.
 *
 * Provides common functionality for adapting external CDK constructs
 * to framework-compatible resource entities.
 *
 * @typeParam TOriginal - The original CDK construct type
 * @typeParam TEntity - The adapted resource entity type
 *
 * Validates: Requirements 13.1, 13.2, 13.3, 13.4, 13.5
 */
export declare abstract class BaseResourceAdapter<TOriginal = unknown, TEntity extends IResourceEntity = IResourceEntity> implements IResourceAdapter<TOriginal, TEntity> {
    abstract readonly adapterType: AdapterType;
    abstract readonly resourceType: ResourceType;
    protected readonly serviceName: string;
    protected readonly stage: Stage;
    constructor(serviceName: string, stage?: Stage);
    /**
     * Adapt an external construct to a framework entity.
     */
    adapt(id: string, original: TOriginal, options?: AdapterOptions): TEntity;
    /**
     * Get the original construct from an adapted entity.
     */
    getOriginal(entity: TEntity): TOriginal;
    /**
     * Check if a construct can be adapted by this adapter.
     */
    abstract canAdapt(construct: unknown): construct is TOriginal;
    /**
     * Check if an entity was adapted by this adapter.
     */
    isAdapted(entity: IResourceEntity): entity is TEntity;
    /**
     * Create the adapted entity.
     * Subclasses must implement this to create the specific entity type.
     */
    protected abstract createEntity(id: string, original: TOriginal, metadata: ResourceMetadata, options?: AdapterOptions): TEntity;
    /**
     * Create resource metadata.
     */
    protected createMetadata(options?: AdapterOptions): ResourceMetadata;
    /**
     * Get the construct type name for error messages.
     */
    protected getConstructTypeName(construct: unknown): string;
}
/**
 * Base adapted entity implementation.
 *
 * Provides a concrete implementation of IResourceEntity for adapted constructs.
 */
export declare class AdaptedResourceEntity<TConstruct = unknown> implements IResourceEntity<TConstruct> {
    readonly id: string;
    readonly type: ResourceType;
    readonly construct: TConstruct;
    readonly metadata: ResourceMetadata;
    private _state;
    constructor(id: string, type: ResourceType, construct: TConstruct, metadata: ResourceMetadata, state?: ILifecycleState);
    get state(): ILifecycleState;
    transitionTo(targetState: LifecycleStateType): void;
    accept<T>(visitor: IResourceVisitor<T>): T;
}
/**
 * Registry for managing resource adapters.
 *
 * Provides centralized registration and retrieval of adapters.
 *
 * Validates: Requirements 13.2
 */
export declare class ResourceAdapterRegistry implements IResourceAdapterRegistry {
    private readonly adapters;
    /**
     * Register an adapter.
     */
    register<TOriginal, TEntity extends IResourceEntity>(adapter: IResourceAdapter<TOriginal, TEntity>): void;
    /**
     * Unregister an adapter.
     */
    unregister(adapterType: AdapterType): boolean;
    /**
     * Get an adapter by type.
     */
    getAdapter<TOriginal = unknown, TEntity extends IResourceEntity = IResourceEntity>(adapterType: AdapterType): IResourceAdapter<TOriginal, TEntity> | undefined;
    /**
     * Get an adapter that can handle a construct.
     */
    getAdapterForConstruct<TOriginal = unknown, TEntity extends IResourceEntity = IResourceEntity>(construct: unknown): IResourceAdapter<TOriginal, TEntity> | undefined;
    /**
     * Adapt a construct using the appropriate adapter.
     */
    adapt<TEntity extends IResourceEntity = IResourceEntity>(id: string, construct: unknown, options?: AdapterOptions): TEntity;
    /**
     * Check if an adapter is registered for a type.
     */
    hasAdapter(adapterType: AdapterType): boolean;
    /**
     * Get all registered adapter types.
     */
    getRegisteredTypes(): readonly AdapterType[];
    /**
     * Get the count of registered adapters.
     */
    get count(): number;
    /**
     * Get the construct type name for error messages.
     */
    private getConstructTypeName;
}
