/*! 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 u}from"./VK24LKXI.js";import{a as i}from"./LL7T22QC.js";import b from"./Y4DAIYBP.js";import a from"./DTE4O2DP.js";import{e as g}from"./LYMDZ73M.js";import"./MG6XDMQJ.js";import"./HITJFSBP.js";import{B as l,E as d,P as m,Q as s,R as h,S as e,U as p,a as r,j as n,k as c}from"./3VKC6PRK.js";export default $geoscene.t(([$,,,f])=>{var b=n`@layer{geoscene-compass{display:block}}`,v="geoscene-compass",y={base:v,iconContainer:`${v}__icon-container`},C=f($),o=class extends m{constructor(){super(...arguments),this.messages=u(),this.viewModel=C(this),this.autoDestroyDisabled=!1,this.goToOverride=this.viewModel.goToOverride,this.orientation=this.viewModel.orientation,this.position="top-left",this.state=this.viewModel.state,this.geoscenePropertyChange=g()("state","orientation"),this.geosceneReady=l()}static{this.properties={autoDestroyDisabled:5,goToOverride:0,icon:3,label:1,messageOverrides:0,orientation:0,position:3,referenceElement:1,state:3}}static{this.shadowRootOptions=d}static{this.styles=b}get icon(){return this._icon??(this.state==="rotation"?"arrow-up":"compass-needle")}set icon(t){this._icon=t}async destroy(){await this.manager.destroy()}async reset(){this.viewModel.reset()}_reset(){this.viewModel.reset()}render(){let{messages:t,icon:w}=this;return c`<div class=${s(r(y.base,i.widget))}><calcite-button class=${s(i.widgetButton)} .disabled=${this.state==="disabled"} kind=neutral .label=${t.reset} @click=${this._reset} round scale=s title=${t.reset??e}><div aria-hidden=true class=${s(y.iconContainer)} title=${t.reset??e}><calcite-icon .icon=${w} style=${h(M(this.orientation))}></calcite-icon></div></calcite-button></div>`}},M=a=>({transform:`rotateZ(${a.z}deg)`});p("geoscene-compass",o);return o},"widgets/Compass/CompassViewModel",a,b,f)