/*
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{Clonable as o}from"../../../core/Clonable.js";import{rad2deg as a,clamp as s}from"../../../core/mathUtils.js";import{property as e,cast as m,subclass as r}from"../../../core/accessorSupport/decorators.js";import{TiltRange as i}from"../state/Constraints.js";const n={min:a(i.min),max:a(i.max)};let p=class extends o{constructor(t){super(t),this.mode="auto"}get max(){return this._get("max")}set max(t){this._set("max",t),this.mode="manual"}castMax(t){return s(t,n.min,n.max)}autoUpdate(t){"auto"===this.mode&&this._get("max")!==t&&this._set("max",t)}};t([e({type:["auto","manual"]})],p.prototype,"mode",void 0),t([e({type:Number,value:n.max})],p.prototype,"max",null),t([m("max")],p.prototype,"castMax",null),p=t([r("esri.views.3d.constraints.TiltConstraint")],p);export{p as TiltConstraint};
