import { PlayerContext } from "./context.js"; import { PlayerStore } from "@videojs/core/dom"; import { ReactiveController, ReactiveControllerHost } from "@videojs/element"; import { InferStoreState, Selector } from "@videojs/store"; //#region src/player/controller.d.ts type PlayerControllerHost = ReactiveControllerHost & HTMLElement; /** * Reactive controller for accessing player store state. * * Without selector: Returns the store, does NOT subscribe to changes. With selector: Returns selected state, subscribes * with shallowEqual comparison. * * @example * ```ts * // Store access (no subscription) * class Controls extends UIElement { * #player = new PlayerController(this, playerContext); * * handleClick() { * this.#player.value.setVolume(0.5); * } * } * * // Selector-based subscription * class PlayButton extends UIElement { * #playback = new PlayerController(this, playerContext, selectPlayback); * } * ```; */ declare class PlayerController implements ReactiveController { #private; /** * @param host - The host element that owns this controller. * @param context - Player context to resolve the store from. * @label Without Selector */ constructor(host: PlayerControllerHost, context: PlayerContext); /** * @param host - The host element that owns this controller. * @param context - Player context to resolve the store from. * @param selector - Derives a value from the player store state. * @label With Selector */ constructor(host: PlayerControllerHost, context: PlayerContext, selector: Selector, Result>); get value(): Result | undefined; get displayName(): string | undefined; hostConnected(): void; hostDisconnected(): void; } declare namespace PlayerController { type Host = PlayerControllerHost; type Constructor = typeof PlayerController; interface ConfiguredConstructor { new (host: PlayerControllerHost): PlayerController; new (host: PlayerControllerHost, selector: Selector, Result>): PlayerController; } } //#endregion export { PlayerController, PlayerControllerHost }; //# sourceMappingURL=controller.d.ts.map