import { nothing } from 'lit'; import { PieElement } from '@justeattakeaway/pie-webc-core/src/internals/PieElement'; import { ListItemProps } from './defs'; declare const componentSelector = "pie-list-item"; /** * @tagname pie-list-item * @slot leading - Content shown at the start of the item (for example an icon, avatar, or a slotted radio/checkbox). * @slot trailing - Content shown at the end of the item. Mutually exclusive with `metaText`. * @slot link - Rendered only when `interactionType="link"`. Slot one empty anchor (e.g. ``) stretched over the whole row as the link target. Must contain no text. */ export declare class PieListItem extends PieElement implements ListItemProps { primaryText: ListItemProps['primaryText']; secondaryText: ListItemProps['secondaryText']; metaText: ListItemProps['metaText']; isCompact: boolean; isBold: boolean; hasMedia: boolean; interactionType: "button" | "checkbox" | "link" | "none" | "radio" | "switch"; disabled: boolean; hasDivider: boolean; aria: ListItemProps['aria']; private _parentDisabled; private _ariaProvider; private _abortController; private _managedRole; private _linkAriaCaptured; private _consumerNamedLink; private _consumerDescribedLink; private get _isSelectable(); private get _isLinkRow(); private get _isButtonRow(); private get _isOverlayRow(); private get _providesAria(); private get _ownedByGroup(); private get _isDisabled(); private get _control(); connectedCallback(): void; disconnectedCallback(): void; protected updated(): void; /** * Sets the item's role from `interactionType`: `presentation` for radio/checkbox (so the group * owns those controls directly), otherwise `listitem` (static items, switches, links and * buttons). A role set explicitly by the consumer is left untouched, even if it is added or * removed dynamically after the element connects. */ private _applyRole; /** * The accessible name and description this item provides to its interactive element, stitched * from its text. Selection controls consume it via `ariaContext` (each applying it to the * element that carries its role); the action button of a `button` row takes it directly as * `aria-label`/`aria-description` in the template; a link anchor takes it via `_applyLinkAria`. */ private get _providedAria(); /** * Forwards a click anywhere on the row to the slotted control, so the whole item is a hit * target. Skips clicks that already landed on the control, to avoid a double toggle. */ private _handleHostClick; /** * On a link row, names the slotted (empty) anchor from the item's own text: the parent owns the * child's aria. The anchor is plain light-DOM, so it cannot reference the shadow-DOM text via * `aria-labelledby`; and it is not a PIE control that consumes `ariaContext`, so we set the * attributes imperatively. The visible text is `aria-hidden` in the template, so nothing is * announced twice. (A `button` row names its own rendered element in the template instead.) * * A consumer-provided name/description always wins: we capture (once) whether the anchor already * carries `aria-label`/`aria-labelledby` or `aria-description`/`aria-describedby` and, if so, * leave that attribute untouched. Otherwise we keep our generated value in sync with the text. */ private _applyLinkAria; _renderSecondaryText(): import('lit-html').TemplateResult<1> | typeof nothing; _renderTrailingContent(): import('lit-html').TemplateResult<1>; /** * The interactive target for a `button` row: an empty, native `