/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["../../chunks/_rollupPluginBabelHelpers","../../chunks/tslib.es6","../../core/Accessor","../../core/unitUtils","../../core/accessorSupport/decorators/property","../../core/arrayUtils","../../core/has","../../core/accessorSupport/ensureType","../../core/accessorSupport/decorators/subclass","../../properties/defaultUnit"],(function(e,t,r,o,i,a,n,s,c,l){"use strict";let p=function(t){function r(e){var r;return(r=t.call(this,e)||this).activeTool=null,r.activeViewModel=null,r.view=null,r}return e._inheritsLoose(r,t),e._createClass(r,[{key:"areaUnit",get:function(){return this.defaultUnit},set:function(e){void 0!==e?this._override("areaUnit",e):this._clearOverride("areaUnit")}},{key:"linearUnit",get:function(){return this.defaultUnit},set:function(e){void 0!==e?this._override("linearUnit",e):this._clearOverride("linearUnit")}},{key:"state",get:function(){const{activeViewModel:e}=this;return e?e.state:"disabled"}}]),r}(r);t.__decorate([i.property({type:["area","distance","direct-line"]})],p.prototype,"activeTool",void 0),t.__decorate([i.property()],p.prototype,"activeViewModel",void 0),t.__decorate([i.property({type:o.measurementAreaUnits})],p.prototype,"areaUnit",null),t.__decorate([i.property(l.defaultUnitPropertyMetadata)],p.prototype,"defaultUnit",void 0),t.__decorate([i.property({type:o.measurementLengthUnits})],p.prototype,"linearUnit",null),t.__decorate([i.property({readOnly:!0})],p.prototype,"state",null),t.__decorate([i.property()],p.prototype,"view",void 0),p=t.__decorate([c.subclass("esri.widgets.Measurement.MeasurementViewModel")],p);return p}));
