/**
 * @module entity-wizard-state.service
 * @description Per-wizard state management for the Database Designer create/modify flow.
 *
 * ### Lifecycle
 * NOT an Angular injectable — manually instantiated by the wizard host component so
 * each open panel has its own isolated state.  The host must call `destroy()` from
 * `ngOnDestroy()` to complete all observables and prevent leaks.
 *
 * ```typescript
 * // In the wizard component:
 * private readonly designerService = inject(DatabaseDesignerService);
 * private readonly wizardState = new EntityWizardStateService(this.designerService);
 *
 * ngOnDestroy(): void { this.wizardState.destroy(); }
 * ```
 *
 * ### Responsibility boundary
 * - Step navigation (currentStep$ BehaviorSubject)
 * - Draft TableDefinition assembly from step values
 * - Synchronous step validation (empty required fields, reserved column names)
 * - Server round-trips (validateSchema, submit) delegated to DatabaseDesignerService
 *
 * No component layout, no templates, no Angular DI lifecycle.
 */
import { Observable } from 'rxjs';
import { DatabaseDesignerService } from './database-designer.service.js';
import type { EntityTableSpec, BasicsStepValue, ColumnSpec, ForeignKeySpec, ClientValidationResult, EntityPipelineResult, WizardStep } from '../database-designer.types.js';
export declare class EntityWizardStateService {
    private readonly designerService;
    constructor(designerService: DatabaseDesignerService);
    private readonly _currentStep;
    private readonly _tableDefinition;
    private readonly _stepErrors;
    private readonly _validationResult;
    private readonly _pipelineResult;
    private readonly _isValidating;
    private readonly _isSubmitting;
    readonly currentStep$: Observable<WizardStep>;
    readonly tableDefinition$: Observable<Partial<EntityTableSpec>>;
    readonly stepErrors$: Observable<Record<string, string>>;
    readonly validationResult$: Observable<ClientValidationResult | null>;
    readonly pipelineResult$: Observable<EntityPipelineResult | null>;
    readonly isValidating$: Observable<boolean>;
    readonly isSubmitting$: Observable<boolean>;
    get CurrentStep(): WizardStep;
    get TableDefinition(): Partial<EntityTableSpec>;
    GoToStep(step: WizardStep): void;
    /** Returns true if the current step passes synchronous validation. */
    ValidateStep(step: WizardStep): boolean;
    UpdateBasics(basics: BasicsStepValue): void;
    UpdateFields(columns: ColumnSpec[]): void;
    UpdateRelationships(fks: ForeignKeySpec[]): void;
    /**
     * Update relationships and auto-create UUID source columns for any FK whose
     * `ColumnName` does not yet exist in `Columns`.  Fixes the "Step 3 dead-end"
     * where a user can add a relationship but has no valid UUID column to back it.
     *
     * An auto-created column is marked with `Description: 'Auto-generated FK to {Table}'`
     * so the user can tell what the wizard added for them.  The column can still
     * be renamed or deleted from Step 2.
     */
    UpdateRelationshipsAndAutoColumns(fks: ForeignKeySpec[]): void;
    /**
     * Validate the current TableDefinition via `Validate Entity Schema` action.
     * Updates `validationResult$` and `stepErrors$`.
     */
    ValidateSchema(): Promise<ClientValidationResult>;
    /**
     * Run the entity creation or modification pipeline via the appropriate action.
     * Updates `pipelineResult$` on completion.
     */
    Submit(modificationType: 'create' | 'alter', existingEntityId?: string): Promise<EntityPipelineResult>;
    /** Complete all subjects — call from the host component's ngOnDestroy. */
    Destroy(): void;
    /** Build a complete EntityTableSpec from the draft, or null if required fields missing. */
    private buildCompleteSpec;
}
//# sourceMappingURL=entity-wizard-state.service.d.ts.map