import{av as j,l as N,u as w,q as y,r as c,j as e,z as E,W as u,a4 as D,f as L,K as A}from"./index-CHXls9zu.js";import{i as F}from"./service-oL2j9mvJ.js";import{A as k}from"./arrow-left-Bd_5kLEE.js";import{E as T}from"./earth-DJpy2nlu.js";import{C}from"./calendar-C4cui3Vf.js";import{M}from"./map-pin-DsozTM_p.js";import"./analytics-Bu8LxldC.js";function V(){const{region:s}=j(),m=N(),{t,i18n:r}=w("events"),{currentLanguage:h,getLocalizedPath:d}=y(),[g,p]=c.useState([]),[f,x]=c.useState(!0),b={"north-america":t("regions.northAmerica","North America"),europe:t("regions.europe","Europe"),"asia-pacific":t("regions.asiaPacific","Asia Pacific"),"middle-east":t("regions.middleEast","Middle East"),"latin-america":t("regions.latinAmerica","Latin America"),africa:t("regions.africa","Africa")};c.useEffect(()=>{async function a(){if(!s)return;x(!0);const i=await F(s);if(i.length===0){m(d("/events"));return}p(i),x(!1)}a()},[s,m,d]);const v=(a,i)=>{const n=new Date(a),o=new Date(i);return n.getMonth()===o.getMonth()&&n.getFullYear()===o.getFullYear()?`${new Intl.DateTimeFormat(r.language,{month:"short",day:"numeric"}).format(n)} - ${new Intl.DateTimeFormat(r.language,{day:"numeric",year:"numeric"}).format(o)}`:`${new Intl.DateTimeFormat(r.language,{month:"short",day:"numeric",year:"numeric"}).format(n)} - ${new Intl.DateTimeFormat(r.language,{month:"short",day:"numeric",year:"numeric"}).format(o)}`},l=s?b[s]||s:"";return e.jsxs(e.Fragment,{children:[e.jsx(E,{noindex:h!=="en",title:t("regions.meta.title","{{region}} Events | Cendra",{region:l}),description:t("regions.meta.description","Discover hospitality events in {{region}}.",{region:l})}),e.jsxs("section",{className:"relative pt-32 pb-16 md:pt-40 md:pb-20 overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary-700 via-primary-600 to-primary-700"}),e.jsx("div",{className:"absolute inset-0 bg-[url('/noise.png')] opacity-[0.03]"}),e.jsxs("div",{className:"relative z-10 max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs(u,{to:"/events",className:"inline-flex items-center gap-2 text-white/70 hover:text-white mb-8 transition-colors",children:[e.jsx(k,{className:"w-4 h-4"}),t("detail.backToEvents","Back to events")]}),e.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 bg-white/10 border border-white/20 rounded-full text-sm font-medium text-white/90 mb-6",children:[e.jsx(T,{className:"w-4 h-4"}),t("regions.badge","Events by Region")]}),e.jsx("h1",{className:"text-4xl md:text-5xl lg:text-6xl font-bold text-white mb-4",children:l}),e.jsx("p",{className:"text-lg text-white/80",children:t("regions.subtitle","{{count}} events found",{count:g.length})})]})]}),e.jsx("section",{className:"py-16 md:py-24 bg-background content-auto-xl",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:f?e.jsx("div",{className:"grid gap-6 md:grid-cols-2 lg:grid-cols-3",children:[1,2,3].map(a=>e.jsx("div",{className:"animate-pulse bg-muted rounded-xl h-64"},a))}):e.jsx("div",{className:"grid gap-6 md:grid-cols-2 lg:grid-cols-3",children:g.map(a=>e.jsx(u,{to:`/events/${a.slug}`,className:"group block",children:e.jsx("article",{className:"h-full bg-card border border-border rounded-xl overflow-hidden transition-all duration-300 hover:shadow-lg hover:border-primary/30 hover:-translate-y-1",children:e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground mb-3",children:[e.jsx(C,{className:"w-4 h-4"}),e.jsx("span",{children:v(a.startDate,a.endDate)}),a.isVerified&&e.jsxs(D,{variant:"outline",className:"ml-auto text-success-600 border-success-600/30 bg-success-600/10",children:[e.jsx(L,{className:"w-3 h-3 mr-1"}),t("verified","Verified")]})]}),e.jsx("h3",{className:"text-lg font-semibold mb-2 group-hover:text-primary transition-colors line-clamp-2",children:a.name}),e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground mb-4",children:[e.jsx(M,{className:"w-4 h-4"}),e.jsxs("span",{children:[a.city,", ",a.country]})]}),a.description&&e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:a.description})]})})},a.id))})})}),e.jsx(A,{})]})}export{V as default};