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 O,q as V,w as Q,k as T,t as z,x as U,m as j,h as F,y as W,F as d,E as K,o as w,B as X,n as Y,p as Z,G as x,K as Ee,H as oe,l as ce}from"./index-05c131b6.js";import{A as me}from"./Avatar-6e9189b6.js";import{E as De}from"./EventTypeLabel-a320bc18.js";import{u as fe,b as Ie}from"./stores-5a24e4f1.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;aw(t[a],1,1,()=>{t[a]=null});return{c(){e=p("div");for(let a=0;aw(c[r],1,1,()=>{c[r]=null});return{c(){e=p("div"),n=p("div");for(let r=0;rw(t[a],1,1,()=>{t[a]=null});return{c(){for(let a=0;a0,L,G,R,le,y=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=T(),a=p("div"),r=p("a"),o=z(l),v=T(),y&&y.c(),u=T(),f=p("div"),I=p("div"),Q(k.$$.fragment),q=T(),b=p("div"),S=z($),C=T(),B=p("div"),M=z(ee),N=z("m"),P=T(),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=j(D),a=m(D,"DIV",{class:!0});var ae=g(a);r=m(ae,"A",{href:!0});var se=g(r);o=F(se,l),se.forEach(h),ae.forEach(h),v=j(D),y&&y.l(D),u=j(D),f=m(D,"DIV",{class:!0});var H=g(f);I=m(H,"DIV",{});var ne=g(I);U(k.$$.fragment,ne),ne.forEach(h),q=j(H),b=m(H,"DIV",{class:!0});var ie=g(b);S=F(ie,$),ie.forEach(h),C=j(H),B=m(H,"DIV",{class:!0});var J=g(B);M=F(J,ee),N=F(J,"m"),J.forEach(h),H.forEach(h),P=j(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?id="+i[1].id),_(a,"class","text-lg font-semibold"),_(b,"class","text-sm my-auto"),_(B,"class","text-xs my-auto"),_(f,"class","mt-2 text-sm flex flex-wrap gap-2"),_(e,"class",L="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){O(E,e,D),d(e,n),d(n,s),d(e,c),d(e,a),d(a,r),d(r,o),d(e,v),y&&y.m(e,null),d(e,u),d(e,f),d(f,I),W(k,I,null),d(f,q),d(f,b),d(b,S),d(f,C),d(f,B),d(B,M),d(B,N),d(e,P),A&&A.m(e,null),G=!0,R||(le=Ee(s,"click",i[5]),R=!0)},p(E,[D]){(!G||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&&y.p(E,D),te&&A.p(E,D),(!G||D&1&&L!==(L="transition-all mb-4 border px-3 py-2 rounded-md shadow "+(E[0].favoriteEvents.includes(E[1].id)?"bg-yellow-100":"")))&&_(e,"class",L)},i(E){G||(V(y),V(k.$$.fragment,E),V(A),G=!0)},o(E){w(y),w(k.$$.fragment,E),w(A),G=!1},d(E){E&&h(e),y&&y.d(),X(k),A&&A.d(),R=!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 q=null;return k.includes(f)?q=Object.assign(s,{favoriteEvents:k.filter(b=>b!==f)}):(k.push(f),q=Object.assign(s,{favoriteEvents:k})),q})}return i.$$set=u=>{"event"in u&&n(6,c=u.event)},[s,a,r,l,o,v,c]}class Fe extends ge{constructor(e){super();be(this,e,Be,Ae,ke,{event:6})}}export{Fe as E};