import CwElement from '../../internal/cw-element.js'; import CwIcon from '../icon/icon.component.js'; import type { CSSResultGroup } from 'lit'; /** * @summary Accordion items are collapsible panels used inside an [accordion](/components/accordion) — each shows a * brief summary and expands to show additional content. * @documentation https://cordwainer.dev/components/accordion-item * @status experimental * @since 1.5 * * @dependency cw-icon * * @slot - The accordion item's main content. * @slot summary - The accordion item's summary. Alternatively, you can use the `summary` attribute. * @slot expand-icon - Optional expand icon to use instead of the default. Works best with ``. * @slot collapse-icon - Optional collapse icon to use instead of the default. Works best with ``. * * @event cw-show - Emitted when the accordion item opens. * @event cw-after-show - Emitted after the accordion item opens and all animations are complete. * @event cw-hide - Emitted when the accordion item closes. * @event cw-after-hide - Emitted after the accordion item closes and all animations are complete. * * @csspart base - The component's base wrapper. * @csspart header - The header that wraps both the summary and the expand/collapse icon. * @csspart summary - The container that wraps the summary. * @csspart summary-icon - The container that wraps the expand/collapse icons. * @csspart content - The accordion item's content. * * @animation accordion-item.show - The animation to use when showing the accordion item. * @animation accordion-item.hide - The animation to use when hiding the accordion item. */ export default class CwAccordionItem extends CwElement { static styles: CSSResultGroup; static dependencies: { 'cw-icon': typeof CwIcon; }; private readonly localize; header: HTMLElement; body: HTMLElement; /** * Indicates whether or not the accordion item is open. You can toggle this attribute to show and hide the item, or * you can use the `show()` and `hide()` methods and this attribute will reflect the item's open state. */ open: boolean; /** The summary to show in the header. If you need to display HTML, use the `summary` slot instead. */ summary: string; /** Disables the accordion item so it can't be toggled. */ disabled: boolean; firstUpdated(): void; private handleHeaderClick; private handleHeaderKeyDown; handleOpenChange(): Promise; /** Shows the accordion item. */ show(): Promise; /** Hides the accordion item. */ hide(): Promise; render(): import("lit-html").TemplateResult<1>; }