import React from "react";
export interface TreeNode<T = any> {
    key: string;
    label: string;
    icon?: React.ReactNode;
    data?: T;
    /** Indicates if the node is expandable (has or can have children) */
    hasChildren?: boolean;
    /** Indicates if the node can be dragged */
    isDraggable?: boolean;
    /**
     * If present, contains the node's children.
     * Use undefined to signal that children have not yet been loaded.
     * Use null to signal that children are currently loading.
     */
    children?: TreeNode<T>[] | null;
}
export interface TreeProps<T = any> {
    /** Array of tree nodes */
    nodes: TreeNode<T>[];
    /** Keys of currently selected nodes */
    selectedKeys?: string[];
    /** Keys of expanded nodes */
    expandedKeys?: string[];
    /** Callback to render a single node (template) */
    renderNode: (node: TreeNode<T>, searchTerm?: string) => React.ReactNode;
    /** Called when a node's expand/collapse toggle is activated */
    onToggleExpand?: (key: string) => void;
    /** Called when a node is clicked for selection */
    onSelect?: (key: string, event: React.MouseEvent) => void;
    /**
     * Called during a drag over a drop zone between nodes.
     * @param parent The parent node of the current list (null for root level)
     * @param index The position where a new node would be inserted (0 = before first node)
     */
    onDragOverZone?: (parent: TreeNode<T> | null, index: number, event: React.DragEvent) => boolean;
    isValidDropZone?: (parent: TreeNode<T> | null, index: number) => boolean;
    /**
     * Called when an item is dropped into a drop zone between nodes.
     * @param parent The parent node of the current list (null for root level)
     * @param index The position where a new node should be inserted (0 = before first node)
     */
    onDrop?: (parent: TreeNode<T> | null, index: number, event: React.DragEvent) => void;
    isDragging?: boolean;
    onStartDrag?: (data: {
        node: TreeNode<T>;
        event: React.DragEvent<any>;
        isMultiSelect: boolean;
    }) => void;
    onDragEnd?: (event: React.DragEvent | null) => void;
    enableDragAndDrop?: boolean;
    /** Whether this tree renders/accepts internal drop targets. */
    enableDropTargets?: boolean;
    /** Cursor style used for tree rows. */
    nodeCursor?: "pointer" | "default";
    /** Whether selected rows get the default selected background treatment. */
    showSelectedBackground?: boolean;
    /**
     * Callback that notifies when a lazy load should occur.
     * When a node is toggled and its children haven't been loaded yet (i.e. undefined),
     * this callback is invoked so you can load the children asynchronously and update your tree model.
     */
    onLazyLoad?: (node: TreeNode<T>) => void;
    onDoubleClick?: (node: TreeNode<T>) => void;
    onContextMenu?: (node: TreeNode<T>, event: React.MouseEvent) => void;
    /** Whether to automatically scroll to the first selected node when selection changes */
    scrollToSelected?: boolean;
    /** Whether to enable keyboard search functionality */
    enableKeyboardSearch?: boolean;
    /** Time in ms before search is cleared (default: 1500) */
    searchClearDelay?: number;
    /** Whether to disable automatic selection when expanding nodes (even during search) */
    disableAutoSelectOnExpand?: boolean;
    /** Noun used in multi-select drag preview (e.g., "items", "components"). Default: "items" */
    multiDragNoun?: string;
    /** Whether to enable keyboard navigation (default: true) */
    enableKeyboardNavigation?: boolean;
    /** Called when keyboard navigation focus changes */
    onKeyboardNavigationChange?: (key: string) => void;
    /** Render content before the expand toggle (far left of each row) */
    renderNodePrefix?: (node: TreeNode<T>, depth: number) => React.ReactNode;
    /**
     * Override the expand/collapse toggle icon. The returned node is wrapped in
     * the existing toggle control (which handles rotation + click), so it only
     * needs to point right when collapsed. Default: a thin chevron.
     */
    renderToggleIcon?: (node: TreeNode<T>, isExpanded: boolean) => React.ReactNode;
    /**
     * Append extra classes to the whole node row (the `.tree-node` element).
     * Lets a consumer turn a row into a bordered "card" while still owning the
     * selected/drag-over visual states. Default: undefined (no change).
     */
    getRowClassName?: (node: TreeNode<T>, depth: number, state: {
        isSelected: boolean;
        isDragOver: boolean;
    }) => string | undefined;
    /**
     * When this returns true for a node, the default inner wrapper chrome
     * (border, padding, selected/drag-over background) is omitted so the row
     * styling from `getRowClassName` is the only visible treatment.
     */
    suppressDefaultNodeChrome?: (node: TreeNode<T>) => boolean;
}
export declare const highlightText: (text: string, searchTerm: string) => React.ReactNode;
export declare const PerfectTree: <T>({ nodes, selectedKeys, expandedKeys, renderNode, renderNodePrefix, renderToggleIcon, getRowClassName, suppressDefaultNodeChrome, onToggleExpand, onSelect, onDragOverZone, onDrop, isDragging, onStartDrag, onDragEnd, onLazyLoad, onDoubleClick, onContextMenu, enableDragAndDrop, enableDropTargets, nodeCursor, showSelectedBackground, isValidDropZone, scrollToSelected, enableKeyboardSearch, searchClearDelay, disableAutoSelectOnExpand, multiDragNoun, enableKeyboardNavigation, onKeyboardNavigationChange, }: TreeProps<T>) => import("react/jsx-runtime").JSX.Element;
declare const _default: typeof PerfectTree;
export default _default;
