import { Key } from 'react-aria-components';
/**
 * A tree node. Identity is `id`; a `children` array marks the node as a
 * container. Extend this with your own fields and pass a `renderNode`.
 */
export interface TreeNode {
    id: string;
    children?: TreeNode[];
}
/**
 * A node as held by the tree state — the original `value` plus its resolved
 * `children`. Structurally a subset of React Stately's internal tree node, so
 * we avoid depending on an unexported type.
 */
export interface TreeStateItem<T extends TreeNode> {
    key: Key;
    value: T;
    children: readonly TreeStateItem<T>[] | null;
}
export interface UseSortableTreeOptions<T extends TreeNode> {
    items: T[];
    /** Called with the new nested data after any reorder/reparent. */
    onChange?: (items: T[]) => void;
    /** Whether a node may accept children dropped onto it. Default: always. */
    canHaveChildren?: (node: T) => boolean;
    /** Plain-text label for the drag preview. Defaults to the node id. */
    getLabel?: (node: T) => string;
}
/**
 * State + drag-and-drop wiring for {@link Tree}. Wraps React Stately's
 * `useTreeData` (reorder/reparent operations) and React Aria's
 * `useDragAndDrop` (pointer + keyboard DnD). Kept separate so the tree can be
 * driven headlessly or rendered by a different shell.
 *
 * @beta Prop shape may change before release.
 */
export declare function useSortableTree<T extends TreeNode>(options: UseSortableTreeOptions<T>): {
    tree: import('react-aria-components').TreeData<T>;
    dragAndDropHooks: import('react-aria-components').DragAndDropHooks<object>;
};
//# sourceMappingURL=useSortableTree.d.ts.map