import{d as A,a as L,bc as V,e as n,r as D,f as i,x as C,g as l,h as s,v as d,A as F,F as G,y as I,o as c,$ as f,z as O,cg as P,n as R,_ as j}from"./BxiWQxwE.js";import{u as K}from"./BIxNlpeR.js";const M={key:0},Z={class:"container"},q={key:0},H=["data-banner-id"],J=["target","aria-label","onClick"],Q=["src","alt"],U=A({__name:"banner-l",props:{item:{type:Object,default:null}},setup(E){const w=E,{$messages:r}=L(),e=V(w.item),B=n(()=>(e==null?void 0:e.title.value)??""),N=n(()=>!(e!=null&&e.hide_title.value)&&(e==null?void 0:e.title.value)),S=n(()=>{var o;return(o=e==null?void 0:e.mobile_carousel)==null?void 0:o.value}),m=D([]),{bannerClick:T}=K(m.value,"Banner L"),g=n(()=>{var u,t,_,b,p,v,k,x,h,$,y;const o=[];if(!e)return o;for(let a=1;a<=2;a++)o.push({id:e[`id_banner_${a}`].value,text:(u=e[`text_banner_${a}`])==null?void 0:u.value,image:((t=e[`image_banner_${a}`])==null?void 0:t.value)??"https://placehold.co/140x140",alt:((b=(_=e[`image_banner_${a}`])==null?void 0:_.file)==null?void 0:b.description)??r("banners.alt",{prefix:r("common.vendor")??""})??"",link:((p=e[`internal_link_${a}`])==null?void 0:p.value)||((v=e[`external_link_${a}`])==null?void 0:v.value),target:(k=e[`internal_link_${a}`])!=null&&k.value?"_self":"_blank",buttonText:e[`button_text_${a}`].value,colors:{text:((x=e[`text_color_${a}`])==null?void 0:x.value)??"#484848",background:((h=e[`background_color_${a}`])==null?void 0:h.value)??"#ffffff",button:{text:(($=e[`button_text_color_${a}`])==null?void 0:$.value)??"#ffffff",background:((y=e[`button_background_color_${a}`])==null?void 0:y.value)??"#484848"}}});return o}),z=async o=>{T(o.id,o.image),await R(o.link,{external:o.target==="_blank",open:{target:o.target}})};return(o,u)=>l(g).length?(c(),i("section",M,[s("div",Z,[l(N)?(c(),i("h4",q,d(l(B)),1)):C("",!0),s("div",{class:F(["banners",{carousel:l(S)}])},[(c(!0),i(G,null,I(l(g),t=>(c(),i("div",{ref_for:!0,ref_key:"bannerElements",ref:m,key:t.id,"data-banner-id":t.id,class:"banner",style:f({backgroundColor:t.colors.background})},[s("div",null,[s("p",{style:f({color:t.colors.text})},d(t.text),5),s("button",{type:"button",target:t.target,"aria-label":l(r)("aria.banner",{prefix:l(r)("common.vendor")??""}),style:f({color:t.colors.button.text,backgroundColor:t.colors.button.background}),onClick:O(_=>z(t),["prevent"])},d(t.buttonText),13,J)]),s("img",{src:`${t.image}?width=${l(P).LARGE.DESKTOP}`,loading:"lazy",alt:t.alt},null,8,Q)],12,H))),128))],2)])])):C("",!0)}}),Y=j(U,[["__scopeId","data-v-1aa53fff"]]);export{Y as default};
