import{S as ge,i as be,s as ke,e as p,c as m,a as g,d as h,b as _,g as z,q as V,w as Q,k as O,t as j,x as U,m as T,h as q,y as W,F as d,E as H,o as y,B as X,n as Y,p as Z,G as x,K as Ee,H as oe,l as ce}from"./index-24e5a832.js";import{A as me}from"./Avatar-91f17a3c.js";import{E as De}from"./EventTypeLabel-482441d5.js";import{u as fe,b as Ie}from"./stores-13cf7036.js";function ue(i,e,n){const s=i.slice();return s[8]=e[n],s}function de(i,e,n){const s=i.slice();return s[11]=e[n],s}function he(i,e,n){const s=i.slice();return s[11]=e[n],s}function Ve(i){let e,n,s=i[2](i[1].speakers),t=[];for(let a=0;ay(t[a],1,1,()=>{t[a]=null});return{c(){e=p("div");for(let a=0;ay(c[r],1,1,()=>{c[r]=null});return{c(){e=p("div"),n=p("div");for(let r=0;ry(t[a],1,1,()=>{t[a]=null});return{c(){for(let a=0;a0,J,C,P,le,w=i[1].speakers&&i[1].speakers.length>0&&Ve(i);k=new De({props:{event:i[1]}});let A=te&&$e(i);return{c(){e=p("div"),n=p("div"),s=p("i"),c=O(),a=p("div"),r=p("a"),o=j(l),v=O(),w&&w.c(),u=O(),f=p("div"),I=p("div"),Q(k.$$.fragment),B=O(),b=p("div"),F=j($),N=O(),S=p("div"),K=j(ee),L=j("m"),M=O(),A&&A.c(),this.h()},l(E){e=m(E,"DIV",{class:!0});var D=g(e);n=m(D,"DIV",{class:!0});var re=g(n);s=m(re,"I",{class:!0,"utxo-event-id":!0}),g(s).forEach(h),re.forEach(h),c=T(D),a=m(D,"DIV",{class:!0});var ae=g(a);r=m(ae,"A",{href:!0});var se=g(r);o=q(se,l),se.forEach(h),ae.forEach(h),v=T(D),w&&w.l(D),u=T(D),f=m(D,"DIV",{class:!0});var G=g(f);I=m(G,"DIV",{});var ne=g(I);U(k.$$.fragment,ne),ne.forEach(h),B=T(G),b=m(G,"DIV",{class:!0});var ie=g(b);F=q(ie,$),ie.forEach(h),N=T(G),S=m(G,"DIV",{class:!0});var R=g(S);K=q(R,ee),L=q(R,"m"),R.forEach(h),G.forEach(h),M=T(D),A&&A.l(D),D.forEach(h),this.h()},h(){_(s,"class",t="fa-star "+(i[0].favoriteEvents.includes(i[1].id)?"fa-solid":"fa-regular")+" cursor-pointer"),_(s,"utxo-event-id",i[1].id),_(n,"class","float-right"),_(r,"href","/udalosti/"+i[1].id),_(a,"class","text-lg font-semibold"),_(b,"class","text-sm my-auto"),_(S,"class","text-xs my-auto"),_(f,"class","mt-2 text-sm flex flex-wrap gap-2"),_(e,"class",J="transition-all mb-4 border px-3 py-2 rounded-md shadow "+(i[0].favoriteEvents.includes(i[1].id)?"bg-yellow-100":""))},m(E,D){z(E,e,D),d(e,n),d(n,s),d(e,c),d(e,a),d(a,r),d(r,o),d(e,v),w&&w.m(e,null),d(e,u),d(e,f),d(f,I),W(k,I,null),d(f,B),d(f,b),d(b,F),d(f,N),d(f,S),d(S,K),d(S,L),d(e,M),A&&A.m(e,null),C=!0,P||(le=Ee(s,"click",i[5]),P=!0)},p(E,[D]){(!C||D&1&&t!==(t="fa-star "+(E[0].favoriteEvents.includes(E[1].id)?"fa-solid":"fa-regular")+" cursor-pointer"))&&_(s,"class",t),E[1].speakers&&E[1].speakers.length>0&&w.p(E,D),te&&A.p(E,D),(!C||D&1&&J!==(J="transition-all mb-4 border px-3 py-2 rounded-md shadow "+(E[0].favoriteEvents.includes(E[1].id)?"bg-yellow-100":"")))&&_(e,"class",J)},i(E){C||(V(w),V(k.$$.fragment,E),V(A),C=!0)},o(E){y(w),y(k.$$.fragment,E),y(A),C=!1},d(E){E&&h(e),w&&w.d(),X(k),A&&A.d(),P=!1,le()}}}function Be(i,e,n){let s,t;oe(i,fe,u=>n(0,s=u)),oe(i,Ie,u=>n(7,t=u));let{event:c}=e;const a=c;function r(u){if(!!u)return u.map(f=>t.spec.speakers.find(I=>I.id===f))}function l(u){const f=t.spec.tracks.find(I=>I.id===u);return f.shortname||f.name}function o(u){return t.spec.events.filter(f=>f.parent===u.id)}function v(u){const f=u.target.getAttribute("utxo-event-id");fe.update(I=>{const k=I.favoriteEvents;let B=null;return k.includes(f)?B=Object.assign(s,{favoriteEvents:k.filter(b=>b!==f)}):(k.push(f),B=Object.assign(s,{favoriteEvents:k})),localStorage.setItem("userData",JSON.stringify(B)),B})}return i.$$set=u=>{"event"in u&&n(6,c=u.event)},[s,a,r,l,o,v,c]}class qe extends ge{constructor(e){super();be(this,e,Be,Ae,ke,{event:6})}}export{qe as E};