/**
 * 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, type ContentType, ActionState } from '@finos/legend-shared';
import type { QueryBuilderState } from './QueryBuilderState.js';
import { type ExecutionResult, type RawLambda, type EXECUTION_SERIALIZATION_FORMAT, type QueryGridConfig, type TDSResultCellData, type ExecutionResultWithMetadata } from '@finos/legend-graph';
import type { LambdaFunctionBuilderOption } from './QueryBuilderValueSpecificationBuilderHelper.js';
import { ExecutionPlanState } from './execution-plan/ExecutionPlanState.js';
import type { DataGridColumnState } from '@finos/legend-lego/data-grid';
import { LineageState } from './lineage/LineageState.js';
export declare const DEFAULT_LIMIT = 1000;
export interface ExportDataInfo {
    contentType: ContentType;
    serializationFormat?: EXECUTION_SERIALIZATION_FORMAT | undefined;
}
export interface QueryBuilderTDSResultCellCoordinate {
    rowIndex: number;
    colIndex: number;
}
type QueryBuilderDataGridConfig = {
    columns: DataGridColumnState[];
    isPivotModeEnabled: boolean | undefined;
    isLocalModeEnabled: boolean | undefined;
    previewLimit?: number | undefined;
    weightedColumnPairs?: Map<string, string> | undefined;
};
export declare class QueryBuilderResultWavgAggregationState {
    isApplyingWavg: boolean;
    weightedColumnIdPairs: Map<string, string>;
    constructor();
    setIsApplyingWavg(val: boolean): void;
    addWeightedColumnIdPair(col: string, weightedColumnId: string): void;
    removeWeightedColumnIdPair(col: string): void;
}
export declare class QueryBuilderResultState {
    readonly queryBuilderState: QueryBuilderState;
    readonly executionPlanState: ExecutionPlanState;
    readonly exportState: ActionState;
    previewLimit: number;
    pressedRunQuery: ActionState;
    isRunningQuery: boolean;
    isGeneratingPlan: boolean;
    executionResult?: ExecutionResult | undefined;
    isExecutionResultOverflowing: boolean;
    executionDuration?: number | undefined;
    executionTraceId?: string;
    latestRunHashCode?: string | undefined;
    queryRunPromise: Promise<ExecutionResultWithMetadata> | undefined;
    isQueryUsageViewerOpened: boolean;
    executionError: Error | string | undefined;
    selectedCells: TDSResultCellData[];
    mousedOverCell: TDSResultCellData | null;
    isSelectingCells: boolean;
    gridConfig: QueryBuilderDataGridConfig | undefined;
    wavgAggregationState: QueryBuilderResultWavgAggregationState | undefined;
    lineageState: LineageState;
    isGeneratingLineage: boolean;
    constructor(queryBuilderState: QueryBuilderState);
    setGridConfig(val: QueryBuilderDataGridConfig | undefined): void;
    setWavgAggregationState(val: QueryBuilderResultWavgAggregationState | undefined): void;
    setIsSelectingCells(val: boolean): void;
    setIsRunningQuery(val: boolean): void;
    setExecutionResult(val: ExecutionResult | undefined): void;
    setExecutionTraceId(val: string): void;
    setExecutionDuration(val: number | undefined): void;
    setPreviewLimit(val: number): void;
    addSelectedCell(val: TDSResultCellData): void;
    setSelectedCells(val: TDSResultCellData[]): void;
    setMouseOverCell(val: TDSResultCellData | null): void;
    setQueryRunPromise(promise: Promise<ExecutionResultWithMetadata> | undefined): void;
    setIsQueryUsageViewerOpened(val: boolean): void;
    setExecutionError(val: Error | string | undefined): void;
    setIsExecutionResultOverflowing(val: boolean): void;
    updatePreviewLimitInConfig(): void;
    getExecutionResultLimit: () => number;
    processExecutionResult: (result: ExecutionResult) => void;
    processWeightedColumnPairsMap(config: QueryGridConfig): Map<string, string> | undefined;
    handlePreConfiguredGridConfig(config: QueryGridConfig): void;
    getQueryGridConfig(): QueryGridConfig | undefined;
    get checkForStaleResults(): boolean;
    buildExecutionRawLambda(executionOptions?: LambdaFunctionBuilderOption): RawLambda;
    exportData(format: string): GeneratorFn<void>;
    runQuery(): GeneratorFn<void>;
    cancelQuery(): GeneratorFn<void>;
    generatePlan(debug: boolean): GeneratorFn<void>;
    generateLineage(): GeneratorFn<void>;
}
export {};
//# sourceMappingURL=QueryBuilderResultState.d.ts.map