/**
 * 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 Type } from '@finos/legend-graph';
import { type Hashable } from '@finos/legend-shared';
import type { QueryBuilderProjectionColumnDragSource } from '../projection/QueryBuilderProjectionColumnState.js';
import { QueryBuilderTDSColumnState } from '../QueryBuilderTDSColumnState.js';
import type { QueryBuilderTDSState } from '../QueryBuilderTDSState.js';
import type { QueryBuilderTDS_WindowOperator } from './operators/QueryBuilderTDS_WindowOperator.js';
import type { COLUMN_SORT_TYPE } from '../../../../graph/QueryBuilderMetaModelConst.js';
export declare const QUERY_BUILDER_WINDOW_COLUMN_DND_TYPE = "WINDOW_COLUMN";
export interface QueryBuilderWindowColumnDragSource {
    columnState: QueryBuilderTDSColumnState;
}
interface QueryBuilderInvalidWindowColumnName {
    invalidColumnName: string;
    missingColumnName: string;
}
export type QueryBuilderWindowDropTarget = QueryBuilderProjectionColumnDragSource | QueryBuilderWindowColumnDragSource;
export declare class WindowGroupByColumnSortByState implements Hashable {
    columnState: QueryBuilderTDSColumnState;
    sortType: COLUMN_SORT_TYPE;
    constructor(columnState: QueryBuilderTDSColumnState, sortType: COLUMN_SORT_TYPE);
    setColumnState(colState: QueryBuilderTDSColumnState): void;
    setSortType(type: COLUMN_SORT_TYPE): void;
    get hashCode(): string;
}
export declare abstract class QueryBuilderTDS_WindowOperatorState implements Hashable {
    readonly windowState: QueryBuilderWindowState;
    lambdaParameterName: string;
    operator: QueryBuilderTDS_WindowOperator;
    constructor(windowState: QueryBuilderWindowState, operator: QueryBuilderTDS_WindowOperator);
    setLambdaParameterName(paramName: string): void;
    setOperator(val: QueryBuilderTDS_WindowOperator): void;
    get hashCode(): string;
}
export declare class QueryBuilderTDS_WindowRankOperatorState extends QueryBuilderTDS_WindowOperatorState {
    constructor(windowState: QueryBuilderWindowState, operator: QueryBuilderTDS_WindowOperator);
}
export declare class QueryBuilderTDS_WindowAggreationOperatorState extends QueryBuilderTDS_WindowOperatorState {
    columnState: QueryBuilderTDSColumnState;
    constructor(windowState: QueryBuilderWindowState, operator: QueryBuilderTDS_WindowOperator, columnState: QueryBuilderTDSColumnState);
    setColumnState(val: QueryBuilderTDSColumnState): void;
    get hashCode(): string;
}
export declare class QueryBuilderWindowColumnState extends QueryBuilderTDSColumnState implements Hashable {
    readonly windowState: QueryBuilderWindowState;
    windowColumns: QueryBuilderTDSColumnState[];
    sortByState: WindowGroupByColumnSortByState | undefined;
    operatorState: QueryBuilderTDS_WindowOperatorState;
    columnName: string;
    constructor(windowState: QueryBuilderWindowState, windowColumns: QueryBuilderTDSColumnState[], sortType: WindowGroupByColumnSortByState | undefined, operatorState: QueryBuilderTDS_WindowOperatorState, columnName: string);
    get columnWindowGroupIdx(): number;
    get possibleReferencedColumns(): QueryBuilderTDSColumnState[];
    get referencedTDSColumns(): QueryBuilderTDSColumnState[];
    getColumnType(): Type | undefined;
    setColumnName(val: string): void;
    setOperatorState(op: QueryBuilderTDS_WindowOperatorState): void;
    setSortBy(val: WindowGroupByColumnSortByState | undefined): void;
    changeWindow(val: QueryBuilderTDSColumnState, idx: number): void;
    addWindow(val: QueryBuilderTDSColumnState): void;
    setWindows(val: QueryBuilderTDSColumnState[]): void;
    deleteWindow(val: QueryBuilderTDSColumnState): void;
    possibleAggregatedColumns(op: QueryBuilderTDS_WindowOperator): QueryBuilderTDSColumnState[];
    getChangeOperatorStateAndColumnName(currentOperator: QueryBuilderTDS_WindowOperator, currentColumn: QueryBuilderTDSColumnState | undefined, newOperator: QueryBuilderTDS_WindowOperator): {
        operatorState: QueryBuilderTDS_WindowOperatorState;
        columnName: string;
    } | undefined;
    changeOperator(windowOp: QueryBuilderTDS_WindowOperator): void;
    changeSortBy(sortOp: COLUMN_SORT_TYPE | undefined): void;
    get hashCode(): string;
}
export declare class QueryBuilderWindowState implements Hashable {
    readonly tdsState: QueryBuilderTDSState;
    windowColumns: QueryBuilderWindowColumnState[];
    operators: QueryBuilderTDS_WindowOperator[];
    editColumn: QueryBuilderWindowColumnState | undefined;
    constructor(tdsState: QueryBuilderTDSState, operators: QueryBuilderTDS_WindowOperator[]);
    get isEmpty(): boolean;
    get invalidWindowColumnNames(): QueryBuilderInvalidWindowColumnName[];
    get windowValidationIssues(): string[];
    get referencedTDSColumns(): QueryBuilderTDSColumnState[];
    setEditColumn(col: QueryBuilderWindowColumnState | undefined): void;
    findOperator(func: string): QueryBuilderTDS_WindowOperator | undefined;
    addWindowColumn(windowCol: QueryBuilderWindowColumnState): void;
    removeColumn(column: QueryBuilderWindowColumnState): void;
    moveColumn(fromIndex: number, toIndex: number): void;
    isColumnOrderValid(columnName: string, indexRange: number): boolean;
    get hashCode(): string;
}
export {};
//# sourceMappingURL=QueryBuilderWindowState.d.ts.map