/*
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/Collection","../../core/HandleOwner","../../core/accessorSupport/decorators/property","../../core/arrayUtils","../../core/has","../../core/accessorSupport/ensureType","../../core/accessorSupport/decorators/subclass","./Selector2D/SelectionOperation2D","./Selector2D/selectorUtils"],(function(e,t,o,r,n,s,i,c,l,a,p,u){"use strict";let d=function(t){function o(e){var o;return(o=t.call(this,e)||this)._defaultSelectionOptions={intersects:!0,overlaps:!0,contains:!0},o.candidates=null,o.options=null,o.view=null,o}e._inheritsLoose(o,t);var n=o.prototype;return n.draw=function(e){const{_defaultSelectionOptions:t,candidates:o,options:r,view:n}=this,s={...t,...r,...null==e?void 0:e.selectionOptions};return new p({candidates:o,options:{...e,selectionOptions:s},view:n})},n.selectionFrom=function(){var t=e._asyncToGenerator((function*(e,t){const{_defaultSelectionOptions:o,candidates:n,options:s,view:i}=this,c=new r,l={...o,...s,...t};return yield u.updateSelection({selector:e,candidates:n,currentSelection:c,options:l,view:i}),c.toArray()}));function o(e,o){return t.apply(this,arguments)}return o}(),o}(n.HandleOwnerMixin(o));t.__decorate([s.property()],d.prototype,"candidates",void 0),t.__decorate([s.property()],d.prototype,"options",void 0),t.__decorate([s.property({value:null})],d.prototype,"view",void 0),d=t.__decorate([a.subclass("esri.widgets.support.Selector2D")],d);return d}));
