import{_ as l,bc as m,aL as c,bb as u,o as s,c as h,b as p,n as d,i as _,bp as f}from"./entry.DPwc-EV0.js";const g={extends:m,props:{adUnitId:{type:String,required:!0}},setup(e){return{page:c("page")}},computed:{adUnit(){return u().value.find(({id:e})=>e===this.adUnitId)},hideAd(){return this.unserved&&!this.visible},minHeight(){var n,i;const e=(i=(n=this.adUnit)==null?void 0:n.size)==null?void 0:i.reduce((a,[r,t])=>Math.min(t,a),1/0);return e&&e<1/0&&!this.hideAd?`${e}px`:0}},methods:{valid(e){return e&&this.gamBasePath&&this.gamAccountId&&((e==null?void 0:e.type)==="layout-block"||this.allowedOnPage(e))}}};function b(e,n,i,a,r,t){const o=f;return s(),h("div",{style:d({minHeight:t.minHeight}),class:"gam-slot-builder"},[t.valid(t.adUnit)?(s(),p(o,{key:0,"ad-unit":t.adUnit,path:e.makePath(t.adUnit),style:d({minHeight:t.minHeight,minWidth:"300px"}),onIframeLoaded:e.onLoad,onSlotRendered:e.eventCompleted,onVisible:e.isVisible},null,8,["ad-unit","path","style","onIframeLoaded","onSlotRendered","onVisible"])):_("",!0)],4)}const k=l(g,[["render",b]]);export{k as default};