import { MediaElement } from "./media-element.js";
import { PropertyValues } from "@videojs/element";
import { StateAttrMap } from "@videojs/core";

//#region src/ui/context-part-element.d.ts
/** Shape that compound context values must satisfy for parts to consume. */
interface PartContextValue<State extends object> {
  state: State;
  stateAttrMap: StateAttrMap<State>;
}
/**
 * Abstract base for compound-component part elements that consume a parent
 * context and apply data attributes from `ctx.state` + `ctx.stateAttrMap`.
 *
 * Subclasses only need to declare the `consumer` property:
 *
 * ```ts
 * export class SliderTrackElement extends ContextPartElement<SliderState> {
 *   static readonly tagName = 'media-slider-track';
 *   protected readonly consumer = new ContextConsumer(this, { context: sliderContext, subscribe: true });
 * }
 * ```
 */
declare abstract class ContextPartElement<State extends object> extends MediaElement {
  protected abstract readonly consumer: {
    value?: PartContextValue<State> | undefined;
  };
  protected update(_changed: PropertyValues): void;
}
//#endregion
export { ContextPartElement };
//# sourceMappingURL=context-part-element.d.ts.map