/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import i from"./S6XBCSKI.js";import{a as g}from"./P5EZZH6S.js";import{a as m}from"./DHVEHATY.js";import f from"./VZOMAMSZ.js";import b from"./7PXQ5F5K.js";import{g as v}from"./EH5576ZY.js";import"./7QZVR2UR.js";import a from"./KTDXN3YM.js";import{b as d}from"./ZNBKMZP7.js";import{O as c,P as l,Q as n,R as e,U as h,a as s,b as o,x as r}from"./GRFF5Y4R.js";import"./ALDX5YZO.js";export default $arcgis.t(([x,,,,u])=>{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)}}:host{calcite-button{width:var(--calcite-spacing-xxxl);height:var(--calcite-spacing-xxxl)}}:host([visual-scale="l"]){calcite-button{width:calc(var(--calcite-spacing-xxxl) + var(--calcite-spacing-md));height:calc(var(--calcite-spacing-xxxl) + var(--calcite-spacing-md))}}:host([visual-scale="s"]){calcite-button{width:var(--calcite-spacing-xxl);height:var(--calcite-spacing-xxl)}}.root{border-radius:50%;box-shadow:var(--arcgis-internal-box-shadow, none)}.icon-container{justify-content:center;display:flex;position:absolute;transform:translate(-50%,-50%)}.icon-container:dir(rtl){transform:translate(50%,-50%)}`,b=u(x),i=class extends c{constructor(){super(...arguments),this.messages=g(),this.viewModel=b(this),this.view=this.viewModel.view,this.autoDestroyDisabled=!1,this.goToOverride=this.viewModel.goToOverride,this.orientation=this.viewModel.orientation,this.state=this.viewModel.state,this.visualScale="m",this.arcgisPropertyChange=v()("state","orientation"),this.arcgisReady=r()}static{this.properties={view:0,autoDestroyDisabled:5,goToOverride:0,icon:3,label:1,messageOverrides:0,orientation:32,referenceElement:1,state:32,visualScale:3}}static{this.styles=f}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:p}=this;return o`<div class=${l(d("root",m.arcgisButton))}><calcite-button .disabled=${this.state==="disabled"} kind=neutral .label=${t.reset} @click=${this._reset} round .scale=${this.visualScale} title=${t.reset??e}><div aria-hidden=true class="icon-container" title=${t.reset??e}><calcite-icon .scale=${this.visualScale} .icon=${p} style=${n(w(this.orientation))}></calcite-icon></div></calcite-button></div>`}},w=a=>({transform:`rotateZ(${a.z}deg)`});h("arcgis-compass",i);return i},"widgets/Compass/CompassViewModel",a,b,f,i)