/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{__decorate as t}from"tslib";import{Clonable as e}from"../../../core/Clonable.js";import{property as r,cast as a,subclass as s}from"../../../core/accessorSupport/decorators.js";let o=class extends e{constructor(t){super(t),this.mode="auto"}get near(){return this._get("near")}set near(t){this._set("near",t),t>=this._get("far")&&(this.far=t+1e-9),this.mode="manual"}castNear(t){return Math.max(1e-8,t)}get far(){return this._get("far")}set far(t){this._set("far",t),t<=this._get("near")&&(this.near=t-1e-9),this.mode="manual"}castFar(t){return Math.max(1e-8,t)}autoUpdate(t,e){"auto"===this.mode&&(this._get("near")!==t&&this._set("near",t),this._get("far")!==e&&this._set("far",e))}};t([r({type:Number,value:1e-8})],o.prototype,"near",null),t([a("near")],o.prototype,"castNear",null),t([r({type:Number,value:1e-8})],o.prototype,"far",null),t([a("far")],o.prototype,"castFar",null),t([r({type:["auto","manual"]})],o.prototype,"mode",void 0),o=t([s("esri.views.3d.constraints.ClipDistanceConstraint")],o);const n=o;export{n as default};
