import { TreeViewItemId } from '@mui/x-tree-view/models'; import { TreeViewItemItemReorderingValidActions } from "./types.js"; import { RichTreeViewProStore } from "../../RichTreeViewProStore/RichTreeViewProStore.js"; export declare class TreeViewItemsReorderingPlugin { private store; constructor(store: RichTreeViewProStore); /** * Get the valid reordering action if a given item is the target of the ongoing reordering. * @param {TreeViewItemId} itemId The id of the item to get the action of. * @returns {TreeViewItemItemReorderingValidActions} The valid actions for the item. */ getDroppingTargetValidActions: (itemId: string) => TreeViewItemItemReorderingValidActions; /** * Start a reordering for the given item. * @param {TreeViewItemId} itemId The id of the item to start the reordering for. */ startDraggingItem: (itemId: string) => void; /** * Cancel the current reordering operation and reset the state. */ cancelDraggingItem: () => void; /** * Complete the reordering of a given item. * @param {TreeViewItemId} itemId The id of the item to complete the reordering for. */ completeDraggingItem: (itemId: string) => void; /** * Set the new target item for the ongoing reordering. * The action will be determined based on the position of the cursor inside the target and the valid actions for this target. * @param {object} params The params describing the new target item. * @param {TreeViewItemId} params.itemId The id of the new target item. * @param {TreeViewItemItemReorderingValidActions} params.validActions The valid actions for the new target item. * @param {number} params.targetHeight The height of the target item. * @param {number} params.cursorY The Y coordinate of the mouse cursor. * @param {number} params.cursorX The X coordinate of the mouse cursor. * @param {HTMLDivElement} params.contentElement The DOM element rendered for the content slot. */ setDragTargetItem: ({ itemId, validActions, targetHeight, cursorY, cursorX, contentElement }: { itemId: TreeViewItemId; validActions: TreeViewItemItemReorderingValidActions; targetHeight: number; cursorY: number; cursorX: number; contentElement: HTMLDivElement; }) => void; }