import { ContainerContext, MediaContext, PlayerContext } from "../player/context.js";
import { MediaElementConstructor } from "../ui/media-element.js";
import { PlayerProviderConstructor } from "./types.js";
import { PlayerStore } from "@videojs/core/dom";

//#region src/store/provider-mixin.d.ts
interface ProviderMixinConfig<Store extends PlayerStore> {
  playerContext: PlayerContext<Store>;
  mediaContext: MediaContext;
  containerContext: ContainerContext;
  factory: () => Store;
}
type ProviderMixin<Store extends PlayerStore> = <Class extends MediaElementConstructor>(BaseClass: Class) => Class & PlayerProviderConstructor<Store>;
/**
 * Create a mixin that provides player context to descendant elements and
 * owns the `store.attach()` lifecycle.
 *
 * Media and container elements register themselves via media/container
 * contexts that carry both the current value and a setter. When a media
 * element is available, the provider calls `store.attach({ media, container })`.
 *
 * As a fallback for plain `<video>`/`<audio>` that can't consume context,
 * the provider queries its subtree after a microtask.
 *
 * @param config - Provider configuration with contexts and store factory.
 */
declare function createProviderMixin<Store extends PlayerStore>(config: ProviderMixinConfig<Store>): ProviderMixin<Store>;
//#endregion
export { ProviderMixin, ProviderMixinConfig, createProviderMixin };
//# sourceMappingURL=provider-mixin.d.ts.map