/*! 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 e from"./IEWQL27P.js";import{a as v}from"./B7UYEEQJ.js";import b from"./PXNZ6E2J.js";import a from"./K2TY4WFO.js";import{g as u}from"./SRDD32D4.js";import"./EPSDPGVP.js";import{b as p}from"./IMJMO6DB.js";import{J as h,K as o,L as d,M as i,P as m,a as c,b as n,s as l}from"./RNRMSLW5.js";import"./G6QKOIC3.js";export default $arcgis.t(([f,,,g])=>{var x=c`.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)}.compass{border-radius:50%;box-shadow:var(--arcgis-internal-box-shadow, none)}.compass__icon-container{justify-content:center;display:flex;position:absolute;transform:translate(-50%,-50%)}.compass__icon-container:dir(rtl){transform:translate(50%,-50%)}`,s="compass",e={base:s,button:"arcgis-button",compassButton:`${s}__button`,iconContainer:`${s}__icon-container`},w=g(f),a=class extends h{constructor(){super(...arguments),this.messages=v(),this.viewModel=w(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.arcgisPropertyChange=u()("state","orientation"),this.arcgisReady=l()}static{this.properties={view:0,autoDestroyDisabled:5,goToOverride:0,icon:3,label:1,messageOverrides:0,orientation:0,position:3,referenceElement:1,state:3}}static{this.styles=x}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:b}=this;return n`<div class=${o(p(e.base,e.button,e.compassButton))}><calcite-button .disabled=${this.state==="disabled"} kind=neutral .label=${t.reset} @click=${this._reset} round scale=s title=${t.reset??i}><div aria-hidden=true class=${o(e.iconContainer)} title=${t.reset??i}><calcite-icon .icon=${b} style=${d(y(this.orientation))}></calcite-icon></div></calcite-button></div>`}},y=r=>({transform:`rotateZ(${r.z}deg)`});m("arcgis-compass",a);return a},"widgets/Compass/CompassViewModel",a,b,e)