import { c as t } from "../../chunks/runtime.js";
import { makeAccessorController as s } from "@arcgis/lumina/controllers/accessor";
import { watch as e } from "@geoscene/core/core/reactiveUtils.js";
import a from "@geoscene/core/views/VideoView.js";
import { LitElement as r, createEvent as o, noShadowRoot as h } from "@arcgis/lumina";
import { css as l } from "@lit/reactive-element/css-tag.js";
/*! All material copyright GeoScene, All Rights Reserved, unless otherwise specified.
See https://js.geoscene.cn/4.33/geoscene/copyright.txt for details.
v4.33.18 */
const d = l`@layer{geoscene-video{display:block;height:100%;width:100%;.geoscene-view{height:100%;width:100%}}}`, c = s(a, {
  omitProps: ["container", "navigation", "scale", "ui"]
});
class m extends r {
  constructor() {
    super(), this.autoDestroyDisabled = !1, this.view = c(this), this.ready = this.view.ready, this.layer = this.view.layer, this.map = this.view.map, this.geosceneViewReadyChange = o();
  }
  static {
    this.properties = { autoDestroyDisabled: 5, view: 32, ready: 4, layer: 0, map: 0 };
  }
  static {
    this.shadowRootOptions = h;
  }
  static {
    this.styles = d;
  }
  async destroy() {
    await this.manager.destroy();
  }
  load() {
    const i = this;
    i.el.childElem = document.createElement("div"), i.el.append(i.el.childElem), this.view.container = i.el.childElem;
  }
  loaded() {
    this.manager.onLifecycle(() => [
      e(() => this.layer, () => {
        this.layer && this.view && (this.view.layer = this.layer, this.layer.loaded || this.layer.load());
      }, { initial: !0 }),
      e(() => this.view.ready, () => {
        this.view.ready && this.geosceneViewReadyChange.emit();
      }, { initial: this.view.ready })
    ]);
  }
}
t("geoscene-video", m);
export {
  m as GeosceneVideo
};