/*! 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 */
import d from"./IEWQL27P.js";import{a as m}from"./B7UYEEQJ.js";import b from"./PXNZ6E2J.js";import a from"./K2TY4WFO.js";import{g as v}from"./SRDD32D4.js";import"./EPSDPGVP.js";import{b as g}from"./IMJMO6DB.js";import{J as r,K as l,M as n,P as h,a as s,b as i,s as c}from"./RNRMSLW5.js";import"./G6QKOIC3.js";export default $arcgis.t(([w,,{a:d},p])=>{var f=s`.arcgis-button{--calcite-icon-color: var(--calcite-color-text-3);--calcite-button-background-color: var(--calcite-color-foreground-1);color:var(--calcite-color-text-3);line-height:var(--calcite-font-line-height-relative-tight);display:flex;flex-flow:column;cursor:pointer;background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);:hover{--calcite-icon-color: var(--calcite-color-text-1);--calcite-button-background-color: var(--calcite-color-transparent-hover)}calcite-button{width:var(--calcite-spacing-xxxl);height:var(--calcite-spacing-xxxl)}}:host{width:var(--calcite-spacing-xxxl);height:var(--calcite-spacing-xxxl)}`,x="home",u={base:x,button:"arcgis-button"},y=p(w),a=class extends r{constructor(){super(...arguments),this.messages=m(),this.viewModel=y(this),this.view=this.viewModel.view,this.autoDestroyDisabled=!1,this.goToOverride=this.viewModel.goToOverride,this.icon="home",this.state=this.viewModel.state,this.viewpoint=this.viewModel.viewpoint,this.arcgisGo=d(()=>this.viewModel,"go"),this.arcgisPropertyChange=v()("state"),this.arcgisReady=c()}static{this.properties={view:0,autoDestroyDisabled:5,goToOverride:0,icon:1,label:1,messageOverrides:0,position:3,referenceElement:1,state:3,viewpoint:0}}static{this.styles=f}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,o=t==="going-home";return i`<div class=${l(g(u.base,u.button))}><calcite-button .disabled=${t==="disabled"} .iconStart=${o?void 0:b??void 0} kind=neutral .label=${e.componentLabel} @click=${this._go} .scale=${o?"s":"m"} title=${(t==="going-home"?e.cancel:e.title)??n}>${o?i`<calcite-loader inline label></calcite-loader>`:null}</calcite-button></div>`}};h("arcgis-home",a);return a},"widgets/Home/HomeViewModel",a,b,d)