/**
 * Base Resource Factory Implementation
 *
 * This module provides the abstract base class for all resource factories.
 * Factories delegate resource creation to IFrameworkResourceProvider (RuntimeInfraStack).
 *
 * @module declarative-api/factory/base-factory
 */
import type { IResourceEntity, ResourceMetadata, IResourceComposite, IResourceDecorator, ResourceFamily, FactoryOptions, IResourceFactory, IResourceBuilder, BuilderValidationResult, BuilderValidationError, InjectionConfig, Stage } from '../../../lib/runtime-web/types/declarative-api';
import type { IFrameworkResourceProvider } from '../../interfaces';
import { DecoratorComposer, DecoratorRegistry } from '../decorator';
/**
 * Abstract base class for resource factories.
 *
 * Provides common functionality for all factory implementations including
 * metadata creation, decorator application, and builder creation.
 *
 * Factories delegate resource creation to IFrameworkResourceProvider (RuntimeInfraStack)
 * to ensure all resources follow framework conventions.
 *
 * @typeParam TFamily - The resource family type
 *
 * Validates: Requirements 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 5.7
 */
export declare abstract class BaseResourceFactory<TFamily extends ResourceFamily> implements IResourceFactory<TFamily> {
    abstract readonly familyType: TFamily;
    /**
     * Framework Resource Provider for delegating resource creation.
     * RuntimeInfraStack implements this interface.
     */
    protected readonly provider: IFrameworkResourceProvider;
    protected readonly decoratorRegistry: DecoratorRegistry;
    protected readonly decoratorComposer: DecoratorComposer;
    /**
     * Service name for resource naming.
     * Delegates to provider.serviceName.
     */
    get serviceName(): string;
    /**
     * Deployment stage.
     * Delegates to provider.stage.
     */
    get stage(): Stage;
    constructor(provider: IFrameworkResourceProvider, decorators?: readonly IResourceDecorator[]);
    /**
     * Create a resource with full CDK props.
     */
    abstract create<TProps>(id: string, props: TProps, options?: FactoryOptions): IResourceComposite;
    /**
     * Get a builder for custom resource construction.
     */
    abstract getBuilder<TProps>(id: string): IResourceBuilder<IResourceEntity, TProps>;
    /**
     * Check if this factory can create a resource of the given type.
     */
    abstract canCreate(resourceType: string): boolean;
    /**
     * Get the supported resource types for this factory.
     */
    abstract getSupportedTypes(): readonly string[];
    /**
     * Create resource metadata.
     */
    protected createMetadata(tags?: Record<string, string>): ResourceMetadata;
    /**
     * Create a composite for grouping resources.
     */
    protected createComposite(id: string, groupType: 'database' | 'messaging' | 'auth' | 'storage' | 'events', children?: readonly IResourceEntity[]): IResourceComposite;
    /**
     * Apply decorators to a resource.
     */
    protected applyDecorators<T extends IResourceEntity>(resource: T, options?: FactoryOptions): T;
    /**
     * Merge factory options with defaults.
     */
    protected mergeOptions(options?: FactoryOptions): Required<Omit<FactoryOptions, 'decorators' | 'tags'>> & Pick<FactoryOptions, 'decorators' | 'tags'>;
}
/**
 * Base resource builder implementation.
 *
 * Provides common builder functionality for all resource types.
 *
 * @typeParam TEntity - The resource entity type
 * @typeParam TProps - The CDK props type
 */
export declare abstract class BaseResourceBuilder<TEntity extends IResourceEntity, TProps = unknown> implements IResourceBuilder<TEntity, TProps> {
    protected readonly id: string;
    protected readonly serviceName: string;
    protected readonly stage: Stage;
    protected _props?: TProps;
    protected _autoGrant: boolean;
    protected _autoInject: boolean;
    protected _injectionConfig?: InjectionConfig;
    protected _decorators: IResourceDecorator[];
    protected _group?: IResourceComposite;
    protected _tags: Record<string, string>;
    constructor(id: string, serviceName: string, stage: Stage);
    /**
     * Set full CDK props.
     */
    withProps(props: TProps): this;
    /**
     * Merge additional props.
     */
    withPropsOverride(overrides: Partial<TProps>): this;
    /**
     * Enable automatic IAM permission granting.
     */
    withAutoGrant(enabled?: boolean): this;
    /**
     * Enable automatic environment variable injection.
     */
    withAutoInject(config?: InjectionConfig): this;
    /**
     * Add a decorator.
     */
    withDecorator(decorator: IResourceDecorator): this;
    /**
     * Add to a composite group.
     */
    withGroup(composite: IResourceComposite): this;
    /**
     * Add custom tags.
     */
    withTags(tags: Record<string, string>): this;
    /**
     * Validate the current configuration.
     */
    validate(): BuilderValidationResult;
    /**
     * Build the resource.
     */
    abstract build(): TEntity;
    /**
     * Validate props (to be overridden by subclasses).
     */
    protected validateProps(): BuilderValidationError[];
    /**
     * Create resource metadata.
     */
    protected createMetadata(): ResourceMetadata;
    /**
     * Deep merge two objects.
     */
    protected deepMerge<T>(target: T, source: Partial<T>): T;
}
