import {
  __decorateClass
} from "../../chunks/chunk.QU3DSPNU.js";
import { property, query } from "lit/decorators.js";
import { GdsElement } from "../../gds-element.js";
import { tokens } from "../../tokens.style.js";
import { styleExpressionProperty } from "../../utils/decorators/style-expression-property.js";
import {
  gdsCustomElement,
  html
} from "../../utils/helpers/custom-element-scoping.js";
import {
  withLayoutChildProps,
  withMarginProps,
  withPositioningProps,
  withSizeXProps,
  withSizeYProps
} from "../../utils/mixins/declarative-layout-mixins.js";
import VideoStyles from "./video.styles.js";
let GdsVideo = class extends withSizeXProps(
  withSizeYProps(
    withMarginProps(withLayoutChildProps(withPositioningProps(GdsElement)))
  )
) {
  // Method to programmatically apply video settings
  applyVideoSettings() {
    if (this.videoElement) {
      this.videoElement.src = this.src || "";
      this.videoElement.poster = this.poster || "";
      this.videoElement.muted = this.muted || false;
      this.videoElement.autoplay = this.autoplay || false;
      this.videoElement.loop = this.loop || false;
      this.videoElement.playsInline = this.playsinline || false;
    }
  }
  render() {
    return html`<video></video>`;
  }
  firstUpdated() {
    this.applyVideoSettings();
  }
};
GdsVideo.styles = [tokens, VideoStyles];
__decorateClass([
  styleExpressionProperty()
], GdsVideo.prototype, "aspect-ratio", 2);
__decorateClass([
  styleExpressionProperty({
    selector: "video"
  })
], GdsVideo.prototype, "object-position", 2);
__decorateClass([
  styleExpressionProperty()
], GdsVideo.prototype, "opacity", 2);
__decorateClass([
  styleExpressionProperty({
    selector: "video"
  })
], GdsVideo.prototype, "object-fit", 2);
__decorateClass([
  styleExpressionProperty({
    selector: "video"
  })
], GdsVideo.prototype, "pointer-events", 2);
__decorateClass([
  styleExpressionProperty({
    valueTemplate: (v) => `var(--gds-sys-space-${v})`
  })
], GdsVideo.prototype, "border-radius", 2);
__decorateClass([
  property()
], GdsVideo.prototype, "src", 2);
__decorateClass([
  property()
], GdsVideo.prototype, "poster", 2);
__decorateClass([
  property({ type: Boolean })
], GdsVideo.prototype, "muted", 2);
__decorateClass([
  property({ type: Boolean })
], GdsVideo.prototype, "playsinline", 2);
__decorateClass([
  property({ type: Boolean })
], GdsVideo.prototype, "autoplay", 2);
__decorateClass([
  property({ type: Boolean })
], GdsVideo.prototype, "loop", 2);
__decorateClass([
  query("video")
], GdsVideo.prototype, "videoElement", 2);
GdsVideo = __decorateClass([
  gdsCustomElement("gds-video")
], GdsVideo);
export {
  GdsVideo
};
