/**
 * 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 GenericLegendApplicationStore } from '@finos/legend-application';
import { type QueryInfo, type LightQuery, type AbstractPureGraphManager, type RawLambda, QuerySearchSpecification, QuerySearchSortBy } from '@finos/legend-graph';
import { type GeneratorFn, ActionState } from '@finos/legend-shared';
import type { QueryBuilderState } from './QueryBuilderState.js';
import type { CuratedTemplateQuerySpecification, LoadQueryFilterOption } from './QueryBuilder_LegendApplicationPlugin_Extension.js';
export declare const QUERY_LOADER_TYPEAHEAD_SEARCH_LIMIT = 50;
export declare const QUERY_LOADER_DEFAULT_QUERY_SEARCH_LIMIT = 10;
export declare enum SORT_BY_OPTIONS {
    SORT_BY_CREATE = "Last Created",
    SORT_BY_VIEW = "Last Viewed",
    SORT_BY_UPDATE = "Last Updated"
}
export type SortByOption = {
    label: SORT_BY_OPTIONS;
    value: SORT_BY_OPTIONS;
};
export declare class QueryLoaderState {
    readonly applicationStore: GenericLegendApplicationStore;
    readonly graphManager: AbstractPureGraphManager;
    readonly searchQueriesState: ActionState;
    readonly renameQueryState: ActionState;
    readonly deleteQueryState: ActionState;
    readonly previewQueryState: ActionState;
    readonly decorateSearchSpecification?: ((val: QuerySearchSpecification) => QuerySearchSpecification) | undefined;
    readonly loadQuery: (query: LightQuery) => void;
    readonly fetchDefaultQueries?: (() => Promise<LightQuery[]>) | undefined;
    readonly generateDefaultQueriesSummaryText?: ((queries: LightQuery[]) => string) | undefined;
    readonly isReadOnly?: boolean | undefined;
    readonly onQueryRenamed?: ((query: LightQuery) => void) | undefined;
    readonly onQueryDeleted?: ((query: string) => void) | undefined;
    readonly handleFetchDefaultQueriesFailure?: (() => void) | undefined;
    queryBuilderState?: QueryBuilderState | undefined;
    searchText: string;
    showCurrentUserQueriesOnly: boolean;
    extraFilters: Map<string, boolean>;
    extraFilterOptions: LoadQueryFilterOption[];
    extraQueryFilterOptionsRelatedToTemplateQuery: string[];
    queries: LightQuery[];
    curatedTemplateQuerySpecifications: CuratedTemplateQuerySpecification[];
    isQueryLoaderDialogOpen: boolean;
    isCuratedTemplateToggled: boolean;
    showingDefaultQueries: boolean;
    showPreviewViewer: boolean;
    queryPreviewContent?: QueryInfo | {
        name: string;
        content: string;
    };
    sortBy: SORT_BY_OPTIONS;
    constructor(applicationStore: GenericLegendApplicationStore, graphManager: AbstractPureGraphManager, options: {
        decorateSearchSpecification?: ((val: QuerySearchSpecification) => QuerySearchSpecification) | undefined;
        loadQuery: (query: LightQuery) => void;
        fetchDefaultQueries?: (() => Promise<LightQuery[]>) | undefined;
        generateDefaultQueriesSummaryText?: ((queries: LightQuery[]) => string) | undefined;
        isReadOnly?: boolean | undefined;
        onQueryRenamed?: ((query: LightQuery) => void) | undefined;
        onQueryDeleted?: ((query: string) => void) | undefined;
        handleFetchDefaultQueriesFailure?: (() => void) | undefined;
    });
    setIsCuratedTemplateToggled(val: boolean): void;
    setSortBy(val: SORT_BY_OPTIONS): void;
    getQuerySearchSortBy(sortByValue: string): QuerySearchSortBy | undefined;
    setSearchText(val: string): void;
    setQueryLoaderDialogOpen(val: boolean): void;
    setQueries(val: LightQuery[]): void;
    canPerformAdvancedSearch(searchText: string): boolean;
    setShowPreviewViewer(val: boolean): void;
    setShowCurrentUserQueriesOnly(val: boolean): void;
    reset(): void;
    initialize(queryBuilderState: QueryBuilderState): GeneratorFn<void>;
    searchQueries(searchText: string): GeneratorFn<void>;
    renameQuery(queryId: string, name: string): GeneratorFn<void>;
    deleteQuery(queryId: string): GeneratorFn<void>;
    getPreviewQueryContent(queryId: string | undefined, template?: {
        queryName: string;
        queryContent: RawLambda;
    }): GeneratorFn<void>;
}
//# sourceMappingURL=QueryLoaderState.d.ts.map