UNPKG

@arcgis/map-components

Version:
5 lines (4 loc) 1.71 kB
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.32/esri/copyright.txt for details. v4.32.13 */ import{a as g}from"./NYXWVKGC.js";import{a as p}from"./QKQNYHUC.js";import{a as o}from"./KWBN5CHV.js";import"./JM4XJJFL.js";import"./AX2MGWNF.js";import{A as m,B as d,C as i,E as h,G as u,a as r,g as l,q as n,r as c,s}from"./NIZJVZRG.js";var v=await $arcgis.l("widgets/Fullscreen/FullscreenViewModel");var w=c`@layer{arcgis-fullscreen{display:block}}`,M={base:"esri-fullscreen"},$=g(v),a=class extends d{constructor(){super(...arguments),this.messages=p(),this.viewModel=$(this),this.autoDestroyDisabled=!1,this.element=this.viewModel.element,this.icon="zoom-out-fixed",this.position="top-left",this.state=this.viewModel.state,this.arcgisPropertyChange=n()("state"),this.arcgisReady=m()}static{this.properties={autoDestroyDisabled:5,element:0,icon:3,label:1,messageOverrides:0,position:3,referenceElement:1,state:3}}static{this.shadowRootOptions=l}static{this.styles=w}get fullscreenTitle(){let e=this.viewModel?.state;return e==="active"?this.messages.exit:e==="ready"?this.messages.enter:""}async destroy(){await this.manager.destroy()}_toggle(){this.viewModel.toggle()}render(){let{fullscreenTitle:e,icon:f}=this,t=this.viewModel?.state,y=t==="feature-unsupported",b=t==="ready"||t==="disabled"||t==="feature-unsupported"?"zoom-out-fixed":"zoom-in-fixed";return s`<div class=${i(r(M.base,o.widget))}>${!y&&s`<calcite-button class=${i(o.widgetButton)} .disabled=${t==="disabled"} .iconStart=${f??b} kind=neutral .label=${e} @click=${this._toggle} title=${e??h}></calcite-button>`||""}</div>`}};u("arcgis-fullscreen",a);export{a as ArcgisFullscreen};