import { PlayerContext } from "./context.js";
import { ContainerMixin } from "../store/container-mixin.js";
import { ProviderMixin } from "../store/provider-mixin.js";
import { PlayerController } from "./player-controller.js";
import { AnyPlayerFeature, AudioFeatures, AudioPlayerStore, PlayerStore, VideoFeatures, VideoPlayerStore } from "@videojs/core/dom";

//#region src/player/create-player.d.ts
interface CreatePlayerConfig<Features extends AnyPlayerFeature[]> {
  features: Features;
}
interface CreatePlayerResult<Store extends PlayerStore> {
  /** Context for consuming player in controllers. */
  context: PlayerContext<Store>;
  /** Creates a store instance for imperative access. */
  create: () => Store;
  /** Player controller bound to this player's context. */
  PlayerController: PlayerController.Constructor<Store>;
  /** Mixin that provides player context to descendants. */
  ProviderMixin: ProviderMixin<Store>;
  /** Mixin that consumes player context and auto-attaches media elements. */
  ContainerMixin: ContainerMixin<Store>;
}
/**
 * Creates a player factory with typed store, mixins, and controller.
 *
 * @example
 * ```ts
 * import { createPlayer, MediaElement, selectPlayback } from '@videojs/html';
 * import { videoFeatures } from '@videojs/html/video';
 *
 * const { ProviderMixin, ContainerMixin, PlayerController, context } = createPlayer({
 *   features: videoFeatures,
 * });
 *
 * // Provider element: owns the store, provides context to descendants
 * class VideoPlayer extends ProviderMixin(MediaElement) {}
 * customElements.define('video-player', VideoPlayer);
 *
 * // Control element with selector
 * class PlayButton extends MediaElement {
 *   #playback = new PlayerController(this, context, selectPlayback);
 * }
 * ```
 *
 * @label Video
 * @param config - Player configuration with features.
 */
declare function createPlayer(config: CreatePlayerConfig<VideoFeatures>): CreatePlayerResult<VideoPlayerStore>;
/**
 * Creates a player factory for audio media.
 *
 * @label Audio
 * @param config - Player configuration with features.
 */
declare function createPlayer(config: CreatePlayerConfig<AudioFeatures>): CreatePlayerResult<AudioPlayerStore>;
/**
 * Creates a player factory with custom features.
 *
 * @label Generic
 * @param config - Player configuration with features.
 */
declare function createPlayer<const Features extends AnyPlayerFeature[]>(config: CreatePlayerConfig<Features>): CreatePlayerResult<PlayerStore<Features>>;
//#endregion
export { CreatePlayerConfig, CreatePlayerResult, createPlayer };
//# sourceMappingURL=create-player.d.ts.map