import type { IComponentInstance, IPageConfig, IDataSource } from '@mtbird/shared';
export interface IState {
    componentMap: Map<string, IComponentInstance>;
    pageConfig: IPageConfig;
    currentComponent: IComponentInstance | null;
    schemaDataSource: IDataSource;
    pageDataSource: IDataSource;
    pageList: IPageConfig[];
}
export interface IAction {
    setCurrentComponent: (currentComponent: IComponentInstance | IComponentInstance[]) => void;
    onSave: (page: IPageConfig) => void;
    onChange: (keyPath: string, value: any) => void;
    onBatchChange: (record: Map<string, Record<string, any>>) => void;
    onSelect: (component: IComponentInstance) => void;
    onSelectContinue: (component: IComponentInstance | Array<IComponentInstance>) => void;
    group: (components: Array<IComponentInstance>) => void;
    ungroup: (component: IComponentInstance) => void;
    addComponent: (component: IComponentInstance, parentComponentId?: string) => void;
    deleteComponent: () => void;
    publishPage: () => void;
    goUpper: () => void;
    goLower: () => void;
    copyComponent: () => void;
    moveComponent: (leftOffset: number, topOffset: number) => void;
}
export interface IContext {
    state: IState;
    actions: IAction;
}
export default IContext;
