/*! All material copyright GeoScene, All Rights Reserved, unless otherwise specified.
See https://js.geoscene.cn/4.33/geoscene/copyright.txt for details.
v4.33.18 */
import f from"./E5V5AKTV.js";import{a as w}from"./VK24LKXI.js";import{a}from"./LL7T22QC.js";import e from"./Y4DAIYBP.js";import b from"./DTE4O2DP.js";import{e as p}from"./LYMDZ73M.js";import"./MG6XDMQJ.js";import"./HITJFSBP.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"./3VKC6PRK.js";export default $geoscene.t(([u,,{a:v},f])=>{var y=c`@layer{geoscene-home{display:block}}`,M={base:"geoscene-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.geosceneGo=v(()=>this.viewModel,"go"),this.geoscenePropertyChange=p()("state"),this.geosceneReady=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("geoscene-home",r);return r},"widgets/Home/HomeViewModel",b,e,f)