import { type ComponentPropsWithoutRef, type ReactNode } from "react";
export interface TreeNode {
    /** Stable identifier (unique within the tree). */
    id: string;
    /** Display label. */
    label: ReactNode;
    /** Optional leading icon. Distinct icons for expanded / collapsed
     * folders can be expressed via `iconExpanded`. */
    icon?: ReactNode;
    /** Override icon when expanded (e.g. open-folder glyph). */
    iconExpanded?: ReactNode;
    /** Optional trailing slot (badge, action, count). */
    trailing?: ReactNode;
    /** Children. Pass `undefined` for an unloaded branch (will trigger
     * `onLoadChildren` on first expand) vs `[]` for a known-empty leaf. */
    children?: TreeNode[];
    /** Disable interaction for this node. */
    disabled?: boolean;
    /**
     * Force-render as a non-leaf even when `children` is empty / undefined.
     * Useful for branches whose children will be lazy-loaded.
     */
    isBranch?: boolean;
}
export interface TreeViewProps extends Omit<ComponentPropsWithoutRef<"ul">, "onSelect" | "children"> {
    /** Tree data. */
    nodes: TreeNode[];
    /** Controlled selected node id. */
    selectedId?: string;
    /** Uncontrolled default selected node id. */
    defaultSelectedId?: string;
    /** Fires when the user selects a node. */
    onSelect?: (node: TreeNode) => void;
    /** Controlled set of expanded node ids. */
    expandedIds?: Set<string>;
    /** Uncontrolled initial expanded ids. */
    defaultExpandedIds?: string[];
    /** Fires when a node is expanded / collapsed. */
    onExpandedChange?: (expandedIds: Set<string>) => void;
    /**
     * Lazy-loader fired once when a branch with `children === undefined`
     * is expanded. Returns the children to render. While the promise
     * resolves, a "Loading…" placeholder shows in place of the children.
     */
    onLoadChildren?: (node: TreeNode) => Promise<TreeNode[]>;
    /** Visual size. Default `"md"`. */
    size?: "sm" | "md" | "lg";
    /** Show indent guide lines. Default `true`. */
    showGuides?: boolean;
    /** Disable the entire tree. */
    disabled?: boolean;
}
export declare const TreeView: import("react").ForwardRefExoticComponent<TreeViewProps & import("react").RefAttributes<HTMLUListElement>>;
//# sourceMappingURL=TreeView.d.ts.map