/**
 * 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 GraphManagerState, type Class, DataProduct, type V1_DataProductArtifact, ModelAccessPointGroup, NativeModelExecutionContext, type NativeModelAccess, type Mapping, type DataProductElementScope, PackageableRuntime, type LambdaFunction, type MappingModelCoverageAnalysisResult, type QueryExecutionContext, LakehouseAccessPoint, type RawLambda, type Accessor, type RelationTypeMetadata, DataProductAccessor, type PureModel } from '@finos/legend-graph';
import { QueryBuilderState } from '../../QueryBuilderState.js';
import { type GenericLegendApplicationStore } from '@finos/legend-application';
import type { QueryBuilderActionConfig, QueryBuilderWorkflowState } from '../../query-workflow/QueryBuilderWorkFlowState.js';
import type { QueryBuilderConfig } from '../../../graph-manager/QueryBuilderConfig.js';
import { ActionState, type GeneratorFn } from '@finos/legend-shared';
import { DepotEntityWithOrigin, type QueryableSourceInfo } from '@finos/legend-storage';
export declare const resolveDataProductAccessor: (dataProduct: DataProduct, accessPoint: LakehouseAccessPoint, graph: PureModel, artifact: V1_DataProductArtifact | undefined, relationMetadata?: RelationTypeMetadata | undefined) => DataProductAccessor;
export type DataProductOption = {
    label: string;
    value: DepotEntityWithOrigin;
};
export declare const buildDataProductOption: (value: DepotEntityWithOrigin) => DataProductOption;
export declare const buildExecOptions: (val: NativeModelExecutionContext) => {
    label: string;
    value: NativeModelExecutionContext;
};
export type ModelAccessPointGroupOption = {
    label: string;
    value: ModelAccessPointGroup;
};
export declare const buildModelAccessPointGroupOption: (value: ModelAccessPointGroup) => ModelAccessPointGroupOption;
export type ExecutionIdOption = {
    label: string;
    tag: string;
    value: NativeModelExecutionContext | ModelAccessPointGroup | LakehouseAccessPoint;
};
export declare abstract class DataProductExecutionState<T> {
    readonly queryBuilderState: DataProductQueryBuilderState;
    exectionValue: T;
    constructor(executionState: T, queryBuilderState: DataProductQueryBuilderState);
    abstract get label(): string;
    abstract get mapping(): Mapping | undefined;
    abstract get featuredElements(): DataProductElementScope[] | undefined;
    get showRuntimeOptions(): boolean;
    get selectedOption(): {
        label: string;
        value: T;
    };
}
export declare class NativeModelDataProductExecutionState extends DataProductExecutionState<NativeModelExecutionContext> {
    nativeModelAccess: NativeModelAccess;
    constructor(executionState: NativeModelExecutionContext, queryBuilderState: DataProductQueryBuilderState);
    get label(): string;
    get mapping(): Mapping;
    get featuredElements(): DataProductElementScope[] | undefined;
}
export declare class ModelAccessPointDataProductExecutionState extends DataProductExecutionState<ModelAccessPointGroup> {
    selectedRuntime: PackageableRuntime | undefined;
    adhocRuntime: boolean;
    constructor(executionState: ModelAccessPointGroup, queryBuilderState: DataProductQueryBuilderState);
    changeSelectedRuntime(val: PackageableRuntime): void;
    withAdhocRuntime(): ModelAccessPointDataProductExecutionState;
    get label(): string;
    get mapping(): Mapping;
    get featuredElements(): DataProductElementScope[] | undefined;
    get showRuntimeOptions(): boolean;
    get compatibleRuntimes(): PackageableRuntime[];
}
export declare class LakehouseDataProductExecutionState extends DataProductExecutionState<LakehouseAccessPoint> {
    selectedRuntime: PackageableRuntime | undefined;
    adhocRuntime: boolean;
    constructor(executionState: LakehouseAccessPoint, queryBuilderState: DataProductQueryBuilderState);
    changeSelectedRuntime(val: PackageableRuntime): void;
    withAdhocRuntime(): LakehouseDataProductExecutionState;
    get label(): string;
    get mapping(): Mapping | undefined;
    get featuredElements(): DataProductElementScope[] | undefined;
    get compatibleRuntimes(): PackageableRuntime[];
    get showRuntimeOptions(): boolean;
}
export declare class DataProductQueryBuilderState extends QueryBuilderState {
    readonly onClassChange?: ((val: Class) => void) | undefined;
    readonly onDataProductChange?: (val: DepotEntityWithOrigin) => Promise<void>;
    loadDataProductModelState: ActionState;
    dataProduct: DataProduct;
    dataProductArtifact: V1_DataProductArtifact | undefined;
    executionState: DataProductExecutionState<NativeModelExecutionContext | ModelAccessPointGroup | LakehouseAccessPoint>;
    entities: DepotEntityWithOrigin[] | undefined;
    mappingToMappingCoverageResult?: Map<string, MappingModelCoverageAnalysisResult>;
    prioritizeEntityFunc?: ((val: DepotEntityWithOrigin) => boolean) | undefined;
    TEMPORARY__setupPanelContentRenderer: () => React.ReactNode;
    constructor(applicationStore: GenericLegendApplicationStore, graphManagerState: GraphManagerState, workflow: QueryBuilderWorkflowState, dataProduct: DataProduct, artifact: V1_DataProductArtifact | undefined, actionConfig: QueryBuilderActionConfig, executionState: NativeModelExecutionContext | ModelAccessPointGroup | LakehouseAccessPoint, prioritizeEntityFunc: ((val: DepotEntityWithOrigin) => boolean) | undefined, onDataProductChange: (val: DepotEntityWithOrigin) => Promise<void>, onClassChange?: ((val: Class) => void) | undefined, config?: QueryBuilderConfig | undefined, sourceInfo?: QueryableSourceInfo | undefined);
    prepareAccessForExecution(): Promise<void>;
    get isProductLinkable(): boolean;
    get isNativeMode(): boolean;
    get isModelAccessPointGroupMode(): boolean;
    get isLakehouseMode(): boolean;
    get showExecutionContextOptions(): boolean;
    get showModelAccessPointGroupSelector(): boolean;
    get hasNativeModelAccess(): boolean;
    get hasBothAccessModes(): boolean;
    get showContextSelector(): boolean;
    get allContextOptions(): ExecutionIdOption[];
    get selectedContextOption(): ExecutionIdOption | undefined;
    get executionIdOptions(): ExecutionIdOption[];
    get selectedExecutionIdOption(): ExecutionIdOption | undefined;
    get showExecutionIdSelector(): boolean;
    changeExecutionId(option: ExecutionIdOption): Promise<void>;
    get selectedExecOption(): {
        label: string;
        value: NativeModelExecutionContext;
    } | undefined;
    get requiresMappingForExecution(): boolean;
    get selectedModelAccessPointGroupOption(): ModelAccessPointGroupOption | undefined;
    get usableClasses(): Class[];
    buildQueryForPersistence(): RawLambda;
    getQueryExecutionContext(): QueryExecutionContext;
    handleDataProductChange(val: DepotEntityWithOrigin): void;
    initWithDataProduct(dataProduct: DataProduct, accessor: Accessor | undefined, preResolvedState?: NativeModelExecutionContext | ModelAccessPointGroup | LakehouseAccessPoint): void;
    copyDataProductLinkToClipBoard(): void;
    protected getElementType(): typeof DataProduct;
    setExecutionState(val: NativeModelExecutionContext | ModelAccessPointGroup | LakehouseAccessPoint): void;
    changeExecutionState(val: NativeModelExecutionContext | ModelAccessPointGroup | LakehouseAccessPoint): Promise<void>;
    get modelAccessPointGroups(): ModelAccessPointGroup[];
    get hasModelAccessPointGroups(): boolean;
    get modelAccessPointGroupOptions(): ModelAccessPointGroupOption[];
    get activeMapping(): Mapping | undefined;
    get activeFeaturedElements(): DataProductElementScope[] | undefined;
    buildExecutionContextExpression(lambdaFunction: LambdaFunction): LambdaFunction;
    loadEntities(): GeneratorFn<void>;
    protected transformElement(element: DataProduct): DepotEntityWithOrigin;
    get dataProductOptions(): DataProductOption[];
    get selectedDataProductOption(): DataProductOption;
    get isSupported(): boolean;
    get execOptions(): {
        label: string;
        value: NativeModelExecutionContext;
    }[];
    propagateExecutionContextChange(requireReBuildingGraph?: boolean | undefined): Promise<void>;
}
//# sourceMappingURL=DataProductQueryBuilderState.d.ts.map