import type { CSSResultGroup, PropertyValueMap } from 'lit'; import DSAIcon from '../icon/icon'; import DSASpinner from '../spinner/spinner'; import '../../internal/components/checkbox-box/checkbox-box'; import { ShoelaceElement } from '../../internal/shoelace-element'; /** * @summary A tree item serves as a hierarchical node that lives inside a [tree](/components/tree). * @documentation https://dsa.service-public-autonomie.fr/latest/librairie-webcomponents/arborescence/element-d-arborescence-tree-item/web-TGBAXhUl * * @dependency dsa-checkbox * @dependency dsa-icon * @dependency dsa-spinner * * @event dsa-expand - Emitted when the tree item expands. * @event dsa-after-expand - Emitted after the tree item expands and all animations are complete. * @event dsa-collapse - Emitted when the tree item collapses. * @event dsa-after-collapse - Emitted after the tree item collapses and all animations are complete. * @event dsa-lazy-change - Emitted when the tree item's lazy state changes. * @event dsa-lazy-load - Emitted when a lazy item is selected. Use this event to asynchronously load data and append * items to the tree before expanding. After appending new items, remove the `lazy` attribute to remove the loading * state and update the tree. * * @slot - The default slot. */ export default class DSATreeItem extends ShoelaceElement { static styles: CSSResultGroup; static dependencies: { 'dsa-icon': typeof DSAIcon; 'dsa-spinner': typeof DSASpinner; }; static isTreeItem(node: Node): boolean; private readonly localize; indeterminate: boolean; isLeaf: boolean; loading: boolean; selectable: boolean; /** Expands the tree item. */ expanded: boolean; /** Draws the tree item in a selected state. */ selected: boolean; /** Disables the tree item. */ disabled: boolean; /** Enables lazy loading behavior. */ lazy: boolean; defaultSlot: HTMLSlotElement; childrenSlot: HTMLSlotElement; itemElement: HTMLDivElement; childrenContainer: HTMLDivElement; expandButtonSlot: HTMLSlotElement; connectedCallback(): void; firstUpdated(): void; private animateCollapse; private isNestedItem; private handleChildrenSlotChange; protected willUpdate(changedProperties: PropertyValueMap | Map): void; private animateExpand; handleLoadingChange(): void; handleDisabledChange(): void; handleSelectedChange(): void; handleExpandedChange(): void; handleExpandAnimation(): void; handleLazyChange(): void; /** Gets all the nested tree items in this node. */ getChildrenItems({ includeDisabled, }?: { includeDisabled?: boolean; }): DSATreeItem[]; render(): import("lit").TemplateResult<1>; } declare global { interface HTMLElementTagNameMap { 'dsa-tree-item': DSATreeItem; } }