import type { ReactElement, HTMLAttributes, Ref } from "react";
import type SlTreeElement from "@shoelace-style/shoelace/dist/components/tree/tree.js";
import { SlSelectionChangeEvent } from "../events";
export type { SlTreeElement };
export type SlTreeSelectionChangeEventDetail = { selection: SlTreeItem[] };
export type SlTreeSelectionChangeEvent = SlSelectionChangeEvent<
SlTreeElement,
SlSelectionChangeEventDetail
>;
export interface SlTreeProps extends HTMLAttributes {
ref?: Ref;
/**
* The selection behavior of the tree. Single selection allows only one node to be selected at a time. Multiple
* displays checkboxes and allows more than one node to be selected. Leaf allows only leaf nodes to be selected.
*/
selection?: "single" | "multiple" | "leaf";
/**
* Emitted when a tree item is selected or deselected.
*/
onSlSelectionChange?: (event: SlTreeSelectionChangeEvent) => void;
/**
* Emitted when a tree item is selected or deselected.
*/
onSlSelectionChangeCapture?: (event: SlTreeSelectionChangeEvent) => void;
}
/**
* Trees allow you to display a hierarchical list of selectable [tree items](/components/tree-item). Items with children can be expanded and collapsed as desired by the user.
*/
export default function SlTree(
props: SlTreeProps,
): ReactElement;