import { Reducer } from '@dineug/r-html';
import { EngineContext } from '../../context';
import { RootState } from '../../state';
import { LWW, ValuesType } from '../../../internal-types';
import { FocusType, MoveKey, SelectType } from './state';
export declare const ActionType: {
readonly changeHasHistory: "editor.changeHasHistory";
readonly selectAll: "editor.selectAll";
readonly unselectAll: "editor.unselectAll";
readonly select: "editor.select";
readonly changeViewport: "editor.changeViewport";
readonly clear: "editor.clear";
readonly loadJson: "editor.loadJson";
readonly initialClear: "editor.initialClear";
readonly initialLoadJson: "editor.initialLoadJson";
readonly focusTable: "editor.focusTable";
readonly focusColumn: "editor.focusColumn";
readonly focusTableEnd: "editor.focusTableEnd";
readonly focusMoveTable: "editor.focusMoveTable";
readonly editTable: "editor.editTable";
readonly editTableEnd: "editor.editTableEnd";
readonly selectAllColumn: "editor.selectAllColumn";
readonly drawStartRelationship: "editor.drawStartRelationship";
readonly drawStartAddRelationship: "editor.drawStartAddRelationship";
readonly drawEndRelationship: "editor.drawEndRelationship";
readonly drawRelationship: "editor.drawRelationship";
readonly hoverColumnMap: "editor.hoverColumnMap";
readonly hoverRelationshipMap: "editor.hoverRelationshipMap";
readonly changeOpenMap: "editor.changeOpenMap";
readonly dragstartColumn: "editor.dragstartColumn";
readonly dragendColumn: "editor.dragendColumn";
readonly sharedMouseTracker: "editor.sharedMouseTracker";
readonly validationIds: "editor.validationIds";
readonly getLWW: "editor.getLWW";
readonly mergeLWW: "editor.mergeLWW";
};
export type ActionType = ValuesType;
export type ActionMap = {
[ActionType.changeHasHistory]: {
hasUndo: boolean;
hasRedo: boolean;
};
[ActionType.selectAll]: void;
[ActionType.unselectAll]: void;
[ActionType.select]: Record;
[ActionType.changeViewport]: {
width: number;
height: number;
};
[ActionType.clear]: void;
[ActionType.loadJson]: {
value: string;
};
[ActionType.initialClear]: void;
[ActionType.initialLoadJson]: {
value: string;
};
[ActionType.focusTable]: {
tableId: string;
focusType?: FocusType;
};
[ActionType.focusColumn]: {
tableId: string;
columnId: string;
focusType: FocusType;
$mod: boolean;
shiftKey: boolean;
};
[ActionType.focusTableEnd]: void;
[ActionType.focusMoveTable]: {
moveKey: MoveKey;
shiftKey: boolean;
};
[ActionType.editTable]: void;
[ActionType.editTableEnd]: void;
[ActionType.selectAllColumn]: void;
[ActionType.drawStartRelationship]: {
relationshipType: number;
};
[ActionType.drawStartAddRelationship]: {
tableId: string;
};
[ActionType.drawEndRelationship]: void;
[ActionType.drawRelationship]: {
x: number;
y: number;
};
[ActionType.hoverColumnMap]: {
columnIds: string[];
};
[ActionType.hoverRelationshipMap]: {
relationshipIds: string[];
};
[ActionType.changeOpenMap]: Record;
[ActionType.dragstartColumn]: {
tableId: string;
columnIds: string[];
};
[ActionType.dragendColumn]: void;
[ActionType.sharedMouseTracker]: {
x: number;
y: number;
};
[ActionType.validationIds]: void;
[ActionType.getLWW]: void;
[ActionType.mergeLWW]: {
lww: LWW;
};
};
export type ReducerType = Reducer;