/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../chunks/_rollupPluginBabelHelpers","../../chunks/tslib.es6","../../core/jsonMap","../../core/JSONSupport","../../core/maybe","../../core/accessorSupport/decorators/property","../../core/arrayUtils","../../core/has","../../core/accessorSupport/ensureType","../../core/accessorSupport/decorators/reader","../../core/accessorSupport/decorators/subclass","../../core/accessorSupport/decorators/writer","./FeatureExpressionInfo","./unitConversionUtils"],(function(e,t,r,o,s,n,i,u,a,p,f,l,c,d,y){"use strict";var h;const x=o.strict()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),E=new o.JSONMap({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let _=h=function(e){function r(){var t;return(t=e.apply(this,arguments)||this).offset=null,t}t._inheritsLoose(r,e);var o=r.prototype;return o.readFeatureExpressionInfo=function(e,t){return null!=e?e:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0},o.writeFeatureExpressionInfo=function(e,t,r,o){t[r]=e.write({},o),"0"===e.expression&&(t.featureExpression={value:0})},o.write=function(t,r){return this.offset||this.mode||this.featureExpressionInfo||this.unit?e.prototype.write.call(this,t,r):null},o.clone=function(){return new h({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})},o.equals=function(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&n.equalsMaybe(this.featureExpressionInfo,e.featureExpressionInfo)},t._createClass(r,[{key:"mode",get:function(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):n.isSome(e)||t?"relative-to-ground":"on-the-ground"},set:function(e){this._override("mode",e)}},{key:"unit",set:function(e){this._set("unit",e)}}]),r}(s.JSONSupport);r.__decorate([i.property({type:d,json:{write:!0}})],_.prototype,"featureExpressionInfo",void 0),r.__decorate([f.reader("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],_.prototype,"readFeatureExpressionInfo",null),r.__decorate([c.writer("featureExpressionInfo",{featureExpressionInfo:{type:d},"featureExpression.value":{type:[0]}})],_.prototype,"writeFeatureExpressionInfo",null),r.__decorate([i.property({type:x.apiValues,nonNullable:!0,json:{type:x.jsonValues,read:x.read,write:{writer:x.write,isRequired:!0}}})],_.prototype,"mode",null),r.__decorate([i.property({type:Number,json:{write:!0}})],_.prototype,"offset",void 0),r.__decorate([i.property({type:y.supportedUnits,json:{type:String,read:E.read,write:E.write}})],_.prototype,"unit",null),_=h=r.__decorate([l.subclass("esri.layers.support.ElevationInfo")],_);const v=_;e.default=v,e.elevationModeKebabDict=x,e.unitKebabDict=E,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
