1import{U as C,w as D,i as F,m as q,K as E,r as I,o as s,c as o,e as l,d as y,l as L,t as O,h as u,b as t,f as w,g as k,F as T,q as U,v as z,S as M,j as V,s as R,x as n}from"./BqlVcf9b.js";import{_ as K}from"./D_kwd_nb.js";import{s as $}from"./L9Z0dCQw.js";import{q as G}from"./DhHIMxL1.js";import{_ as H}from"./DlAUqK2U.js";import"./2U1aq1Aw.js";import"./Cr-qX6MY.js";import"./BSMyznhV.js";import"./BZ8Ga3jb.js";import"./CvyV-D1A.js";import"./Boy_mhVZ.js";import"./CvWtsUxR.js";import"./CdlPS3v-.js";import"./CW5WKd5X.js";const J=C("/images/home/promo-decor-left.webp"),Q=C("/images/home/promo-decor-right.webp"),W={class:"relative overflow-hidden py-16 pb-28 md:py-20 md:pb-36"},X={class:"container relative z-10 flex flex-col items-center gap-10"},Y={key:0,class:"text-center font-heading text-heading-2 text-headings"},Z={key:1,class:"w-full"},ee=["src","alt","onClick"],te={key:2,class:"mt-6 flex justify-center"},se=["src","alt"],oe={__name:"SectionFeaturedPromotions",props:{section:Object},async setup(f){let c,g;const p=n(!1),m=n(""),d=n(""),S=e=>{e.image?.url&&(m.value=e.image.url,d.value=e.title,p.value=!0)},{data:P}=([c,g]=D(()=>F("promotions",()=>G("promotions").order("order","ASC").all())),c=await c,g(),c),a=V(()=>P.value||[]),v=n(null),h=n(null),_=n(1),N=V(()=>a.value.length>_.value),b=async()=>{await R();const e=v.value;e&&(Object.assign(e,{slidesPerView:1,spaceBetween:24,speed:500,loop:a.value?.length>2,pagination:{el:h.value?.paginationEl,clickable:!0,bulletClass:"swiper-nav-bullet",bulletActiveClass:"swiper-nav-bullet-active"},breakpoints:{768:{slidesPerView:2,spaceBetween:24},992:{slidesPerView:3,spaceBetween:24},1200:{slidesPerView:4,spaceBetween:24}}}),e.initialize(),_.value=e.swiper?.params?.slidesPerView||1,e.addEventListener("swiperbreakpoint",()=>{_.value=e.swiper?.params?.slidesPerView||1}))};return q(()=>{a.value?.length&&b()}),E(a,e=>{e?.length&&b()}),(e,i)=>{const j=z,B=K,x=I("reveal");return s(),o("section",W,[i[1]||(i[1]=l("img",{src:J,alt:"",class:"absolute -left-20 -top-4 w-1/3 rotate-[2deg] object-contain"},null,-1)),i[2]||(i[2]=l("img",{src:Q,alt:"",class:"absolute -top-4 right-0 w-1/3 -scale-y-100 rotate-180 object-contain"},null,-1)),l("div",X,[f.section?.title?y((s(),o("h2",Y,[L(O(f.section.title),1)])),[[x]]):u("",!0),t(a)?.length?y((s(),o("div",Z,[w(j,null,{default:k(()=>[l("swiper-container",{ref_key:"promoSlider",ref:v,init:"false"},[(s(!0),o(T,null,U(t(a),(r,A)=>(s(),o("swiper-slide",{key:A},[l("img",{src:r.image?.url?r.image?.url:"/images/placeholder-promotion.svg",alt:r.title,class:"aspect-[4/5] w-full cursor-pointer rounded-2xl object-cover transition-transform duration-300 hover:scale-[1.02]",onClick:ae=>S(r)},null,8,ee)]))),128))],512)]),_:1})])),[[x,{animation:"fade-up",delay:150}]]):u("",!0),t(N)?(s(),o("div",te,[w(B,{ref_key:"swiperNav",ref:h,"swiper-ref":t(v)},null,8,["swiper-ref"])])):u("",!0),w(t($),{visible:t(p),"onUpdate:visible":i[0]||(i[0]=r=>M(p)?p.value=r:null),modal:"",dismissableMask:"",header:t(d),class:"max-h-[90vh] max-w-[90vw]",pt:{content:{class:"!p-2"}}},{default:k(()=>[t(m)?(s(),o("img",{key:0,src:t(m),alt:t(d),class:"max-h-[80vh] w-auto rounded-xl"},null,8,se)):u("",!0)]),_:1},8,["visible","header"])])])}}},he=H(oe,[["__scopeId","data-v-6827b8a4"]]);export{he as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.