/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
v4.33.16 */
import f from"./OZHVOZJR.js";import{a as w}from"./JYDXZCEV.js";import{a}from"./NFZIPMDZ.js";import e from"./6CVZUPDX.js";import b from"./LPU7W35B.js";import{e as p}from"./UN4H7E6L.js";import"./AMHKFE57.js";import"./PMTZ5QWJ.js";import{B as n,E as m,P as h,Q as o,S as d,U as g,a as l,j as c,k as i}from"./MWSR363G.js";export default $arcgis.t(([u,,{a:v},f])=>{var y=c`@layer{arcgis-home{display:block}}`,M={base:"esri-home"},$=f(u),r=class extends h{constructor(){super(...arguments),this.messages=w(),this.viewModel=$(this),this.autoDestroyDisabled=!1,this.goToOverride=this.viewModel.goToOverride,this.icon="home",this.position="top-left",this.state=this.viewModel.state,this.viewpoint=this.viewModel.viewpoint,this.arcgisGo=v(()=>this.viewModel,"go"),this.arcgisPropertyChange=p()("state"),this.arcgisReady=n()}static{this.properties={autoDestroyDisabled:5,goToOverride:0,icon:1,label:1,messageOverrides:0,position:3,referenceElement:1,state:3,viewpoint:0}}static{this.shadowRootOptions=m}static{this.styles=y}async cancelGo(){this.viewModel.cancelGo()}async destroy(){await this.manager.destroy()}async go(){this.viewModel.go()}_go(){let{viewModel:e}=this;e.state==="going-home"?e.cancelGo():e.go()}render(){let{messages:e,icon:b}=this,t=this.viewModel?.state,s=t==="going-home";return i`<div class=${o(l(M.base,a.widget))}><calcite-button class=${o(a.widgetButton)} .disabled=${t==="disabled"} .iconStart=${s?void 0:b??void 0} kind=neutral .label=${e.componentLabel} @click=${this._go} .scale=${s?"s":"m"} title=${(t==="going-home"?e.cancel:e.title)??d}>${s?i`<calcite-loader inline label></calcite-loader>`:null}</calcite-button></div>`}};g("arcgis-home",r);return r},"widgets/Home/HomeViewModel",b,e,f)