/**
 * 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 { EditorStore } from './EditorStore.js';
import { ActionState } from '@finos/legend-shared';
import type { PackageTreeNodeData } from './utils/TreeUtils.js';
import type { TreeData } from '@finos/legend-art';
import { type FileSystemTreeNodeData } from './utils/FileSystemTreeUtils.js';
import { type PackageableElement, ROOT_PACKAGE_NAME, Package, type Class, type RelationalDatabaseConnection, type Database } from '@finos/legend-graph';
import { DatabaseBuilderWizardState } from './editor-state/element-editor-state/connection/DatabaseBuilderWizardState.js';
import { DatabaseModelBuilderState } from './editor-state/element-editor-state/connection/DatabaseModelBuilderState.js';
export declare enum ExplorerTreeRootPackageLabel {
    FILE_GENERATION = "generated-files",
    MODEL_GENERATION = "generated-models",
    SYSTEM = "system",
    PROJECT_DEPENDENCY = "dependencies"
}
export declare class ExplorerTreeState {
    readonly editorStore: EditorStore;
    readonly buildState: ActionState;
    treeData?: TreeData<PackageTreeNodeData> | undefined;
    generationTreeData?: TreeData<PackageTreeNodeData> | undefined;
    systemTreeData?: TreeData<PackageTreeNodeData> | undefined;
    legalTreeData?: TreeData<PackageTreeNodeData> | undefined;
    dependencyTreeData?: TreeData<PackageTreeNodeData> | undefined;
    selectedNode?: PackageTreeNodeData | undefined;
    artifactsGenerationTreeData?: TreeData<FileSystemTreeNodeData> | undefined;
    elementToRename?: PackageableElement | undefined;
    classToGenerateSampleData?: Class | undefined;
    databaseBuilderState: DatabaseBuilderWizardState | undefined;
    databaseModelBuilderState: DatabaseModelBuilderState | undefined;
    constructor(editorStore: EditorStore);
    getTreeData(rootPackageName?: ROOT_PACKAGE_NAME): TreeData<PackageTreeNodeData>;
    getSelectedNodePackage(): Package;
    setTreeData(data: TreeData<PackageTreeNodeData>): void;
    setGenerationTreeData(data: TreeData<PackageTreeNodeData>): void;
    setSystemTreeData(data: TreeData<PackageTreeNodeData>): void;
    setLegalTreeData(data: TreeData<PackageTreeNodeData>): void;
    setDependencyTreeData(data: TreeData<PackageTreeNodeData>): void;
    setArtifactsGenerationTreeData(data: TreeData<FileSystemTreeNodeData>): void;
    setElementToRename(val: PackageableElement | undefined): void;
    setClassToGenerateSampleData(val: Class | undefined): void;
    setDatabaseBuilderState(val: DatabaseBuilderWizardState | undefined): void;
    buildDatabase(val: RelationalDatabaseConnection, isReadOnly: boolean): void;
    setDatabaseModelBuilderState(val: DatabaseModelBuilderState | undefined): void;
    buildDatabaseModels(val: Database, isReadOnly: boolean): void;
    setSelectedNode(node: PackageTreeNodeData | undefined): void;
    build(): void;
    buildTreeInTextMode(): void;
    buildImmutableModelTrees(): void;
    openExplorerTreeNodes(mainTreeOpenedNodeIds: string[], generationTreeOpenedNodeIds: string[], selectedNodeId: string | undefined): void;
    /**
     * FIXME: this method should be replaced altogether as this could potentially cause memory leak when we `replace` the graph
     * When we refresh the graph (after compilation in text mode for example), we want to reprocess the app to
     * preserve the status of the explorer tree (opening nodes, selected nodes, etc.)
     *
     * @risk memory-leak
     */
    reprocess(): void;
    onTreeNodeSelect: (node: PackageTreeNodeData, treeData: TreeData<PackageTreeNodeData>, rootPackageName?: ROOT_PACKAGE_NAME) => void;
    /**
     * Given an element we open the node depending on what package tree corresponds to it
     */
    openNode(element: PackageableElement): void;
    getArtifactsGenerationTreeData(): TreeData<FileSystemTreeNodeData>;
}
//# sourceMappingURL=ExplorerTreeState.d.ts.map