/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{loadCalciteComponents as e}from"../../support/componentsUtils.js";import{tsx as l}from"../../support/widget.js";import{css as t}from"../css.js";import{loadSettingsButtonComponents as o,SettingsButton as i}from"./SettingsButton.js";const c=()=>Promise.all([e({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),"action-bar":()=>import("@esri/calcite-components/dist/components/calcite-action-bar"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon")}),o()]);function a(e){return"none"===e.followingMode?"circle-disallowed":"follow-sensor"===e.followingMode?"zoom-to-object":"follow-frame"===e.followingMode?"follow":"video"}function s({viewModel:e,messages:o,settings:c,toggleMetadata:s}){const{state:n}=e,r="not-ready"===n||"waiting"===n,m=l("div",null,l("calcite-popover",{autoClose:!0,label:o.layers,overlayPositioning:"fixed",placement:"top-end",pointerDisabled:!0,referenceElement:"layers-action",scale:"s"},l("calcite-panel",{heading:o.layers},l("calcite-list",{label:o.layers,selectionMode:"multiple"},l("calcite-list-item",{label:o.sensor,onclick:()=>{e.toggleSensorDisplay()},selected:!!e.layer?.telemetryDisplay?.sensorLocation}),l("calcite-list-item",{label:o.sightLine,onclick:()=>{e.toggleSensorSightLineDisplay()},selected:!!e.layer?.telemetryDisplay?.lineOfSight}),l("calcite-list-item",{label:o.sensorTrail,onclick:()=>{e.toggleSensorTrailDisplay()},selected:!!e.layer?.telemetryDisplay?.sensorTrail}),l("calcite-list-item",{label:o.frameCenter,onclick:()=>{e.toggleFrameCenterDisplay()},selected:!!e.layer?.telemetryDisplay?.frameCenter}),l("calcite-list-item",{label:o.frameOutline,onclick:()=>{e.toggleFrameOutlineDisplay()},selected:!!e.layer?.telemetryDisplay?.frameOutline}),l("calcite-list-item",{label:o.frame,onclick:()=>{e.toggleFrameDisplay()},selected:!!e.layer?.telemetryDisplay?.frame})))),l("calcite-action",{alignment:"center",bind:e,disabled:r,icon:"layers",id:"layers-action",key:"layers",scale:"s",slot:"trigger",text:o.layers})),p=l("div",null,l("calcite-popover",{autoClose:!0,label:o.follow,overlayPositioning:"fixed",placement:"top-end",pointerDisabled:!0,referenceElement:"follow-action",scale:"s"},l("calcite-panel",{heading:o.follow},l("calcite-list",{label:o.follow,selectionMode:"single-persist"},l("calcite-list-item",{label:o.none,onclick:()=>{e.followingMode="none"}},l("calcite-icon",{icon:"circle-disallowed",scale:"s",slot:"content-start"})),l("calcite-list-item",{label:o.sensor,onclick:()=>{e.followingMode="follow-sensor"}},l("calcite-icon",{icon:"zoom-to-object",scale:"s",slot:"content-start"})),l("calcite-list-item",{label:o.frame,onclick:()=>{e.followingMode="follow-frame"}},l("calcite-icon",{icon:"follow",scale:"s",slot:"content-start"})),l("calcite-list-item",{label:o.video,onclick:()=>{e.followingMode="follow-both"},selected:!0},l("calcite-icon",{icon:"video",scale:"s",slot:"content-start"}))))),l("calcite-action",{alignment:"center",bind:e,disabled:r,icon:a(e),id:"follow-action",key:"follow",scale:"s",slot:"trigger",text:o.follow})),d=l(i,{messages:o,settings:c,viewModel:e}),g=l("calcite-action",{alignment:"center",bind:e,disabled:r,icon:"feature-details",key:"metadata",onclick:s,scale:"s",text:o.metadata});return l("calcite-action-bar",{class:t.playerControls,expandDisabled:!0,layout:"horizontal",scale:"s"},[m,p,d,g])}export{s as PlayerControlsGroup,c as loadPlayerControlsGroupComponents};
