import type { ApiClient } from '@riverbankcms/api/request';
import { createEditorReorderBlocksCommand } from '@riverbankcms/core';
import type { DragEndEvent } from '@dnd-kit/core';
import type { BlockItem } from '../types';
type UiStore = {
    getState: () => {
        history: {
            applyCommand?: (command: ReturnType<typeof createEditorReorderBlocksCommand>) => void;
        };
        structure?: {
            getList: () => readonly BlockItem[];
            replaceList?: (next: readonly BlockItem[]) => void;
        };
    };
    subscribe: (listener: () => void) => () => void;
};
export declare function useBlockReorder({ allowReordering, apiClient, siteId, pageId, blockList, setBlockList, onBlocksChange, setErrorMessage, uiStore, }: {
    allowReordering: boolean;
    apiClient: ApiClient;
    siteId: string;
    pageId: string;
    blockList: BlockItem[];
    setBlockList: (next: BlockItem[]) => void;
    onBlocksChange?: (blocks: BlockItem[]) => void;
    setErrorMessage: (msg: string | null) => void;
    uiStore?: UiStore | null;
}): {
    reorderId: string | null;
    handleMove: (blockId: string, direction: number) => void;
    onDragEnd: (event: DragEndEvent) => void;
};
export {};
