import type { EPostMessageType, EToolsKey, EventMessageType } from "../core/enum";
import type { ShapeOptions } from "../core/tools";
import type { IUpdateNodeOpt, IworkId } from "../core/types";
import type { _ObjectTrue, EmitEventType } from "../plugin/types";
export declare type DiffOneView<ISerializableStorageViewData> = {
    oldValue?: ISerializableStorageViewData;
    newValue?: ISerializableStorageViewData;
};
export declare type DiffOneScenePath<ISerializableStorageScenePathData> = {
    oldValue?: ISerializableStorageScenePathData;
    newValue?: ISerializableStorageScenePathData;
    viewId: string;
};
export declare type DiffOneData<ISerializableStorageData> = {
    oldValue: ISerializableStorageData;
    newValue: ISerializableStorageData;
    viewId: string;
    scenePath: string;
};
export declare type DiffView<ISerializableStorageViewData> = {
    [K in keyof ISerializableStorageViewData]?: DiffOneView<ISerializableStorageViewData[K]>;
};
export declare type DiffScenePath<ISerializableStorageScenePathData> = {
    [K in keyof ISerializableStorageScenePathData]?: DiffOneScenePath<ISerializableStorageScenePathData[K]>;
};
export declare type DiffData<ISerializableStorageData> = {
    [K in keyof ISerializableStorageData]?: DiffOneData<ISerializableStorageData[K]>;
};
export declare type Diff = {
    diffData?: DiffData<ISerializableStorageData>;
    diffScenePath?: DiffScenePath<ISerializableStorageScenePathData>;
    diffView?: DiffView<ISerializableStorageViewData>;
};
export type IStorageValueItem = Partial<INormalPushMsg>;
export interface INormalPushMsg {
    workId?: IworkId;
    toolsType?: EToolsKey;
    opt?: ShapeOptions;
    uid?: string;
    taskId?: number;
    namespace?: string;
    op?: number[];
    ops?: string;
    index?: number;
    w?: number;
    h?: number;
    type?: EPostMessageType;
    removeIds?: Array<string>;
    updateNodeOpt?: IUpdateNodeOpt;
    selectIds?: Array<string>;
    emitEventType?: EmitEventType;
    /** 是否垂直同步 */
    isSync?: boolean;
    viewId?: string;
    scenePath?: string;
    isActive?: string;
}
export interface INormalStorageData {
    [key: string]: IStorageValueItem | undefined;
}
export type BaseCollectorReducerAction = INormalPushMsg & Pick<INormalPushMsg, 'type'>;
export interface ISerializableStorageData {
    [key: string]: BaseCollectorReducerAction | undefined;
}
export type PageId = string;
export type ViewId = string;
export type WorkId = string;
export type ScenePath = string;
export type Uid = string | 'localSelf';
export interface BaseEventCollectorReducerAction {
    type?: EventMessageType;
    uid?: string;
    memberId?: number;
    op?: Array<number | undefined>;
    isHide?: boolean;
    isSync?: boolean;
    viewId?: ViewId;
}
export interface ISerializableEventData {
    [key: WorkId]: Array<BaseEventCollectorReducerAction | undefined> | undefined;
}
export interface ISerializableStorageViewData {
    [key: ViewId]: ISerializableStorageScenePathData;
}
export interface ISerializableStorageScenePathData {
    [key: ScenePath]: ISerializableStorageData;
}
export type ISerializableAuthRenderItemType = {
    /** 可读用户组,  如果是true, 则为所有用户笔记可渲染 */
    render?: _ObjectTrue;
    /** 可隐藏用户组 如果是true, 则为所有用户笔记可隐藏 */
    hide?: _ObjectTrue;
    /** 可移除笔记用户组 如果是true, 则为所有用户笔记可移除 */
    clear?: _ObjectTrue;
};
export type ISerializableAuthRenderDataType = {
    [key: ViewId]: ISerializableAuthRenderItemType;
};
export type ISerializableAuthData = {
    /** viewid区分,用户显示笔记权限 */
    renderAuth?: ISerializableAuthRenderDataType;
    /** viewid区分,用户显示笔记权限 */
    pageAuth?: ISerializableStorageRenderViewsData;
};
export type ISerializableAuthRenderItemTypeKey = keyof ISerializableAuthRenderItemType;
export declare type DiffAuthRender = {
    [K in keyof ISerializableAuthRenderDataType]?: DiffOneRender;
};
export declare type DiffOneRender = {
    oldValue?: ISerializableAuthRenderItemType;
    newValue?: ISerializableAuthRenderItemType;
};
export type ISerializableStorageRenderViewsData = {
    [key: ViewId]: ISerializableStorageRenderScenesData;
};
export type ISerializableStorageRenderScenesData = {
    [key: ScenePath]: ISerializableStorageRenderPagesData;
};
export type ISerializableStorageRenderPagesData = {
    render: Uid;
    pages: ISerializableStorageRenderElementIdsData;
};
export type ISerializableStorageRenderElementIdsData = {
    [key: PageId]: ISerializableStorageRenderElementIdData;
};
export type ISerializableStorageRenderElementIdData = {
    [key: WorkId]: true;
};
export declare type DiffAuthPage = {
    [K in keyof ISerializableStorageRenderViewsData]?: DiffOnePage;
};
export declare type DiffOnePage = {
    oldValue?: ISerializableStorageRenderScenesData;
    newValue?: ISerializableStorageRenderScenesData;
};
