"use strict";(self["webpackChunkcarabi_x2"]=self["webpackChunkcarabi_x2"]||[]).push([[8472],{6338:function(e,t,o){o.r(t),o.d(t,{default:function(){return r}});var n=function(){var e=this,t=e._self._c;return e.opened?t("div",{staticClass:"cb-dropdown",style:e.dropStyle},[e._t("default")],2):e._e()},i=[],s={name:"Dropdown",props:{},data(){return{opened:!1,left:0,top:0}},computed:{dropStyle(){return{left:this.left+"px",top:this.top+"px"}}},watch:{},async mounted(){this.bodyClick=e=>{this.$el.contains(e.target)||this.close()}},beforeDestroy(){this.close(),this.$el&&this.$el.remove()},methods:{async open(e){if(this.opened)return;let t=e.getBoundingClientRect();this.left=t.left+window.scrollX,this.top=t.top+t.height+window.scrollY+5,this.opened=!0,await this.$nextTick(),document.body.appendChild(this.$el),document.body.addEventListener("click",this.bodyClick,!0)},close(){this.opened&&(document.body.removeEventListener("click",this.bodyClick,!0),this.opened=!1)}}},l=s,d=o(1656),c=(0,d.A)(l,n,i,!1,null,null,null),r=c.exports}}]);
//# sourceMappingURL=Dropdown.0ae8e26b.js.map