import { type PropertyValues } from 'lit'; import { LuxenElement } from '../../shared/luxen-element.js'; /** Fired when a tree item is expanded. Bubbles; not composed. */ export declare class ExpandEvent extends Event { constructor(); } /** Fired when a tree item is collapsed. Bubbles; not composed. */ export declare class CollapseEvent extends Event { constructor(); } /** Fired when a lazy item is expanded for the first time. Bubbles; not composed. */ export declare class LazyLoadEvent extends Event { constructor(); } /** * Internal contract: a tree-item's checkbox toggle, bubbling to its ``. * Not part of the public API — consumers listen on `` for * `selection-change` instead. */ export declare class TreeItemSelectionToggleEvent extends Event { readonly item: TreeItem; readonly checked: boolean; constructor(item: TreeItem, checked: boolean); } declare global { interface GlobalEventHandlersEventMap { expand: ExpandEvent; collapse: CollapseEvent; 'lazy-load': LazyLoadEvent; } } /** * A node inside ``. Nested `` children become sub-nodes. * * @slot - Label content (kept to a single row). * @slot prefix - Leading content before the label (e.g. icon). * @slot suffix - Trailing content. * @slot expand-icon - Icon shown when the item is collapsed. * @slot collapse-icon - Icon shown when the item is expanded. * @slot content - Block content that belongs to the item but not to its header row (e.g. comment body, action bar). Hidden when a branch is collapsed. * * @csspart base - The item row. * @csspart expand-button - The chevron toggle area. * @csspart checkbox - The native checkbox input. * @csspart label - The label container. * @csspart branch - Wrapper around the content and children slots; carries the indent guide. * @csspart content - The content slot wrapper (block area between the row and the children). * @csspart children - The nested items container. * * @cssproperty [--_depth] - Internal depth index driving indentation. Set by ``. * * Layout tokens (`--chevron-size`, `--row-height`, `--row-padding-inline`, `--item-gap`) live on `` and cascade down — see its CSS custom properties. * * @event expand - Fired when the item is expanded. * @event collapse - Fired when the item is collapsed. * @event lazy-load - Fired when a lazy item is expanded for the first time. Consumers should append children and set `lazy=false`. * * @customElement l-tree-item */ export declare class TreeItem extends LuxenElement { static styles: import("lit").CSSResult[]; private _internals; private _childObserver?; /** Whether the item is expanded. */ accessor expanded: boolean; /** Whether the item is selected. */ accessor selected: boolean; /** Whether the checkbox is indeterminate (some descendants selected). */ accessor indeterminate: boolean; /** Whether the item is disabled. */ accessor disabled: boolean; /** Marks this item as having children that will be loaded on first expand. */ accessor lazy: boolean; /** Whether the item is currently loading (shows a spinner). */ accessor loading: boolean; /** Set by ``: whether a checkbox is shown. */ set showCheckbox(value: boolean); get showCheckbox(): boolean; private _showCheckbox; /** Set by ``: depth of the item in the tree (0 = root). */ set depth(value: number); get depth(): number; private _depth; /** * Set by ``: ARIA position within the tree. `level` is 1-based depth, * `posInSet`/`setSize` describe the item's rank among its siblings. These let * screen readers announce "level 2, 3 of 5" even when `lazy` children keep the * full set out of the DOM. */ setPosition(level: number, posInSet: number, setSize: number): void; /** Whether this item has nested tree-item children. */ get hasChildren(): boolean; private _hasChildren; /** Returns the child `` elements directly under this one. */ getChildrenItems({ includeDisabled }?: { includeDisabled?: boolean | undefined; }): TreeItem[]; /** Returns true if this item has no expandable children. */ isLeaf(): boolean; /** Returns the text label of this item. */ getTextLabel(): string; connectedCallback(): void; disconnectedCallback(): void; updated(changed: PropertyValues): void; /** Leaf items omit `aria-expanded` entirely; branches reflect their state. */ private _reflectExpanded; /** * Write an ARIA state to BOTH ElementInternals (the semantic source, in the * accessibility tree) and a content attribute (so `[aria-*]` CSS / query / test * selectors keep matching — same belt-and-suspenders as the mirrored `role`). * A `null` value clears both. */ private _aria; private _setState; private _syncChildren; /** Toggle expand state. Opening a `lazy` item emits `lazy-load` (via `updated`). */ toggle(): void; private _onCheckboxChange; render(): import("lit").TemplateResult<1>; } //# sourceMappingURL=tree-item.d.ts.map