/*
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","../../Color","../../core/handleUtils","../../core/maybe","../../core/reactiveUtils","../../core/accessorSupport/decorators/property","../../core/arrayUtils","../../core/has","../../core/accessorSupport/ensureType","../../core/accessorSupport/decorators/subclass","./ElevationProfileLine","./support/elevationQuerySourceUtils"],(function(e,o,r,t,i,s,n,l,a,c,u,p,y){"use strict";let h=function(o){function n(e){var t;return(t=o.call(this,e)||this).type="query",t.color=new r("#db334a"),t.viewVisualizationEnabled=!0,t.source=null,t.numSamplesForPreview=50,t.numSamplesPerChunk=500,t}e._inheritsLoose(n,o);var l=n.prototype;return l.queryElevation=function(e,o){if(!this.source)throw new Error("No source configured for the elevation profile line");return this.source.queryElevation(e,o)},l.attach=function(e){return t.handlesGroup([o.prototype.attach.call(this,e),s.watch((()=>this.source),(()=>this._onChange()),s.sync)])},e._createClass(n,[{key:"minDemResolution",get:function(){return y.getQuerySourceMinDemResolution(this.source)}},{key:"available",get:function(){const e=this.source;return!!e&&(i.isNone(e.visible)||e.visible)&&(i.isNone(e.layers)||e.layers.some((e=>e.visible)))}}]),n}(p);o.__decorate([n.property({type:r,nonNullable:!0})],h.prototype,"color",void 0),o.__decorate([n.property()],h.prototype,"viewVisualizationEnabled",void 0),o.__decorate([n.property()],h.prototype,"source",void 0),o.__decorate([n.property({readOnly:!0})],h.prototype,"minDemResolution",null),o.__decorate([n.property()],h.prototype,"available",null),h=o.__decorate([u.subclass("esri.widgets.ElevationProfile.ElevationProfileLineQuery")],h);return h}));
