/*
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","./Analysis","./LengthDimension","../core/Collection","../core/collectionUtils","../core/maybe","../core/accessorSupport/decorators/property","../core/arrayUtils","../core/has","../core/accessorSupport/ensureType","../core/accessorSupport/decorators/subclass"],(function(e,t,n,o,r,s,i,c,l,a,p,d){"use strict";const u=r.ofType(o);let y=function(t){function n(e){var n;return(n=t.call(this,e)||this).type="dimensioning",n.nonEditableMessage="Assign start and end points to all dimensions to allow editing.",n}return e._inheritsLoose(n,t),n.prototype.clear=function(){this.dimensions.removeAll()},e._createClass(n,[{key:"dimensions",get:function(){return this._get("dimensions")||new u},set:function(e){this._set("dimensions",s.referenceSetter(e,this.dimensions,u))}},{key:"extent",get:function(){return this.dimensions.reduce(((e,t)=>i.isNone(e)?i.isSome(t.extent)?t.extent.clone():null:i.isSome(t.extent)?e.union(t.extent):e),null)}},{key:"requiredPropertiesForEditing",get:function(){return this.dimensions.reduce(((e,t)=>(e.push(t.startPoint,t.endPoint),e)),[])}}]),n}(n);t.__decorate([c.property({type:["dimensioning"]})],y.prototype,"type",void 0),t.__decorate([c.property({cast:s.castForReferenceSetter,type:u,nonNullable:!0})],y.prototype,"dimensions",null),t.__decorate([c.property({readOnly:!0})],y.prototype,"extent",null),t.__decorate([c.property({readOnly:!0})],y.prototype,"requiredPropertiesForEditing",null),t.__decorate([c.property({readOnly:!0})],y.prototype,"nonEditableMessage",void 0),y=t.__decorate([d.subclass("esri.analysis.DimensioningAnalysis")],y);return y}));
