import { ReactiveController, ReactiveElement } from 'lit'; export interface SlotAttributePropagationControllerOptions { /** The attribute name to propagate to assigned elements. */ attribute: string; /** Returns the current value to propagate. */ getValue: () => string; /** Named slot to target. Omit for the default (unnamed) slot. */ slotName?: string; /** * CSS selector used to filter assigned elements before propagating. * Omit to propagate to all assigned elements. */ selector?: string; } /** * A Lit {@link ReactiveController} that propagates an attribute from the host * element to elements assigned to one of its slots. * * The controller automatically re-propagates in `hostUpdated()` whenever the * value returned by `getValue` changes. Call `propagate()` from the host's * `slotchange` handler to cover elements inserted after the first render. * * @example * ```ts * class MyBase extends SpectrumElement { * @property({ type: String, reflect: true }) * public size: MySize = 'm'; * * private readonly _sizePropagation = new SlotAttributePropagationController(this, { * attribute: 'size', * getValue: () => this.size, * slotName: 'actions', * }); * * protected handleActionsSlotChange(): void { * this._sizePropagation.propagate(); * } * } * ``` */ export declare class SlotAttributePropagationController implements ReactiveController { private readonly _host; private readonly _options; private _previousValue?; constructor(host: ReactiveElement, options: SlotAttributePropagationControllerOptions); hostDisconnected(): void; hostUpdated(): void; /** * Propagates the current value to all matching assigned elements. * Call this from the host's `slotchange` event handler. */ propagate(): void; private _propagateToSlot; private _resolveSlot; }