import{type PropertyValues,type TemplateResult}from'lit';import{LyraElement,type LyraEventDetailSnapshot}from'../../../internal/lyra-element.js';import type{LyraAccordionItem}from'./accordion-item.class.js';import type{LyraAccordionAppearance,LyraAccordionHeadingLevel,LyraAccordionIconPlacement}from'./accordion-types.js';export type LyraAccordionMode='single'|'single-collapsible'|'multiple';export interface LyraAccordionEventDetail{readonly item:LyraAccordionItem;}export interface LyraAccordionEventMap{'lr-expand':CustomEvent>;'lr-after-expand':CustomEvent>;'lr-collapse':CustomEvent>;'lr-after-collapse':CustomEvent>;'lr-toggle-request':CustomEvent>;} /** * `` — coordinates accessible, vertically stacked expandable sections. * * `mode="multiple"` allows any number of items to expand. `single` permits at most one and keeps * the active item open when it is activated again. `single-collapsible` also permits at most one, * but allows all items to be collapsed. * * Only direct `` children are coordinated. Direct `` panels were * accepted before 9.0.0 and no longer are: migrate `summary` to `label`, `open` to `expanded`, and * `show()`/`hide()` to `expand()`/`collapse()`. A `` slotted into an accordion today is * ordinary content that owns its own disclosure lifecycle -- the group does not apply its * presentation, single-panel invariant, roving keyboard model, or lifecycle to it. * * @customElement lr-accordion * @slot - Direct `` elements. * @event lr-expand - Emitted before a direct item expands. `detail: { item }`. Cancelable. Nested * groups emit the same name, with a `detail.item` of their own; handle it as this group's event * only when `event.target === event.currentTarget` (see `lr-toggle-request`). * @event lr-after-expand - Emitted after a direct item finishes expanding. `detail: { item }`. * Nested groups emit the same name, with a `detail.item` of their own; handle it as this * group's event only when `event.target === event.currentTarget` (see `lr-toggle-request`). * @event lr-collapse - Emitted before a direct item collapses. `detail: { item }`. Cancelable. * Nested groups emit the same name, with a `detail.item` of their own; handle it as this * group's event only when `event.target === event.currentTarget` (see `lr-toggle-request`). * @event lr-after-collapse - Emitted after a direct item finishes collapsing. `detail: { item }`. * Nested groups emit the same name, with a `detail.item` of their own; handle it as this * group's event only when `event.target === event.currentTarget` (see `lr-toggle-request`). * @event lr-toggle-request - Emitted alongside `lr-expand`/`lr-collapse` for the same proposed * transition, with the direction in the detail instead of the event name -- the same * `{ collapsed }` shape `` and `` use for their own * `lr-toggle-request`, plus `item` to identify which child is proposed to change. * `detail: { collapsed, item }`. Cancelable; a listener calling `preventDefault()` on either * `lr-toggle-request` or the matching `lr-expand`/`lr-collapse` vetoes the transition, and both * always fire so a listener on one name never misses a transition the other name already * vetoed. * * **A nested group's events are not scoped to it, so filter by target.** Every accordion event * bubbles and is composed, so an inner `` slotted inside an outer item sends its * own `lr-expand`, `lr-collapse`, `lr-toggle-request`, `lr-after-expand` and `lr-after-collapse` * straight through the outer group. A listener bound directly on the outer `` * therefore also receives the inner group's — and their `detail.item` is an item of the inner * group, so an outer handler that looks that item up among its own children finds nothing, or * acts on a panel it does not own. Coordination itself is already scoped: an outer group never * applies its single-panel invariant, roving keyboard model, or lifecycle to an inner group's * items. It is only the listener that needs the guard, the same one `` and * `` document for their own events: * * ```html * * * * Inner content. * * * * * ``` * @csspart base - The accordion wrapper. * @cssprop [--lr-accordion-outlined-bg=var(--lr-color-surface)] - Outlined group background. * @cssprop [--lr-accordion-outlined-border-color=var(--lr-color-border)] - Outlined border color. * @cssprop [--lr-accordion-filled-bg=var(--lr-color-surface-raised)] - Filled group background. * @cssprop [--lr-accordion-filled-border-color=transparent] - Filled border color. * @cssprop [--lr-accordion-filled-outlined-bg=var(--lr-color-surface-raised)] - Filled-outlined * group background. * @cssprop [--lr-accordion-filled-outlined-border-color=var(--lr-color-border)] - Filled-outlined * border color. * @status stable * @since 4.0.0 */ export declare class LyraAccordion extends LyraElement{#private;protected static readonly identityEventDetailProperties:Readonly<{'lr-expand':readonly string[];'lr-after-expand':readonly string[];'lr-collapse':readonly string[];'lr-after-collapse':readonly string[];'lr-toggle-request':readonly string[];}>;protected static readonly immutableEventDetails:readonly string[];static styles:import("lit").CSSResultGroup[];private readonly panels;private itemsSlot?; /** * Controls whether one or multiple items can be expanded. * @default 'multiple' */ get mode():LyraAccordionMode;set mode(next:LyraAccordionMode); /** Icon position applied to direct accordion items. */ iconPlacement:LyraAccordionIconPlacement; /** Heading level applied to direct items. Values other than 1–6 and `none` use h3. */ headingLevel:LyraAccordionHeadingLevel; /** Visual treatment applied to the group and its direct items. */ appearance:LyraAccordionAppearance;connectedCallback():void;disconnectedCallback():void;protected firstUpdated(changed:PropertyValues):void;protected updated(changed:PropertyValues):void; /** Expand every direct enabled item. No-op outside `multiple` mode. */ expandAll():void; /** Collapse every direct expanded item. */ collapseAll():void;private handleFocusIn;private handleKeyDown;render():TemplateResult;}declare global{interface HTMLElementTagNameMap{'lr-accordion':LyraAccordion;}}