import{d as b,aV as y,at as k,am as v,m as n,b as s,t as i,ab as r,F as p,n as f,au as w,o as a,a9 as c,c as I,w as _,f as $,p as B,h as C,D as N,aj as V}from"./index-BTTFajzp.js";const D={class:"mx-auto w-full max-w-[1105px] select-none space-y-6 p-5"},L={class:"text-xl font-semibold"},P={key:0,class:"grid w-full grid-cols-1 gap-4 sm:grid-cols-2 md:gap-6"},j={key:1,class:"grid w-full grid-cols-1 gap-4 sm:grid-cols-2 md:gap-6"},S={class:"promotion-card-overlay flex h-full w-full items-end p-6"},z={class:"max-w-[80%]"},F={class:"mb-2 text-lg font-semibold md:text-2xl"},K={class:"line-clamp-3 max-w-[70%] text-sm text-gray-500 sm:line-clamp-2"},A={key:2,class:"text-sm text-gray-400"},T={path:"/promotions",meta:{auth:!1,crumb:[{textKey:"breadcrumb.home",link:"/"},{textKey:"breadcrumb.promotions",link:"/promotions"}]}},E=b({__name:"Index",setup(M){const d=y(),{getCloudflareImage:g}=k();v(()=>{d.fetchPromotions()});function m(o){return o.name||o.title||c("promotions.fallback-name")}function x(o){return`/promotions/${o.slug||o.id}`}function h(o){const e=o.image;return o.image_cf?g(o.image_cf,e,"banDesktop"):e}function u(o){const e=m(o).trim(),l=c("promotions.join-aria-prefix").trim();return e?l?`${l} ${e}`:e:l}return(o,e)=>{const l=w("router-link");return a(),n("section",D,[s("header",null,[s("h1",L,i(r(c)("promotions.title")),1)]),r(d).isLoading?(a(),n("div",P,[(a(),n(p,null,f(4,t=>s("div",{key:`promotion-loading-${t}`,class:"h-64 animate-pulse rounded-md bg-white/10"})),64))])):r(d).hasList?(a(),n("div",j,[(a(!0),n(p,null,f(r(d).list,t=>(a(),I(l,{key:`${t.id}-${t.slug??t.title??t.name??"promotion"}`,to:x(t),class:"group h-64 overflow-hidden rounded-md bg-cover transition-transform duration-150 ease-in hover:scale-105",style:N({backgroundImage:`url('${h(t)}')`})},{default:_(()=>[s("div",S,[s("div",z,[s("div",F,i(m(t)),1),s("p",K,i(t.description),1),$(B,{color:"primary",size:"x-large",class:"mt-6","aria-label":u(t),title:u(t)},{default:_(()=>[C(i(r(c)("promotions.join")),1)]),_:1},8,["aria-label","title"])])])]),_:2},1032,["to","style"]))),128))])):(a(),n("p",A,i(r(c)("promotions.empty")),1))])}}}),q=V(E,[["__scopeId","data-v-07fe9bf6"]]);export{q as default,T as page};