import{Y as h,z as v,y as w,f as c,i as x,A as l,p as e,j as r,w as I,k as i,m as U,v as u,_ as y}from"./BCLrUOBx.js";const L=["src","alt"],j={__name:"Banner",props:{banner:{type:Object,default(){return null}}},emits:["close","clicked"],setup(p,{emit:m}){const _=p,n=m,{banner:s}=h(_),{status:o}=v(),{sourceUrl:b,getImageURL:k}=w(),d=c(()=>{var t;return parseInt((t=s.value)==null?void 0:t.status)===o.PUBLIC}),f=c(()=>{var t;return parseInt((t=s.value)==null?void 0:t.closable)===o.PUBLIC}),C=()=>{n("close")},B=()=>{n("clicked")};return(t,a)=>{const g=y;return e(d)?(r(),x(g,{key:0,to:e(b)(e(s),"banner"),class:"block banner-wrapper",onClick:u(B,["prevent"])},{default:I(()=>[i("img",{src:e(k)(e(s).image),alt:e(s).title,height:"100",width:"500"},null,8,L),e(f)?(r(),U("button",{key:0,"aria-label":"close",class:"btn-banner-close",onClick:u(C,["prevent"])},a[0]||(a[0]=[i("i",{class:"icon close-icon"},null,-1)]))):l("",!0)]),_:1},8,["to"])):l("",!0)}}};export{j as default};
