import{_ as C}from"./BlRA0VbR.js";import{d as I,j as r,C as z,k as i,l as s,q as u,m as e,B as n,p as c,w as k,v as m,t as w,al as N,D as S,bl as M,_ as T}from"./C7FS_p1o.js";const V={key:0,class:"text-2xl font-bold"},q={key:1,class:"cms-content-styled"},F=I({__name:"TextByImageBlock",props:{blockData:{type:Object,required:!0}},setup(l){const t=l,{speedSize:v}=N(),p=r(()=>{const o=t.blockData.insetImage?"p-5":"";return t.blockData.width==="standard"?`${o} mx-auto max-w-screen-xl`:t.blockData.width==="wide"?`${o} mx-auto max-w-screen-3xl`:`${o} mx-auto max-w-screen-3xl`}),D=r(()=>t.blockData.imagePosition&&t.blockData.imagePosition==="right"?"sm:flex-row-reverse":"sm:flex-row"),b=r(()=>{if(!t.blockData.imageWidthMobile)return"w-full";switch(t.blockData.imageWidthMobile){case"third":return"w-1/3";case"half":return"w-1/2";default:return"w-full"}}),_=r(()=>t.blockData.imageWidth?t.blockData.imageWidth==="third"?`${b.value} sm:w-1/3`:`${b.value} sm:w-1/2`:"sm:w-1/3"),y=r(()=>a.value?a.value.position==="left"?"flex justify-left":a.value.position==="center"?"flex justify-center":"flex justify-end":""),W=r(()=>{if(!a.value)return"";if(a.value.style==="primary")return"bg-ribble text-white hover:bg-ribble hover:text-white";if(a.value.style==="secondary")return"bg-white text-ribble border border-ribble hover:text-ribble"}),f=r(()=>{if(!t.blockData.textPosition)return"content-start";switch(t.blockData.textPosition){case"middle":return"content-center";case"bottom":return"content-end";default:return"content-start"}}),$=r(()=>t.blockData.imageWidth?t.blockData.imageWidth==="third"?`${f.value} sm:w-3/4`:`${f.value} sm:w-1/2`:"sm:w-3/4"),a=r(()=>{var d;const o=t.blockData.cta;return!(o!=null&&o.length)||!((d=o[0])!=null&&d.ctaText)?null:t.blockData.cta[0]}),x=r(()=>{const o=t.blockData.image[0].url||"";return o?v(o):""}),h=r(()=>a.value?z(a.value.ctaUrl):"");return(o,d)=>{const j=C,g=S,P=M,B=T;return i(),s("div",{class:n(e(p))},[u("div",{class:n(["flex flex-col gap-6 md:gap-0",e(D)])},[e(x)?(i(),s("div",{key:0,class:n(["mx-auto",e(_)])},[c(g,{to:e(h),"aria-label":l.blockData.heading},{default:k(()=>[c(j,{src:e(x),alt:"",width:"600",height:"400",loading:"lazy",class:"object-cover w-full"},null,8,["src"])]),_:1},8,["to","aria-label"])],2)):m("",!0),u("div",{class:n([e($),"p-5 grid grid-cols-1"])},[u("div",null,[l.blockData.heading?(i(),s("h2",V,w(l.blockData.heading),1)):m("",!0),l.blockData.text?(i(),s("div",q,[c(P,{value:l.blockData.text},null,8,["value"])])):m("",!0),e(a)&&e(a).ctaUrl?(i(),s("div",{key:2,class:n([e(y),"mt-4"])},[c(g,{to:e(h),"aria-label":e(a).ctaText,class:n(["px-5 py-3 transition uppercase font-bold flex w-full items-center justify-center space-x-2 truncate md:w-auto",e(W)])},{default:k(()=>[u("span",null,w(e(a).ctaText),1),c(B,{name:"material-symbols-light:arrow-forward",size:"30"})]),_:1},8,["to","aria-label","class"])],2)):m("",!0)])],2)],2)],2)}}});export{F as default};
