/**
 * 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 { Entity } from '@finos/legend-storage';
import type { TreeData, TreeNodeData } from '@finos/legend-art';
import { type GeneratorFn, ActionState } from '@finos/legend-shared';
import type { EditorStore } from '../../../EditorStore.js';
import { TDSExecutionResult, type Schema, Table, type TabularFunction, RelationalDatabaseConnection, Column, Database } from '@finos/legend-graph';
export declare abstract class DatabaseSchemaExplorerTreeNodeData implements TreeNodeData {
    isOpen?: boolean | undefined;
    id: string;
    label: string;
    parentId?: string | undefined;
    childrenIds?: string[] | undefined;
    isChecked: boolean;
    constructor(id: string, label: string, parentId: string | undefined);
    setChecked(val: boolean): void;
}
export declare class DatabaseSchemaExplorerTreeSchemaNodeData extends DatabaseSchemaExplorerTreeNodeData {
    schema: Schema;
    constructor(id: string, schema: Schema);
}
export declare class DatabaseSchemaExplorerTreeTableNodeData extends DatabaseSchemaExplorerTreeNodeData {
    parentId: string;
    owner: Schema;
    table: Table;
    constructor(id: string, parentId: string, owner: Schema, table: Table);
}
export declare class DatabaseSchemaExplorerTreeTabularFunctionNodeData extends DatabaseSchemaExplorerTreeNodeData {
    parentId: string;
    owner: Schema;
    tabularFunction: TabularFunction;
    constructor(id: string, parentId: string, owner: Schema, tabularFunction: TabularFunction);
}
export declare class DatabaseSchemaExplorerTreeColumnNodeData extends DatabaseSchemaExplorerTreeNodeData {
    parentId: string;
    owner: Table | TabularFunction;
    column: Column;
    constructor(id: string, parentId: string, owner: Table | TabularFunction, column: Column);
}
export interface DatabaseExplorerTreeData extends TreeData<DatabaseSchemaExplorerTreeNodeData> {
    database: Database;
}
export declare const DEFAULT_DATABASE_PATH = "store::MyDatabase";
export declare class DatabaseSchemaExplorerState {
    readonly editorStore: EditorStore;
    readonly connection: RelationalDatabaseConnection;
    database: Database;
    targetDatabasePath: string;
    makeTargetDatabasePathEditable?: boolean;
    isGeneratingDatabase: boolean;
    isUpdatingDatabase: boolean;
    treeData?: DatabaseExplorerTreeData | undefined;
    previewer: TDSExecutionResult | undefined;
    previewDataState: ActionState;
    constructor(editorStore: EditorStore, connection: RelationalDatabaseConnection);
    get isCreatingNewDatabase(): boolean;
    setMakeTargetDatabasePathEditable(val: boolean): void;
    get resolveDatabasePackageAndName(): [string, string];
    setTargetDatabasePath(val: string): void;
    setTreeData(builderTreeData?: DatabaseExplorerTreeData): void;
    onNodeSelect(node: DatabaseSchemaExplorerTreeNodeData, treeData: DatabaseExplorerTreeData): GeneratorFn<void>;
    getChildNodes(node: DatabaseSchemaExplorerTreeNodeData, treeData: DatabaseExplorerTreeData): DatabaseSchemaExplorerTreeNodeData[] | undefined;
    toggleCheckedNode(node: DatabaseSchemaExplorerTreeNodeData, treeData: DatabaseExplorerTreeData): void;
    fetchDatabaseMetadata(): GeneratorFn<void>;
    fetchSchemaMetadata(schemaNode: DatabaseSchemaExplorerTreeSchemaNodeData, treeData: DatabaseExplorerTreeData): GeneratorFn<void>;
    fetchTableMetadata(tableNode: DatabaseSchemaExplorerTreeTableNodeData, treeData: DatabaseExplorerTreeData): GeneratorFn<void>;
    fetchTabularFunctionMetadata(tabularFunctionNode: DatabaseSchemaExplorerTreeTabularFunctionNodeData, treeData: DatabaseExplorerTreeData): GeneratorFn<void>;
    private buildIntermediateDatabase;
    previewData(node: DatabaseSchemaExplorerTreeNodeData): GeneratorFn<void>;
    generateDatabase(): GeneratorFn<Entity>;
    updateDatabase(forceRename?: boolean): GeneratorFn<Database>;
    updateDatabaseAndGraph(): GeneratorFn<void>;
}
//# sourceMappingURL=DatabaseBuilderState.d.ts.map