import { PlayerContext } from "./context.js";
import { PlayerStore } from "@videojs/core/dom";
import { InferStoreState, Selector } from "@videojs/store";
import { ReactiveController, ReactiveControllerHost } from "@videojs/element";

//#region src/player/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 MediaElement {
 *   #player = new PlayerController(this, playerContext);
 *
 *   handleClick() {
 *     this.#player.value.setVolume(0.5);
 *   }
 * }
 *
 * // Selector-based subscription
 * class PlayButton extends MediaElement {
 *   #playback = new PlayerController(this, playerContext, selectPlayback);
 * }
 * ```
 */
declare class PlayerController<Store extends PlayerStore, Result = Store> implements ReactiveController {
  #private;
  /**
   * @label Without Selector
   * @param host - The host element that owns this controller.
   * @param context - Player context to resolve the store from.
   */
  constructor(host: PlayerControllerHost, context: PlayerContext<Store>);
  /**
   * @label With Selector
   * @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.
   */
  constructor(host: PlayerControllerHost, context: PlayerContext<Store>, selector: Selector<InferStoreState<Store>, Result>);
  get value(): Result | undefined;
  get displayName(): string | undefined;
  hostConnected(): void;
  hostDisconnected(): void;
}
declare namespace PlayerController {
  type Host = PlayerControllerHost;
  type Constructor<Store extends PlayerStore = PlayerStore, Result = Store> = typeof PlayerController<Store, Result>;
}
//#endregion
export { PlayerController, PlayerControllerHost };
//# sourceMappingURL=player-controller.d.ts.map