/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{__decorate as t}from"tslib";import{rad2deg as e}from"../core/mathUtils.js";import{formatAngleDegrees as s,formatDecimal as o}from"../core/unitFormatUtils.js";import{property as r,subclass as i}from"../core/accessorSupport/decorators.js";import n from"./Widget.js";import{messageBundle as m,tsx as l}from"./support/widget.js";const a="esri-fov-overlay",p={base:a,outer:`${a}-outer`,reset:`${a}-reset`,text:`${a}-text`};let c=class extends n{constructor(t){super(t),this.onReset=()=>{},this._messagesCommon=null,this._messagesUnits=null,this.fov=null}render(){return l("div",{class:p.outer},l("div",{class:p.base},l("p",{class:p.text},this._overlay),l("p",{class:p.reset,onclick:this.onReset,title:this._messagesCommon.reset},this._reset)))}get _overlay(){const{fov:t,_messagesUnits:r}=this;if(!r||null==t)return"";const i=s(e(t),"degrees","arithmetic","arithmetic",0),n=u/(2*Math.tan(t/2));return`${i} | ${o(r,n,"millimeters",0,"abbr")} |`}get _reset(){return this._messagesUnits&&null!=this.fov?"↺":""}};t([r()],c.prototype,"onReset",void 0),t([r(),m("esri/t9n/common")],c.prototype,"_messagesCommon",void 0),t([r(),m("esri/core/t9n/Units")],c.prototype,"_messagesUnits",void 0),t([r()],c.prototype,"fov",void 0),t([r()],c.prototype,"_overlay",null),t([r()],c.prototype,"_reset",null),c=t([i("esri.widgets.FovOverlay")],c);const u=Math.sqrt(1872);export{c as FovOverlay,a as base,p as css};
