import{type PropertyValues,type TemplateResult}from'lit';import{LyraElement,type LyraEventDetailSnapshot}from'../../../internal/lyra-element.js';import type{LyraVideoControls}from'../video/video.js';export type LyraVideoPlaylistRepeat='none'|'one'|'all';export interface LyraVideoPlaylistSource{readonly src:string;readonly type:string;readonly media:string;}export interface LyraVideoPlaylistTrack{readonly src:string;readonly kind:string;readonly srclang:string;readonly label:string;readonly default:boolean;}export interface LyraVideoPlaylistVideo{readonly title:string;readonly poster:string;readonly sources:readonly LyraVideoPlaylistSource[];readonly tracks:readonly LyraVideoPlaylistTrack[];} /** * Deterministic metadata for one first-render playlist row. Its index must match the corresponding * direct `` child; live child state becomes authoritative as soon as it is observable. */ export interface LyraVideoPlaylistItem{readonly title:string;readonly poster?:string;readonly duration?:number; /** Mirrors the corresponding child video's native `inert` state. */ readonly unavailable?:boolean;}export interface LyraVideoPlaylistChangeDetail{readonly previousIndex:number;readonly currentIndex:number;readonly video:LyraVideoPlaylistVideo;}export interface LyraVideoPlaylistEventMap{'lr-video-change':CustomEvent>;blur:FocusEvent;focus:FocusEvent;} /** * `` — a direct-child `` playlist with a navigable current-item * list. It mirrors the public `` surface under the `lr-` prefix. * * Lyra additionally exposes `autoAdvance` and `repeat`. `autoAdvance` defaults to `true` to * preserve the mirrored ended behavior; `repeat="one"` restarts the current video and * `repeat="all"` wraps the final video to the first. * `items` can seed deterministic playlist-row metadata for server rendering. Seeded rows are * visible but disabled until the browser can adopt the indexed direct video children; live child * metadata is authoritative after that corrective update. * * A child marked `inert` is unavailable: it never becomes the active video, * `next()`/`previous()`/auto-advance step past it, and its playlist row renders `disabled` so the * row cannot enter the sequential or arrow-key path. Only the child's *own* `inert` counts — a * playlist inerted wholesale by an open modal keeps playing. `` has no `disabled` * contract; use the native `inert` property to make a child unavailable. * Every enabled row is an ordinary sequentially reachable button (`tabindex="0"`); arrow keys are * optional shortcuts, not a required composite-widget navigation contract. Visible durations are * associated with their row through `aria-describedby`. Child presentation overrides are owned * reversibly while the child belongs to this playlist and restored on removal/reparenting. * * @customElement lr-video-playlist * @slot - Direct `` children. Other elements are not playlist items. * @event lr-video-change - Emitted when `goTo()`, `next()`, `previous()`, or ended advancement * selects a video. Detail is `{ previousIndex, currentIndex, video }`; `video` is a fresh, * detached, recursively frozen `{ title, poster, sources, tracks }` data snapshot with no live DOM nodes. * @event {FocusEvent} focus - Relayed once from a playlist row as a bubbling, composed native * event. * @event {FocusEvent} blur - Relayed once from a playlist row as a bubbling, composed native * event. * @csspart base - Deprecated alias on the same root node as `video-playlist`. * @csspart video-playlist - Root video-and-playlist layout. * @csspart playlist - Playlist sidebar container. * @csspart playlist-duration - Duration text within a playlist item. * @csspart playlist-item - An individual playlist item button. * @csspart playlist-thumbnail - Thumbnail within a playlist item. * @csspart playlist-title - Title text within a playlist item. * @cssprop [--lr-video-playlist-item-current-background=var(--lr-color-brand-fill-quiet)] - Current * playlist-item background. * @cssprop [--lr-video-playlist-item-current-border-color=var(--lr-color-brand)] - Current * playlist-item border color. * @status experimental * @since 8.0.0 */ export declare class LyraVideoPlaylist extends LyraElement{protected static readonly immutableEventDetails:readonly string[];static styles:import("lit").CSSResultGroup[]; /** Controls preset forwarded to every direct child video. */ controls:LyraVideoControls; /** Icon library forwarded to every direct child video. */ iconLibrary:string; /** Whether an ended current video advances automatically. Errors never change selection. */ autoAdvance:boolean; /** Automatic completion behavior: stop, repeat one, or wrap the full playlist. Lyra extension. */ repeat:LyraVideoPlaylistRepeat; /** * Initial row metadata for deterministic server rendering, indexed to the direct video children. * Assign the same value before the first server and browser render. Once live children can be * observed, their title/poster/duration/inert state replaces this seed. */ items:readonly LyraVideoPlaylistItem[];private playlistVideos;private liveChildrenReady;private activeIndex;private navigationIndex;private activeVideo?;private mutationObserver?;private readonly listeners;private readonly lastKnownPlaying;private readonly nativeVideos;private readonly needsReload;private readonly ownedVideoState;private preferences;private activationGeneration;private reconcileGeneration;private pendingPlay?;connectedCallback():void;disconnectedCallback():void;protected willUpdate(changed:PropertyValues):void;private observeChildren;private directVideos; /** * Whether `video` can be selected, played, and reached by the playlist controls. * * An inert element refuses focus and pointer input, so an arrow shortcut that steps onto its row * would silently strand focus. The row this component * renders for an inert video is itself `disabled`, so the two states can never disagree. * * Deliberately the child's **own** inert state, never an ancestor's. A playlist sitting in a * subtree an open modal has inerted is inert *as a whole*; treating every video as unavailable * there would drop the active video, pause it, and unload its media element for as long as the * dialog stayed open. */ private isEnabled;private nearestEnabledIndex;private reconcileChildren;private scheduleChildrenReady;private bindVideo;private unbindVideo;private claimVideo; /** Releases every playlist-owned mutation before a child is removed, reparented, or disconnected. */ private releaseVideo;private rememberNativeVideo;private pauseAndUnload;private activateVideo;private capturePreferences;private applyPreferences;private applyTextTrackPreference;private handleLoadedMetadata;private handleCompletion;private snapshotVideo;private emitChange;private switchTo; /** Jumps to a direct child video at a finite integer index. Invalid indexes are inert. */ goTo(index:number):void; /** Selects the next enabled video when one exists. */ next():void; /** Selects the previous enabled video when one exists. */ previous():void;private onSlotChange;private onItemClick;private enabledIndices;private moveNavigation; /** The current row, falling back to the first enabled row, for host method forwarding. */ private get navigationItem(); /** Focus the current playlist row. An empty playlist renders no row, so this * is a no-op there. */ focus(options?:FocusOptions):void; /** Blur the current playlist row. */ blur():void; /** Activate the current playlist row, so a host-level `.click()` is not a * silent no-op. */ click():void;private onItemFocus;private onItemBlur;private focusItem;private onItemKeyDown;private itemTitle;private renderItem;render():TemplateResult;}declare global{interface HTMLElementTagNameMap{'lr-video-playlist':LyraVideoPlaylist;}}