/**
 * 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 { type Clazz, type GeneratorFn } from '@finos/legend-shared';
import { type GenerationTypeOption } from './editor-state/GraphGenerationState.js';
import { type PackageableElement, type Store, ModelStore, type Connection, type PureModelConnection, Package, Class, Mapping, FlatData, Service, PackageableConnection, PackageableRuntime, FileGenerationSpecification, GenerationSpecification, FlatDataConnection, RelationalDatabaseConnection, DataElement, DataProduct } from '@finos/legend-graph';
import type { EmbeddedDataTypeOption } from './editor-state/element-editor-state/data/DataEditorState.js';
import { type PackageableElementOption } from '@finos/legend-lego/graph-editor';
export declare const CUSTOM_LABEL = "(custom)";
export type RuntimeOption = {
    label: string;
    value: PackageableRuntime | undefined;
};
export declare const resolvePackageAndElementName: (_package: Package, isPackageRoot: boolean, name: string) => [string, string];
export declare const handlePostCreateAction: (element: PackageableElement, editorStore: EditorStore) => Promise<void>;
export declare abstract class NewElementDriver<T extends PackageableElement> {
    editorStore: EditorStore;
    constructor(editorStore: EditorStore);
    abstract get isValid(): boolean;
    abstract createElement(name: string): T;
}
export declare enum NewRuntimeType {
    LEGACY = "LEGACY",
    LAKEHOUSE = "LAKEHOUSE"
}
export declare class NewPackageableRuntimeDriver extends NewElementDriver<PackageableRuntime> {
    mapping?: Mapping | undefined;
    type: NewRuntimeType;
    constructor(editorStore: EditorStore);
    setType(val: NewRuntimeType): void;
    setMapping(mapping: Mapping): void;
    get isValid(): boolean;
    createElement(name: string): PackageableRuntime;
}
export declare abstract class NewConnectionValueDriver<T extends Connection> {
    editorStore: EditorStore;
    constructor(editorStore: EditorStore);
    abstract get isValid(): boolean;
    abstract getConnectionType(): string;
    abstract createConnection(store: Store): T;
}
export declare enum CONNECTION_TYPE {
    PURE_MODEL_CONNECTION = "MODEL_CONNECTION",
    FLAT_DATA_CONNECTION = "FLAT_DATA_CONNECTION",
    RELATIONAL_CONNECTION = "RELATIONAL_CONNECTION"
}
export declare class NewPureModelConnectionDriver extends NewConnectionValueDriver<PureModelConnection> {
    class?: Class | undefined;
    constructor(editorStore: EditorStore);
    setClass(_class: Class): void;
    get isValid(): boolean;
    getConnectionType(): string;
    createConnection(store: ModelStore): PureModelConnection;
}
export declare class NewFlatDataConnectionDriver extends NewConnectionValueDriver<FlatDataConnection> {
    constructor(editorStore: EditorStore);
    get isValid(): boolean;
    getConnectionType(): string;
    createConnection(store: FlatData): FlatDataConnection;
}
export declare const DEFAULT_H2_SQL = "-- loads sample data for getting started. See https://github.com/pthom/northwind_psql for more info\n call loadNorthwindData()";
export declare class NewRelationalDatabaseConnectionDriver extends NewConnectionValueDriver<RelationalDatabaseConnection> {
    constructor(editorStore: EditorStore);
    get isValid(): boolean;
    getConnectionType(): string;
    createConnection(store: Store): RelationalDatabaseConnection;
}
export declare class NewPackageableConnectionDriver extends NewElementDriver<PackageableConnection> {
    store: Store;
    newConnectionValueDriver: NewConnectionValueDriver<Connection> | undefined;
    constructor(editorStore: EditorStore);
    geDriverConnectionType(): string;
    changeConnectionState(val: string): void;
    getNewConnectionValueDriverBasedOnStore(store: Store): NewConnectionValueDriver<Connection> | undefined;
    setStore(store: Store): void;
    get isValid(): boolean;
    createElement(name: string): PackageableConnection;
}
export declare class NewLakehouseDataProductDriver extends NewElementDriver<DataProduct> {
    title: string;
    modeled: boolean;
    constructor(editorStore: EditorStore);
    get isValid(): boolean;
    setTitle(val: string): void;
    setModeled(val: boolean): void;
    createElement(name: string): DataProduct;
}
export declare class NewServiceDriver extends NewElementDriver<Service> {
    mappingOption?: PackageableElementOption<Mapping> | undefined;
    runtimeOption: RuntimeOption;
    constructor(editorStore: EditorStore);
    setMappingOption(val: PackageableElementOption<Mapping> | undefined): void;
    setRuntimeOption(val: RuntimeOption): void;
    get compatibleMappingRuntimes(): PackageableRuntime[];
    get runtimeOptions(): RuntimeOption[];
    get isValid(): boolean;
    createElement(name: string): Service;
}
export declare class NewFileGenerationDriver extends NewElementDriver<FileGenerationSpecification> {
    typeOption?: GenerationTypeOption | undefined;
    constructor(editorStore: EditorStore);
    setTypeOption(typeOption: GenerationTypeOption | undefined): void;
    get isValid(): boolean;
    createElement(name: string): FileGenerationSpecification;
}
export declare class NewGenerationSpecificationDriver extends NewElementDriver<GenerationSpecification> {
    constructor(editorStore: EditorStore);
    get isValid(): boolean;
    createElement(name: string): GenerationSpecification;
}
export declare class NewDataElementDriver extends NewElementDriver<DataElement> {
    embeddedDataOption?: EmbeddedDataTypeOption | undefined;
    constructor(editorStore: EditorStore);
    setEmbeddedDataOption(typeOption: EmbeddedDataTypeOption | undefined): void;
    createElement(name: string): DataElement;
    get isValid(): boolean;
}
export declare class NewElementState {
    editorStore: EditorStore;
    showModal: boolean;
    showType: boolean;
    type: string;
    _package?: Package | undefined;
    name: string;
    newElementDriver?: NewElementDriver<PackageableElement> | undefined;
    constructor(editorStore: EditorStore);
    get selectedPackage(): Package;
    get isValid(): boolean;
    setShowModal(val: boolean): void;
    setName(name: string): void;
    setShowType(showType: boolean): void;
    setNewElementDriver(newElementDriver?: NewElementDriver<PackageableElement>): void;
    setPackage(_package?: Package): void;
    getNewElementDriver<T extends NewElementDriver<PackageableElement>>(clazz: Clazz<T>): T;
    setElementType(newType: string): void;
    openModal(type?: string, _package?: Package): void;
    closeModal(): void;
    save(): GeneratorFn<void>;
    createElement(name: string): PackageableElement;
}
//# sourceMappingURL=NewElementState.d.ts.map