/**
 * 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 { ActionState, FuzzySearchEngine } from '@finos/legend-shared';
import { QUERY_BUILDER_PROPERTY_SEARCH_TYPE } from '../QueryBuilderConfig.js';
import { type QueryBuilderExplorerTreeNodeData } from './QueryBuilderExplorerState.js';
import type { QueryBuilderState } from '../QueryBuilderState.js';
import { QueryBuilderFuzzySearchAdvancedConfigState } from './QueryBuilderFuzzySearchAdvancedConfigState.js';
export declare class QueryBuilderPropertySearchState {
    queryBuilderState: QueryBuilderState;
    /**
     * When we initialize property search engine, we practically extend
     * the existing explorer by a few depth. As such, we create new explorer
     * nodes which are not part of the main explorer tree. Together with the
     * nodes already explored in the tree, these nodes are stored here to help
     * searching. Think of this as the knowledge base of property search
     *
     * NOTE: a big reason why we want to store these as explorer tree nodes
     * is that we could interact with the searched nodes, i.e. drag them to
     * various panels to create filter, fetch-structure, etc.
     */
    indexedExplorerTreeNodeMap: Map<string, QueryBuilderExplorerTreeNodeData>;
    searchEngine: FuzzySearchEngine<QueryBuilderExplorerTreeNodeData>;
    searchConfigurationState: QueryBuilderFuzzySearchAdvancedConfigState;
    initializationState: ActionState;
    searchState: ActionState;
    searchText: string;
    searchResults: QueryBuilderExplorerTreeNodeData[];
    isOverSearchLimit: boolean;
    isSearchPanelOpen: boolean;
    isSearchPanelHidden: boolean;
    showSearchConfigurationMenu: boolean;
    includeOneMany: boolean;
    typeFilters: QUERY_BUILDER_PROPERTY_SEARCH_TYPE[];
    constructor(queryBuilderState: QueryBuilderState);
    setIsSearchPanelOpen(val: boolean): void;
    setIsSearchPanelHidden(val: boolean): void;
    setShowSearchConfigurationMenu(val: boolean): void;
    setSearchResults(val: QueryBuilderExplorerTreeNodeData[]): void;
    setIsOverSearchLimit(val: boolean): void;
    setSearchText(val: string): void;
    resetSearch(): void;
    setIncludeOneMany(val: boolean): void;
    setFilterOnlyType(val: QUERY_BUILDER_PROPERTY_SEARCH_TYPE): void;
    toggleFilterForType(val: QUERY_BUILDER_PROPERTY_SEARCH_TYPE): void;
    isNodeMultiple(node: QueryBuilderExplorerTreeNodeData): boolean;
    search(): Promise<void>;
    /**
     * From the current explorer tree, navigate breadth-first to find more mapped
     * property nodes, then index these property nodes for searching.
     *
     * NOTE: fortunately, since we restrict the depth and number of nodes in this navigation
     * this process is often not the performance bottleneck, else, we would need to make this
     * asynchronous and block the UI while waiting.
     */
    initialize(): Promise<void>;
    get indexedExplorerTreeNodes(): QueryBuilderExplorerTreeNodeData[];
    isNodeIncludedInFilter(node: QueryBuilderExplorerTreeNodeData): boolean;
    get filteredSearchResults(): QueryBuilderExplorerTreeNodeData[];
}
//# sourceMappingURL=QueryBuilderPropertySearchState.d.ts.map