/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import{__decorate as e}from"tslib";import t from"../core/Logger.js";import{subclass as o}from"../core/accessorSupport/decorators.js";import{OwningCollection as r}from"../core/support/OwningCollection.js";let s=class extends r{constructor(e){super(e),this.addHandles(this.on("before-add",e=>{null!=e.item&&e.item.parent===this.owner&&(t.getLogger(this).warn("Analysis inside the collection must be unique. Not adding this element again."),e.preventDefault())}))}_own(e){e.parent=this.owner}_release(e){e.parent=null}};s=e([o("esri.support.AnalysesCollection")],s);export{s as AnalysesCollection};
