/**
 * 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 { EditorStore } from '../../EditorStore.js';
import { type GeneratorFn, ActionState } from '@finos/legend-shared';
import { ElementEditorState } from './ElementEditorState.js';
import { type CompilationError, type PackageableElement, type ExecutionResult, type ExecutionResultWithMetadata, ConcreteFunctionDefinition, RawLambda, type FunctionActivator, CodeCompletionResult } from '@finos/legend-graph';
import { ExecutionPlanState, LineageState, LambdaEditorState, LambdaParameterState, LambdaParametersState } from '@finos/legend-query-builder';
import { FunctionActivatorState } from './FunctionActivatorState.js';
import { FunctionTestableState } from './function-activator/testable/FunctionTestableState.js';
export declare enum FUNCTION_EDITOR_TAB {
    DEFINITION = "DEFINITION",
    TAGGED_VALUES = "TAGGED_VALUES",
    STEREOTYPES = "STEREOTYPES",
    TEST_SUITES = "TEST_SUITES",
    LAMBDAS = "LAMBDAS"
}
export declare class FunctionDefinitionEditorState extends LambdaEditorState {
    readonly editorStore: EditorStore;
    readonly functionElement: ConcreteFunctionDefinition;
    convertingGrammarToProtocolAction: ActionState;
    isConvertingFunctionBodyToString: boolean;
    constructor(functionElement: ConcreteFunctionDefinition, editorStore: EditorStore);
    get lambdaId(): string;
    convertLambdaGrammarStringToObject(): GeneratorFn<void>;
    convertLambdaObjectToGrammarString(options?: {
        pretty?: boolean | undefined;
        preserveCompilationError?: boolean | undefined;
        firstLoad?: boolean | undefined;
    }): GeneratorFn<void>;
    getCodeComplete(input: string): Promise<CodeCompletionResult>;
}
export declare class FunctionParametersState extends LambdaParametersState {
    readonly functionEditorState: FunctionEditorState;
    constructor(functionEditorState: FunctionEditorState);
    openModal(lambda: RawLambda): void;
    openDataCubeModal(query: RawLambda, element: PackageableElement, editorStore: EditorStore): void;
    build(lambda: RawLambda): LambdaParameterState[];
}
export declare class FunctionEditorState extends ElementEditorState {
    readonly functionDefinitionEditorState: FunctionDefinitionEditorState;
    readonly activatorPromoteState: FunctionActivatorState;
    readonly functionTestableEditorState: FunctionTestableState;
    selectedTab: FUNCTION_EDITOR_TAB;
    isRunningFunc: boolean;
    isGeneratingPlan: boolean;
    isGeneratingLineage: boolean;
    executionResult?: ExecutionResult | undefined;
    executionPlanState: ExecutionPlanState;
    parametersState: FunctionParametersState;
    lineageState: LineageState;
    funcRunPromise: Promise<ExecutionResultWithMetadata> | undefined;
    constructor(editorStore: EditorStore, element: PackageableElement);
    get label(): string;
    get functionElement(): ConcreteFunctionDefinition;
    get activators(): FunctionActivator[];
    setSelectedTab(tab: FUNCTION_EDITOR_TAB): void;
    revealCompilationError(compilationError: CompilationError): boolean;
    clearCompilationError(): void;
    updateFunctionWithQuery(val: RawLambda): GeneratorFn<void>;
    reprocess(newElement: ConcreteFunctionDefinition, editorStore: EditorStore): FunctionEditorState;
    setIsRunningFunc(val: boolean): void;
    setExecutionResult: (executionResult: ExecutionResult | undefined) => void;
    setFuncRunPromise: (promise: Promise<ExecutionResultWithMetadata> | undefined) => void;
    get bodyExpressionSequence(): RawLambda;
    generatePlan(debug: boolean): GeneratorFn<void>;
    handleOpeningDataCube(element: PackageableElement, editorStore: EditorStore): Promise<void>;
    openingDataCube(element: PackageableElement, editorStore: EditorStore): Promise<void>;
    handleRunFunc(): GeneratorFn<void>;
    runFunc(): GeneratorFn<void>;
    cancelFuncRun(): GeneratorFn<void>;
    generateLineage(): GeneratorFn<void>;
}
//# sourceMappingURL=FunctionEditorState.d.ts.map