import { c as p } from "../../chunks/runtime.js";
import { html as t } from "lit-html";
import { watch as c } from "@geoscene/core/core/reactiveUtils.js";
import { LitElement as m, noShadowRoot as v } from "@arcgis/lumina";
/*! 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 */
class h extends m {
  constructor() {
    super(...arguments), this._disabled = !1, this._playing = !1;
  }
  static {
    this.properties = { _disabled: 16, _playing: 16, _isLive: 16, viewModel: 0, messages: 0 };
  }
  static {
    this.shadowRootOptions = v;
  }
  loaded() {
    this.manager.onLifecycle(() => [
      c(() => [this.viewModel.state, this.viewModel.playing], () => {
        const { state: e, playing: i } = this.viewModel;
        this._disabled = e === "not-ready" || e === "waiting", this._playing = i;
      }, { initial: !0 }),
      c(() => this.viewModel.layer?.isLive, (e) => {
        this._isLive = e ?? void 0;
      }, { initial: !0 })
    ]);
  }
  render() {
    const { viewModel: e, messages: i, _disabled: a, _playing: n } = this, s = this._isLive, o = t`<calcite-action .active=${n} alignment=center .disabled=${a} .icon=${n ? "pause-f" : "play-f"} @click=${n ? () => e.pause() : () => e.play()} scale=s .text=${n ? i.pause : i.play}></calcite-action>`, l = s ? void 0 : t`<calcite-action alignment=center .disabled=${a} icon=reverse-f @click=${() => e.seekBackward()} scale=s .text=${i.reverse}></calcite-action>`, d = s ? void 0 : t`<calcite-action alignment=center .disabled=${a} icon=forward-f @click=${() => e.seekForward()} scale=s .text=${i.forward}></calcite-action>`, r = s ? void 0 : t`<calcite-action alignment=center .disabled=${a} icon=beginning-f @click=${() => e.seekToBeginning()} scale=s .text=${i.beginning}></calcite-action>`, g = s ? void 0 : t`<calcite-action alignment=center .disabled=${a} icon=end-f @click=${() => e.seekToEnding()} scale=s .text=${i.end}></calcite-action>`;
    return t`<calcite-action-bar expand-disabled layout=horizontal scale=s>${[r, l, o, d, g]}</calcite-action-bar>`;
  }
}
p("geoscene-video-player-actions-group", h);
export {
  h as VideoPlayerActionsGroup
};