import { Sensor } from '@chamn/layout';
import { CPage } from '@chamn/model';
import { default as React } from 'react';
import { TreeNodeData } from './dataStruct';
import { DesignerExport } from '../../../Designer/type';
export declare enum DragState {
    DRAGGING = "DRAGGING",
    NORMAL = "NORMAL"
}
export type ContextState = {
    treeData: TreeNodeData[];
    currentSelectNodeKeys: string[];
    expandKeys: string[];
    multiSelect: boolean;
    dragState: DragState;
    pageModel: CPage | null;
};
export type CTreeContextData = {
    sensor?: Sensor;
    state: ContextState;
    updateState: (state: Partial<ContextState>) => void;
    onSelectNode: (params: {
        keys: string[];
        node: TreeNodeData;
    }) => Promise<boolean | undefined>;
    onDeleteNode: (id: string) => Promise<boolean | undefined>;
    onCopyNode: (id: string) => Promise<boolean | undefined>;
    getDesignerHandler?: () => Promise<DesignerExport>;
};
export declare const CTreeContext: React.Context<CTreeContextData>;
