import { UndoableReducerActions } from './UndoableReducer';
import { ReducerMiddlewareCallback } from '@plitzi/plitzi-ui/hooks/useReducerWithMiddleware';
import { SchemaReducerActions } from '@plitzi/sdk-schema/SchemaReducer';
import { Schema, Segment, Style } from '@plitzi/sdk-shared';
import { StyleReducerActions } from '@plitzi/sdk-style/StyleReducer';
import { SegmentsReducerActions } from '../Segments/SegmentsReducer';
import { ActionDispatch } from 'react';
export type UndoableItem<TState = any, TDispatchAction = any> = {
    action: TDispatchAction;
    dispatch: ActionDispatch<[action: TDispatchAction]>;
    nextState: TState;
    prevState: TState;
};
export type UndoableDispatch = ActionDispatch<[action: UndoableReducerActions]>;
export type UndoableContextValue = {
    canUndo: boolean;
    canRedo: boolean;
    dispatchUndoable: ActionDispatch<[action: UndoableReducerActions]>;
    undoableAddUndo: (prevState: UndoableItem['prevState'], action: UndoableItem['action'], nextState: UndoableItem['nextState'], dispatch: UndoableItem['dispatch']) => void;
    undoableUndo: () => void;
    undoableRedo: () => void;
    undoableClearHistory: () => void;
    undoableMiddleware: ReducerMiddlewareCallback<Schema | Style | Record<string, Segment>, [
        action: StyleReducerActions | SchemaReducerActions | SegmentsReducerActions
    ]>;
};
declare const UndoableContext: import('react').Context<UndoableContextValue>;
export default UndoableContext;
