import{j as v,ch as y,W as c,o as u,c as A,d as g,k as d,p as l,b5 as k,b as B}from"./i4_0wS5w.js";const U={__name:"GAMBlockAd",props:{adUnitId:{type:String,required:!0}},setup(e){const n=e,i=v().value.find(({id:t})=>t===n.adUnitId),{loaded:r,rendered:m,visible:p}=y(i),_=c(()=>!r.value&&m.value&&!p.value),o=c(()=>{var s,a;const t=(a=(s=n.adUnit)==null?void 0:s.size)==null?void 0:a.reduce((f,[b,h])=>Math.min(h,f),1/0);return t&&t<1/0&&!_.value?`${t}px`:0});return(t,s)=>{const a=k;return u(),A("div",{style:l({minHeight:d(o)}),class:"gam-slot-builder"},[g(a,{"ad-unit":d(i),style:l({minHeight:d(o),minWidth:"300px"})},null,8,["ad-unit","style"])],4)}}},G={__name:"GamAdBlock",props:{settings:{type:Object,required:!0,validator(e){return["adUnitPattern"].every(n=>n in e)}}},setup(e){return(n,i)=>{const r=U;return u(),B(r,{"ad-unit-id":e.settings.adUnitPattern},null,8,["ad-unit-id"])}}};export{G as default};