"use strict";exports.ChildrenMixin=function(n,i={}){const t=i.indexKey||"index";return{inject:{[n]:{default:null}},data:()=>({}),computed:{[t](){const i=this;return i.bindRelation(),i[n]?i[n].children.indexOf(this):null}},watch:{disableBindRelation(n){n||this.bindRelation()}},created(){this.bindRelation()},mounted(){},beforeUnmount(){this.onBeforeMount()},methods:{bindRelation(){var i,t,e;if(!this[n]||this[n].children&&-1!==this[n].children.indexOf(this))return;const l=[...this[n].children||[],this];this[n].children=l,null==(i=this.innerAfterLinked)||i.call(this,this),null==(e=(t=this[n]).innerAfterLinked)||e.call(t,this)},onBeforeMount(){var i,t,e,l;const r=this;r[n]&&(r[n].children=r[n].children.filter((n=>n!==r)),null==(t=(i=this[n]).innerAfterUnLinked)||t.call(i,this),null==(e=this.innerAfterUnLinked)||e.call(this,this),null==(l=null==r?void 0:r.destroyCallback)||l.call(r))}}}},exports.ParentMixin=function(n){return{provide(){return{[n]:this}},data:()=>({})}};
