import type { CSSResultGroup } from 'lit'; import DSATreeItem from '../tree-item/tree-item'; import { ShoelaceElement } from '../../internal/shoelace-element'; /** * @summary 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. * @documentation https://dsa.service-public-autonomie.fr/latest/librairie-webcomponents/arborescence/arborescence-tree/web-zY2XPWn5 * * @event {{ selection: DSATreeItem[] }} dsa-selection-change - Emitted when a tree item is selected or deselected. * * @slot - The default slot. * * @csspart base - The component's base wrapper. */ export default class DSATree extends ShoelaceElement { static styles: CSSResultGroup; defaultSlot: HTMLSlotElement; /** * 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' | 'parent'; /** * Disables checkbox synchronization between parent and child nodes when the tree's selection mode is `multiple`. */ disableCheckboxSync: boolean; private lastFocusedItem; private mutationObserver; private clickTarget; connectedCallback(): Promise; disconnectedCallback(): void; private initTreeItem; private handleTreeChanged; private selectItem; private getAllTreeItems; private focusItem; private handleKeyDown; private handleClick; handleMouseDown(event: MouseEvent): void; private handleFocusOut; private handleFocusIn; private handleSlotChange; handleSelectionChange(): Promise; /** @internal Returns the list of tree items that are selected in the tree. */ get selectedItems(): DSATreeItem[]; /** @internal Gets focusable tree items in the tree. */ getFocusableItems(): DSATreeItem[]; render(): import("lit").TemplateResult<1>; } declare global { interface HTMLElementTagNameMap { 'dsa-tree': DSATree; } }