import { PropertyValues } from 'lit'; import { SlotPresenceController } from '../../controllers/slot-presence-controller/index.js'; import { SpectrumElement } from '../../element/index.js'; import { AccordionHeadingLevel, AccordionSize } from './Accordion.types.js'; /** * Base class for accordion item components. Manages open/disabled state, * heading level (set by the parent accordion), and the toggle event. * * @attribute {boolean} open - Whether the accordion item panel is expanded. * @attribute {boolean} disabled - Whether the accordion item is disabled. * @attribute {AccordionSize} size - Size of the item. Inherited from the parent * accordion when slotted; controls the chevron icon when used standalone. * * @slot label - The heading text for this accordion item. * @slot actions - Optional actions rendered adjacent to the heading, outside * the toggle button so they remain independently interactive. * @slot - The panel content revealed when the item is open. */ export declare abstract class AccordionItemBase extends SpectrumElement { /** * Observes whether content is slotted into `[slot="actions"]` so the header * can conditionally render the actions container. * * @internal */ protected slotPresence: SlotPresenceController; /** * Whether the accordion item panel is expanded. */ get open(): boolean; set open(value: boolean); /** * Whether the accordion item is disabled. A disabled item keeps its header * in the tab order but blocks toggling. */ disabled: boolean; /** * The size of the item. Inherited from the parent accordion; controls which * chevron icon is displayed. Has no effect when the item is used standalone. */ size?: AccordionSize; private _open; /** * @internal * Heading level (2–6) propagated by the parent accordion. Defaults to 3 * for standalone items. */ protected headingLevel: AccordionHeadingLevel; /** * @internal * Set by the parent accordion when its own `disabled` is true. Causes the * item to render as disabled (aria-disabled + inert panel) without clobbering * the item's own `disabled` property, so the per-item state is preserved * when the accordion is re-enabled. */ protected parentDisabled: boolean; /** * @internal * Whether content is slotted into `[slot="actions"]`. Consumed by the * concrete element's `render()` to conditionally render the actions * container. */ protected get hasActions(): boolean; /** * @internal * Whether the item may change `open` (expand or collapse). When false, the * `open` setter and `toggle()` leave state unchanged. */ protected mayExpand(): boolean; private get contentPanel(); private dispatchAfterEvent; private afterEventPending; private readonly handleTransitionEnd; private readonly handleTransitionCancel; /** * @internal * Toggles the item open state. Guards for disabled, flips `open`, dispatches * the toggle event, and reverts if the event is canceled. On success, dispatches * `swc-after-open` or `swc-after-close` after the panel height transition ends, * or immediately if no transition is active. */ protected toggle(): void; /** * @internal * Synchronizes parent-managed heading level onto the item. */ setManagedHeading(heading: AccordionHeadingLevel): void; /** * @internal * Synchronizes parent-managed disabled state onto the item. */ setManagedParentDisabled(disabled: boolean): void; protected firstUpdated(changedProperties: PropertyValues): void; connectedCallback(): void; disconnectedCallback(): void; }