import { playerContext } from "../../player/context.js";
import { PlayerController } from "../../player/player-controller.js";
import { MediaButtonElement } from "../media-button-element.js";
import { selectTextTrack } from "@videojs/core/dom";
import { CaptionsButtonCore, CaptionsButtonDataAttrs } from "@videojs/core";

//#region src/ui/captions-button/captions-button-element.ts
var CaptionsButtonElement = class extends MediaButtonElement {
	constructor(..._args) {
		super(..._args);
		this.core = new CaptionsButtonCore();
		this.stateAttrMap = CaptionsButtonDataAttrs;
		this.mediaState = new PlayerController(this, playerContext, selectTextTrack);
	}
	static {
		this.tagName = "media-captions-button";
	}
	activate(state) {
		this.core.toggle(state);
	}
};

//#endregion
export { CaptionsButtonElement };
//# sourceMappingURL=captions-button-element.js.map