import{K as v,am as h,M as m,m as i,j as l,k as t,D as y,v as d,A as c,Z as n,C as f,t as b}from"./BCLrUOBx.js";const k={name:"PopOver",components:{},directives:{outsideClick:h},props:{title:{type:String,default:""},elemId:{type:String,default:""},layer:{type:Boolean,default:!1},outsideClickOn:{type:Boolean,default:!0},layerOnResponsive:{type:Boolean,default:!0}},computed:{isSmallerDevice(){return window.innerWidth<992},hasFooterSlot(){return!!this.$slots["pop-footer"]}},data(){return{hasLayer:this.layer}},methods:{outsideClickFn(){this.outsideClickOn&&!this.hasLayer&&this.closePopOver()},closePopOver(){this.$emit("close")}},mounted(){this.isSmallerDevice&&this.layerOnResponsive&&(this.hasLayer=!0),this.hasLayer&&document.body.classList.add("no-scroll")},unmounted(){document.body.classList.remove("no-scroll")}},_=["data-ignore"],O=["id"],C={key:0,class:"pop-heading flex sided plr-20 plr-sm-15 ptb-10 b-b pos-rel"},g={class:"bold"},P={class:"sb pop-over-content p-20 p-sm-15"},S={key:1,class:"pop-footer b-t plr-20 plr-sm-15 pt-10 pb-10"};function L(r,e,o,B,p,s){const u=m("outside-click");return l(),i("div",{class:f(["pop-over",{"has-layer":p.hasLayer}])},[t("div",{class:"layer","data-ignore":o.elemId,onClick:e[0]||(e[0]=d((...a)=>s.closePopOver&&s.closePopOver(...a),["prevent"]))},null,8,_),y((l(),i("div",{class:"pop-over-inner",id:o.elemId},[o.title?(l(),i("div",C,[n(r.$slots,"heading",{},()=>[t("h5",g,b(o.title),1)]),t("button",{class:"right-btn close-btn pos-static no-shadow","aria-label":"submit",onClick:e[1]||(e[1]=d((...a)=>s.closePopOver&&s.closePopOver(...a),["prevent"]))},e[2]||(e[2]=[t("i",{class:"icon close-icon"},null,-1)]))])):c("",!0),t("div",P,[n(r.$slots,"content")]),s.hasFooterSlot?(l(),i("div",S,[n(r.$slots,"pop-footer")])):c("",!0)],8,O)),[[u,s.outsideClickFn]])],2)}const w=v(k,[["render",L]]);export{w as default};
