/**
 * Copyright (c) 2020-present, Goldman Sachs
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import { type GeneratorFn, ActionState } from '@finos/legend-shared';
import { EndToEndWorkflowEditorState } from './EndToEndWorkflowEditorState.js';
import { RelationalDatabaseConnection, type PureModel, PackageableConnection, PackageableRuntime, ParserError, CompilationError } from '@finos/legend-graph';
import type { EditorStore } from '../../EditorStore.js';
import { BaseStepperState } from '@finos/legend-art';
import type { Entity } from '@finos/legend-storage';
import { DatabaseModelBuilderState } from '../element-editor-state/connection/DatabaseModelBuilderState.js';
import { DatabaseBuilderWizardState } from '../element-editor-state/connection/DatabaseBuilderWizardState.js';
import { RelationalDatabaseConnectionValueState } from '../element-editor-state/connection/ConnectionEditorState.js';
export declare enum QUERY_CONNECTION_WORKFLOW_STEPS {
    CREATE_CONNECTION = "Create Connection",
    CREATE_DATABASE = "Create Database",
    EDIT_DATABASE = "Edit Database",
    CREATE_CLASS_MAPPING_RUNTIME = "Create Class/Mapping/Runtime",
    CONFIRMATION = "Confirmation"
}
export declare abstract class ConnectionToQueryStepperState extends BaseStepperState {
    abstract label: QUERY_CONNECTION_WORKFLOW_STEPS;
}
export declare class QueryConnectionConfirmationAndGrammarEditorStepperState extends ConnectionToQueryStepperState {
    workflowEditorState: QueryConnectionEndToEndWorkflowEditorState;
    isCompilingCode: ActionState;
    editorStore: EditorStore;
    constructor(queryConnectionEndToEndWorkflowState: QueryConnectionEndToEndWorkflowEditorState);
    get label(): QUERY_CONNECTION_WORKFLOW_STEPS;
    compile(): GeneratorFn<void>;
    query(): GeneratorFn<void>;
    handleNext(): GeneratorFn<void>;
}
export declare class DatabaseModelBuilderStepperState extends ConnectionToQueryStepperState {
    workflowEditorState: QueryConnectionEndToEndWorkflowEditorState;
    databaseModelBuilderState: DatabaseModelBuilderState;
    editorStore: EditorStore;
    constructor(queryConnectionEndToEndWorkflowState: QueryConnectionEndToEndWorkflowEditorState, databaseModelBuilderState: DatabaseModelBuilderState);
    get label(): QUERY_CONNECTION_WORKFLOW_STEPS;
    updateGraphWithModels(entities: Entity[]): GeneratorFn<void>;
    handleNext(): GeneratorFn<void>;
}
export declare class DatabaseGrammarEditorStepperState extends ConnectionToQueryStepperState {
    workflowEditorState: QueryConnectionEndToEndWorkflowEditorState;
    isCompilingGrammarCode: ActionState;
    editorStore: EditorStore;
    constructor(queryConnectionEndToEndWorkflowState: QueryConnectionEndToEndWorkflowEditorState);
    get label(): QUERY_CONNECTION_WORKFLOW_STEPS;
    compileDatabaseGrammarCode(): GeneratorFn<void>;
    buildDatabaseModelBuilderState(): void;
    handleNext(): GeneratorFn<void>;
}
export declare class DatabaseBuilderStepperState extends ConnectionToQueryStepperState {
    workflowEditorState: QueryConnectionEndToEndWorkflowEditorState;
    databaseBuilderWizardState: DatabaseBuilderWizardState;
    isGeneratingDatabaseGrammarCode: ActionState;
    editorStore: EditorStore;
    constructor(queryConnectionEndToEndWorkflowState: QueryConnectionEndToEndWorkflowEditorState, databaseBuilderWizardState: DatabaseBuilderWizardState);
    get label(): QUERY_CONNECTION_WORKFLOW_STEPS;
    buildDatabase(): GeneratorFn<void>;
    generateDatabaseGrammarCode(): GeneratorFn<void>;
    handleNext(): GeneratorFn<void>;
}
export declare class ConnectionValueStepperState extends ConnectionToQueryStepperState {
    workflowEditorState: QueryConnectionEndToEndWorkflowEditorState;
    targetConnectionPath: string;
    connectionValueState: RelationalDatabaseConnectionValueState;
    constructor(workflowEditorState: QueryConnectionEndToEndWorkflowEditorState);
    get createConnection(): RelationalDatabaseConnection;
    get label(): QUERY_CONNECTION_WORKFLOW_STEPS;
    setTargetConnectionPath(val: string): void;
    handleNext(): GeneratorFn<void>;
}
export declare class QueryConnectionEndToEndWorkflowEditorState extends EndToEndWorkflowEditorState {
    activeStep: number;
    activeStepToBaseStepperState: Map<string, BaseStepperState>;
    activeStepToStepLabel: Map<number, string>;
    targetRuntimePath: string;
    packageableConnection: PackageableConnection | undefined;
    packageableRuntime: PackageableRuntime | undefined;
    databaseGrammarCode: string;
    runtimeGrammarCode: string;
    connectionGrammarCode: string;
    finalGrammarCode: string;
    workflowGraph: PureModel;
    isValid: boolean;
    compileError: ParserError | CompilationError | undefined;
    constructor(editorStore: EditorStore);
    get label(): string;
    initactiveStepToStepLabel(): void;
    setActiveStep(step: number): void;
    setTargetRuntimePath(val: string): void;
    setRuntimeGrammarCode(val: string): void;
    setDatabaseGrammarCode(code: string): void;
    setFinalGrammarCode(val: string): void;
    setCompileError(err: ParserError | CompilationError | undefined): void;
    updateRuntime(newPath: string): GeneratorFn<void>;
    reset(): void;
}
//# sourceMappingURL=QueryConnectionEndToEndWorkflowEditorState.d.ts.map