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