/**
 * 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 MappingEditorState } from './MappingEditorState.js';
import type { EditorStore } from '../../../EditorStore.js';
import { type GeneratorFn } from '@finos/legend-shared';
import { type DEPRECATED__InputData, type Mapping, type Connection, type SetImplementation, type Table, type View, type RawLambda, type EmbeddedData, type TestAssertion, type ExecutionResultWithMetadata, Class, DEPRECATED__ObjectInputData, EngineRuntime, FlatDataInputData, RootFlatDataRecordType, RelationalInputData } from '@finos/legend-graph';
import { LambdaEditorState, ExecutionPlanState } from '@finos/legend-query-builder';
import { MappingEditorTabState } from './MappingTabManagerState.js';
export declare class MappingExecutionQueryState extends LambdaEditorState {
    editorStore: EditorStore;
    isInitializingLambda: boolean;
    query: RawLambda;
    constructor(editorStore: EditorStore, query: RawLambda);
    get lambdaId(): string;
    setIsInitializingLambda(val: boolean): void;
    updateLamba(val: RawLambda): GeneratorFn<void>;
    convertLambdaObjectToGrammarString(options?: {
        pretty?: boolean | undefined;
    }): GeneratorFn<void>;
    convertLambdaGrammarStringToObject(): GeneratorFn<void>;
}
declare abstract class MappingExecutionInputDataState {
    readonly uuid: string;
    editorStore: EditorStore;
    mapping: Mapping;
    inputData?: DEPRECATED__InputData | undefined;
    constructor(editorStore: EditorStore, mapping: Mapping, inputData: DEPRECATED__InputData | undefined);
    abstract get isValid(): boolean;
    abstract get runtime(): EngineRuntime;
    createEmbeddedData(): EmbeddedData | undefined;
    createAssertion(executionResult: string): TestAssertion | undefined;
    abstract buildInputDataForTest(): DEPRECATED__InputData;
}
export declare const createRuntimeForExecution: (mapping: Mapping, connection: Connection, editorStore: EditorStore) => EngineRuntime;
export declare class MappingExecutionEmptyInputDataState extends MappingExecutionInputDataState {
    get isValid(): boolean;
    get runtime(): EngineRuntime;
    buildInputDataForTest(): DEPRECATED__InputData;
}
export declare class MappingExecutionObjectInputDataState extends MappingExecutionInputDataState {
    inputData: DEPRECATED__ObjectInputData;
    constructor(editorStore: EditorStore, mapping: Mapping, _class: Class);
    get isValid(): boolean;
    get runtime(): EngineRuntime;
    createEmbeddedData(): EmbeddedData | undefined;
    createAssertion(executionResult: string): TestAssertion | undefined;
    buildInputDataForTest(): DEPRECATED__InputData;
}
export declare class MappingExecutionFlatDataInputDataState extends MappingExecutionInputDataState {
    inputData: FlatDataInputData;
    constructor(editorStore: EditorStore, mapping: Mapping, rootFlatDataRecordType: RootFlatDataRecordType);
    get isValid(): boolean;
    get runtime(): EngineRuntime;
    buildInputDataForTest(): DEPRECATED__InputData;
}
export declare class MappingExecutionRelationalInputDataState extends MappingExecutionInputDataState {
    inputData: RelationalInputData;
    constructor(editorStore: EditorStore, mapping: Mapping, tableOrView: Table | View);
    get isValid(): boolean;
    get runtime(): EngineRuntime;
    buildInputDataForTest(): DEPRECATED__InputData;
}
export declare class MappingExecutionState extends MappingEditorTabState {
    readonly editorStore: EditorStore;
    readonly mappingEditorState: MappingEditorState;
    name: string;
    queryState: MappingExecutionQueryState;
    inputDataState: MappingExecutionInputDataState;
    showServicePathModal: boolean;
    executionResultText?: string | undefined;
    isExecuting: boolean;
    isGeneratingPlan: boolean;
    executionPlanState: ExecutionPlanState;
    planGenerationDebugText?: string | undefined;
    executionRunPromise: Promise<ExecutionResultWithMetadata> | undefined;
    constructor(editorStore: EditorStore, mappingEditorState: MappingEditorState, name: string);
    get label(): string;
    setExecutionRunPromise(promise: Promise<ExecutionResultWithMetadata> | undefined): void;
    setQueryState(val: MappingExecutionQueryState): void;
    setInputDataState(val: MappingExecutionInputDataState): void;
    setExecutionResultText(val: string | undefined): void;
    setShowServicePathModal(val: boolean): void;
    setPlanGenerationDebugText(val: string | undefined): void;
    reset(): void;
    setInputDataStateBasedOnSource(source: unknown, populateWithMockData: boolean): void;
    promoteToTest(): GeneratorFn<void>;
    promoteToService(packagePath: string, serviceName: string): GeneratorFn<void>;
    cancelExecution(): GeneratorFn<void>;
    executeMapping(): GeneratorFn<void>;
    generatePlan(debug: boolean): GeneratorFn<void>;
    buildQueryWithClassMapping(setImplementation: SetImplementation | undefined): GeneratorFn<void>;
}
export {};
//# sourceMappingURL=MappingExecutionState.d.ts.map