import { c as v } from "../../chunks/runtime.js";
import { html as t } from "lit";
import { watch as o } from "@arcgis/core/core/reactiveUtils.js";
import { LitElement as u } from "@arcgis/lumina";
import { useDirection as f } from "@arcgis/lumina/controllers";
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
v4.34.7 */
class h extends u {
  constructor() {
    super(...arguments), this._direction = f(), this._disabled = !1, this._playing = !1;
  }
  static {
    this.properties = { _disabled: 16, _playing: 16, _isLive: 16, viewModel: 0, messages: 0 };
  }
  loaded() {
    this.manager.onLifecycle(() => [
      o(() => [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 }),
      o(() => 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, l = this._direction === "rtl", r = 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>`, d = s ? void 0 : t`<calcite-action alignment=center .disabled=${a} icon=reverse-f @click=${() => e.seekBackward()} scale=s .text=${i.reverse}></calcite-action>`, g = s ? void 0 : t`<calcite-action alignment=center .disabled=${a} icon=forward-f @click=${() => e.seekForward()} scale=s .text=${i.forward}></calcite-action>`, p = s ? void 0 : t`<calcite-action alignment=center .disabled=${a} icon=beginning-f @click=${() => e.seekToBeginning()} scale=s .text=${i.beginning}></calcite-action>`, m = s ? void 0 : t`<calcite-action alignment=center .disabled=${a} icon=end-f @click=${() => e.seekToEnding()} scale=s .text=${i.end}></calcite-action>`, c = [p, d, r, g, m];
    return l && c.reverse(), t`<calcite-action-bar expand-disabled layout=horizontal scale=s>${c}</calcite-action-bar>`;
  }
}
v("arcgis-video-player-actions-group", h);
export {
  h as VideoPlayerActionsGroup
};
