UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

6 lines (5 loc) 1.63 kB
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.33/esri/copyright.txt for details. */ import{loadCalciteComponents as e}from"../../support/componentsUtils.js";import"../../support/widgetUtils.js";import{tsx as i}from"../../support/jsxFactory.js";import{css as t}from"../css.js";const n=()=>e({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),"action-bar":()=>import("@esri/calcite-components/dist/components/calcite-action-bar")});function c({viewModel:e,messages:n}){const{state:c,playing:a,layer:o}=e,s=!!o?.isLive,l="not-ready"===c||"waiting"===c,r=a?n.pause:n.play,d=i("calcite-action",{active:a,alignment:"center",bind:e,disabled:l,icon:a?"pause-f":"play-f",key:"play",onclick:a?e.pause:e.play,scale:"s",text:r,title:r}),p=n.reverse,m=s?null:i("calcite-action",{alignment:"center",bind:e,disabled:l,icon:"reverse-f",key:"reverse",onclick:e.seekBackward,scale:"s",text:p,title:p}),g=n.forward,b=s?null:i("calcite-action",{alignment:"center",bind:e,disabled:l,icon:"forward-f",key:"forward",onclick:e.seekForward,scale:"s",text:g,title:g}),k=n.beginning,y=s?null:i("calcite-action",{alignment:"center",bind:e,disabled:l,icon:"beginning-f",key:"beginning",onclick:e.seekToBeginning,scale:"s",text:k,title:k}),f=n.end,u=s?null:i("calcite-action",{alignment:"center",bind:e,disabled:l,icon:"end-f",key:"end",onclick:e.seekToEnding,scale:"s",text:f,title:f});return i("calcite-action-bar",{class:t.playerActions,expandDisabled:!0,layout:"horizontal",scale:"s"},[y,m,d,b,u])}export{c as PlayerActionsGroup,n as loadPlayerActionsGroupComponents};