1import{d as L,av as T,a6 as E,a8 as N,j as s,az as i,aA as d,aB as t,ax as r,aX as U,aF as B,b8 as c,aI as n,b4 as m,aG as x,aC as R,aD as V,f}from"./6-lxWE7b.js";import{_ as Z}from"./w_yVUnbT.js";import{u as F}from"./CiviuhOd.js";const K={key:0,class:"flex flex-1 flex-col overflow-hidden"},P={class:"bg-white/80 px-6 py-5 backdrop-blur-xl dark:bg-gray-800/80"},M={class:"flex items-center gap-4"},W={class:"flex-1"},G={class:"flex items-center gap-2"},X={key:0,class:"flex items-center gap-1 text-xs text-[#6c5d73]"},q={class:"text-2xl font-bold text-[#1d191f] dark:text-white"},H={class:"flex-1 overflow-y-auto p-6"},J={class:"mx-auto max-w-4xl"},Q={class:"grid gap-6 lg:grid-cols-3"},Y={class:"space-y-6 lg:col-span-2"},ee={class:"rounded-2xl bg-white p-6 shadow-sm dark:bg-gray-800"},te={class:"whitespace-pre-wrap text-[#6c5d73] dark:text-gray-400"},se={class:"rounded-2xl bg-white p-6 shadow-sm dark:bg-gray-800"},oe={class:"mb-4 flex items-center justify-between"},ae={class:"text-lg font-semibold text-[#1d191f] dark:text-white"},ne={key:0},ie={key:0,class:"grid grid-cols-2 gap-3 sm:grid-cols-3"},de={class:"truncate text-sm font-medium text-[#1d191f] dark:text-white"},le={key:1,class:"py-8 text-center text-sm text-[#6c5d73]"},re={class:"space-y-6"},ce={class:"rounded-2xl bg-white p-6 shadow-sm dark:bg-gray-800"},ue={class:"mb-4 flex items-center gap-4"},me={class:"text-xs font-medium uppercase"},xe={class:"text-2xl font-bold"},ge={class:"text-sm font-medium text-[#1d191f] dark:text-white"},fe={class:"text-sm text-[#6c5d73]"},ve={class:"mb-4 flex items-start gap-3 rounded-xl bg-gray-50 p-3 dark:bg-gray-700/50"},pe={class:"text-sm font-medium text-[#1d191f] dark:text-white"},he={key:0,class:"text-xs text-[#6c5d73]"},ye={key:0,class:"mb-4"},_e={class:"mb-1 flex items-center justify-between text-sm"},be={class:"font-medium text-[#1d191f] dark:text-white"},ke={class:"h-2 overflow-hidden rounded-full bg-gray-100 dark:bg-gray-700"},we={key:0,class:"mt-2 text-xs text-amber-600"},Ce={class:"space-y-2"},ze=["disabled"],Ae={key:1,class:"space-y-2"},Se={class:"flex items-center justify-center gap-2 rounded-xl bg-emerald-50 py-3 text-sm font-semibold text-emerald-600 dark:bg-emerald-900/20"},je={class:"rounded-2xl bg-white p-6 shadow-sm dark:bg-gray-800"},Oe={class:"flex items-center gap-3"},Ie={class:"font-medium text-[#1d191f] dark:text-white"},De={key:1,class:"flex flex-1 items-center justify-center"},Ne=L({__name:"[eventId]",setup($e){const y=T(),u=E("community",f(void 0)),{getEvent:_,rsvpEvent:b,isUserAttending:k}=F(),e=f(null),v=f(!0),w={meetup:"Stretnutie",workshop:"Workshop",webinar:"Webinar",social:"Socialne",other:"Ine"};N(()=>u.value,async a=>{a&&await p()},{immediate:!0});async function p(){if(!u.value)return;const a=y.params.eventId;if(a)try{v.value=!0;const o=await _(u.value.id,a);o&&(e.value={...o,isAttending:k(o)})}catch(o){console.error("Failed to load event:",o)}finally{v.value=!1}}function C(a){return w[a]||a}function z(a){return a.toLocaleDateString("sk-SK",{month:"short"}).toUpperCase()}function A(a){return a.getDate().toString()}function S(a){return a.toLocaleDateString("sk-SK",{weekday:"long",day:"numeric",month:"long",year:"numeric"})}function j(a){return a.toLocaleTimeString("sk-SK",{hour:"2-digit",minute:"2-digit"})}async function h(a){if(!e.value||!u.value)return;const o=e.value.isAttending;e.value.isAttending=a==="going";try{await b(u.value.id,e.value.id,a),await p()}catch(l){console.error("Failed to RSVP:",l),e.value.isAttending=o}}function O(){navigator.share?navigator.share({title:e.value?.title,text:e.value?.description,url:window.location.href}):navigator.clipboard.writeText(window.location.href)}function I(){if(!e.value)return;const a=e.value.date.toISOString().replace(/[-:]/g,"").split(".")[0]+"Z",o=new Date(e.value.date.getTime()+7200*1e3).toISOString().replace(/[-:]/g,"").split(".")[0]+"Z",l=`https://calendar.google.com/calendar/render?action=TEMPLATE&text=${encodeURIComponent(e.value.title)}&dates=${a}/${o}&details=${encodeURIComponent(e.value.description||"")}&location=${encodeURIComponent(e.value.location||"Online")}`;window.open(l,"_blank")}return(a,o)=>{const l=B,D=Z;return s(e)&&s(u)?(i(),d("div",K,[t("div",P,[t("div",M,[r(D,{to:`/komunity/${s(u).slug}/events`,class:"flex size-10 items-center justify-center rounded-xl text-[#6c5d73] transition-colors hover:bg-gray-100 dark:hover:bg-gray-700"},{default:U(()=>[r(l,{name:"arrow-left",class:"size-5"})]),_:1},8,["to"]),t("div",W,[t("div",G,[t("span",{class:"rounded-full px-2 py-0.5 text-xs font-medium",style:c({backgroundColor:s(e).color+"20",color:s(e).color})},n(C(s(e).type)),5),s(e).isOnline?(i(),d("span",X,[r(l,{name:"video",class:"size-3"}),o[2]||(o[2]=m(" Online ",-1))])):x("",!0)]),t("h1",q,n(s(e).title),1)]),t("button",{class:"flex size-10 items-center justify-center rounded-xl text-[#6c5d73] transition-colors hover:bg-gray-100 dark:hover:bg-gray-700",onClick:O},[r(l,{name:"share",class:"size-5"})])])]),t("div",H,[t("div",J,[t("div",Q,[t("div",Y,[t("div",{class:"flex h-48 items-center justify-center rounded-2xl",style:c({backgroundColor:s(e).color+"15"})},[r(l,{name:"calendar",class:"size-20",style:c({color:s(e).color})},null,8,["style"])],4),t("div",ee,[o[3]||(o[3]=t("h2",{class:"mb-4 text-lg font-semibold text-[#1d191f] dark:text-white"}," O udalosti ",-1)),t("p",te,n(s(e).description||"Ziadny popis."),1)]),t("div",se,[t("div",oe,[t("h2",ae,[m(" Ucastnici ("+n(s(e).attendees.length),1),s(e).maxAttendees?(i(),d("span",ne,"/"+n(s(e).maxAttendees),1)):x("",!0),o[4]||(o[4]=m(") ",-1))])]),s(e).attendees.length>0?(i(),d("div",ie,[(i(!0),d(R,null,V(s(e).attendees,(g,$)=>(i(),d("div",{key:$,class:"flex items-center gap-3 rounded-xl bg-gray-50 p-3 dark:bg-gray-700/50"},[t("div",{class:"flex size-10 items-center justify-center rounded-xl text-sm font-bold text-white",style:c({backgroundColor:s(e).color})},n(g.charAt(0)),5),t("span",de,n(g),1)]))),128))])):(i(),d("div",le," Zatial ziadni ucastnici "))])]),t("div",re,[t("div",ce,[t("div",ue,[t("div",{class:"rounded-xl px-4 py-3 text-center shadow-lg",style:c({backgroundColor:s(e).color,color:"white"})},[t("div",me,n(z(s(e).date)),1),t("div",xe,n(A(s(e).date)),1)],4),t("div",null,[t("div",ge,n(S(s(e).date)),1),t("div",fe,n(j(s(e).date)),1)])]),t("div",ve,[r(l,{name:s(e).isOnline?"video":"location",class:"mt-0.5 size-5 text-[#6c5d73]"},null,8,["name"]),t("div",null,[t("div",pe,n(s(e).isOnline?"Online udalost":s(e).location),1),s(e).isOnline?(i(),d("div",he," Odkaz bude zdielany pred udalostou ")):x("",!0)])]),s(e).maxAttendees?(i(),d("div",ye,[t("div",_e,[o[5]||(o[5]=t("span",{class:"text-[#6c5d73]"},"Kapacita",-1)),t("span",be,n(s(e).attendees.length)+"/"+n(s(e).maxAttendees),1)]),t("div",ke,[t("div",{class:"h-full rounded-full transition-all",style:c({width:`${s(e).attendees.length/s(e).maxAttendees*100}
1%`,backgroundColor:s(e).color})},null,4)]),s(e).attendees.length>=s(e).maxAttendees?(i(),d("div",we," Udalost je plne obsadena ")):x("",!0)])):x("",!0),t("div",Ce,[s(e).isAttending?(i(),d("div",Ae,[t("div",Se,[r(l,{name:"check-circle",class:"size-5"}),o[6]||(o[6]=m(" Idete na tuto udalost ",-1))]),t("button",{class:"w-full rounded-xl bg-gray-100 py-3 text-sm font-medium text-[#6c5d73] transition-colors hover:bg-gray-200 dark:bg-gray-700 dark:hover:bg-gray-600",onClick:o[1]||(o[1]=g=>h("not_going"))}," Zrusit ucast ")])):(i(),d("button",{key:0,class:"w-full rounded-xl py-3 text-sm font-semibold text-white shadow-lg transition-all hover:opacity-90",style:c({backgroundColor:s(e).color}),disabled:s(e).maxAttendees&&s(e).attendees.length>=s(e).maxAttendees,onClick:o[0]||(o[0]=g=>h("going"))}," Zucastnit sa ",12,ze))])]),t("div",je,[o[8]||(o[8]=t("h3",{class:"mb-4 text-sm font-semibold uppercase tracking-wider text-[#6c5d73]"}," Organizator ",-1)),t("div",Oe,[t("div",{class:"flex size-12 items-center justify-center rounded-xl text-lg font-bold text-white",style:c({backgroundColor:s(e).color})},n(s(e).createdByName.charAt(0)),5),t("div",null,[t("div",Ie,n(s(e).createdByName),1),o[7]||(o[7]=t("div",{class:"text-xs text-[#6c5d73]"}," Organizator ",-1))])])]),t("button",{class:"flex w-full items-center justify-center gap-2 rounded-xl border-2 border-gray-200 py-3 text-sm font-medium text-[#6c5d73] transition-colors hover:border-[#047274] hover:text-[#047274] dark:border-gray-600",onClick:I},[r(l,{name:"calendar-plus",class:"size-5"}),o[9]||(o[9]=m(" Pridat do kalendara ",-1))])])])])])])):(i(),d("div",De,[...o[10]||(o[10]=[t("div",{class:"flex flex-col items-center gap-4"},[t("div",{class:"relative"},[t("div",{class:"size-16 animate-spin rounded-full border-4 border-[#047274]/20 border-t-[#047274]"})]),t("span",{class:"text-sm text-[#6c5d73]"},"Nacitavam udalost...")],-1)])]))}}});
1export{Ne as default}; 2//# sourceMappingURL=CUzs2L2R.js.map
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.