/*
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/HandleOwner","../../../core/accessorSupport/decorators/property","../../../core/arrayUtils","../../../core/has","../../../core/accessorSupport/ensureType","../../../core/accessorSupport/decorators/subclass","./layerUtils","../../support/layerViewUtils"],(function(e,r,t,o,s,i,n,l,a,c){"use strict";let h=function(r){function t(e){var t;return(t=r.call(this,e)||this).view=null,t}e._inheritsLoose(t,r);var o=t.prototype;return o.add=function(e){const r=Array.isArray(e)?e:[e];null!=e&&r&&r.length&&r.forEach((e=>this._highlight(e)))},o.remove=function(e){const r=Array.isArray(e)?e:[e];null!=e&&r&&r.length&&r.forEach((e=>this._unhighlight(e)))},o.removeAll=function(){this.handles.removeAll()},o._highlight=function(e){const r=a.findLayerView(this.view,e.layer);c.highlightsSupported(r)&&this.handles.add(r.highlight(e),`feature-${e.getObjectId()}`)},o._unhighlight=function(e){e&&this.handles.remove(`feature-${e.getObjectId()}`)},e._createClass(t,[{key:"count",get:function(){return this.handles.size}}]),t}(t.HandleOwner);r.__decorate([o.property({readOnly:!0})],h.prototype,"count",null),r.__decorate([o.property()],h.prototype,"view",void 0),r.__decorate([o.property()],h.prototype,"add",null),h=r.__decorate([l.subclass("esri.views.draw.support.HighlightHelper")],h);return h}));
