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

//#region src/ui/media-ui-element.ts
/** Abstract base for HTML custom elements that display media state with data attributes. */
var MediaUIElement = class extends MediaElement {
	connectedCallback() {
		super.connectedCallback();
	}
	update(changed) {
		super.update(changed);
		const media = this.mediaState.value;
		if (!media) return;
		this.core.setMedia(media);
		const state = this.core.getState();
		applyStateDataAttrs(this, state, this.stateAttrMap);
	}
};

//#endregion
export { MediaUIElement };
//# sourceMappingURL=media-ui-element.js.map