import { ComponentSchema } from '@subscan/widget-core';
import { RegistryInterface, StateManagerInterface } from '@subscan/widget-runtime';
import { EventBusType } from './eventBus';
import { AppStorage } from './AppStorage';
import type { SchemaValidator, ValidateErrorResult } from '../validator';
import { DataSourceType } from '../constants/dataSource';
import { ExplorerMenuTabs, ToolMenuTabs } from '../constants/enum';
import { AppModelManager } from '../operations/AppModelManager';
import type { Metadata } from '@subscan/widget-core';
declare type EditingTarget = {
    kind: 'app' | 'module';
    version: string;
    name: string;
    spec?: {};
    metadata?: Metadata;
};
export declare class EditorStore {
    private eventBus;
    private registry;
    private stateManager;
    appStorage: AppStorage;
    private appModelManager;
    globalDependencies: Record<string, unknown>;
    components: ComponentSchema[];
    _selectedComponentId: string;
    _dragOverComponentId: string;
    hoverComponentId: string;
    explorerMenuTab: ExplorerMenuTabs;
    toolMenuTab: ToolMenuTabs;
    validateResult: ValidateErrorResult[];
    currentEditingTarget: EditingTarget;
    eleMap: Map<string, HTMLElement>;
    isDraggingNewComponent: boolean;
    currentComponentsVersion: number;
    lastSavedComponentsVersion: number;
    schemaValidator?: SchemaValidator;
    activeDataSourceId: string | null;
    constructor(eventBus: EventBusType, registry: RegistryInterface, stateManager: StateManagerInterface, appStorage: AppStorage, appModelManager: AppModelManager);
    get resolvedComponents(): {
        topLevelComponents: ComponentSchema<Record<string, unknown>>[];
        childrenMap: import("../utils/resolveApplicationComponents").ChildrenMap;
    };
    get app(): import("@subscan/widget-core").Application;
    get modules(): import("@subscan/widget-core").Module[];
    get rawModules(): import("@subscan/widget-core").Module[];
    get selectedComponent(): ComponentSchema<Record<string, unknown>> | undefined;
    get selectedComponentId(): string;
    get dragOverComponentId(): string;
    get isSaved(): boolean;
    get originComponents(): ComponentSchema[];
    get dataSources(): Record<string, ComponentSchema[]>;
    get activeDataSource(): ComponentSchema | null;
    get activeDataSourceType(): DataSourceType | null;
    clearSunmaoGlobalState(): void;
    saveCurrentComponents(): void;
    updateCurrentEditingTarget: (kind: 'app' | 'module', version: string, name: string, spec?: EditingTarget['spec'], metadata?: EditingTarget['metadata']) => void;
    setSelectedComponentId: (val: string) => void;
    setComponents: (val: ComponentSchema[]) => void;
    setDragOverComponentId: (val: string) => void;
    setHoverComponentId: (val: string) => void;
    setCurrentComponentsVersion: (val: number) => void;
    setLastSavedComponentsVersion: (val: number) => void;
    setActiveDataSourceId: (dataSourceId: string | null) => void;
    setValidateResult: (validateResult: ValidateErrorResult[]) => void;
    createDataSource: (type: DataSourceType, defaultProperties?: Record<string, any>) => void;
    removeDataSource: (dataSource: ComponentSchema) => void;
    changeDataSourceName: (dataSource: ComponentSchema, name: string) => void;
    setExplorerMenuTab: (val: ExplorerMenuTabs) => void;
    setToolMenuTab: (val: ToolMenuTabs) => void;
    setIsDraggingNewComponent: (val: boolean) => void;
    setSchemaValidator: (val: SchemaValidator) => void;
    setModuleDependencies: (exampleProperties?: Record<string, unknown> | undefined) => void;
}
export {};
