@nice2dev/events 1.0.28 → 1.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,786 +1,696 @@
1
- import { jsxs as t, jsx as e, Fragment as ue } from "react/jsx-runtime";
2
- import { forwardRef as P, useState as w, useRef as pe, useEffect as me, useCallback as E, useMemo as R } from "react";
3
- const be = P(
4
- function(x, A) {
1
+ import { jsxs as i, jsx as e, Fragment as nn } from "react/jsx-runtime";
2
+ import { NtdHeart as tn, NtdTrash as an, NtdPlay as ln, NtdImage as rn, NtdSparkle as fe, NtdCamera as Ne, NtdMicrophone as _e, NtdHelp as be, NtdMusic as q, NtdGamepad as ke, NtdThumbsUp as cn, NtdClipboardCheck as sn, NtdMedal as ue, NtdTrophy as on } from "@nice2dev/icons";
3
+ import { NiceUpload as dn, NiceTextInput as T, NiceCardGroup as mn, NiceAvatarGroup as he, NiceAvatar as Z, NiceBadge as W, NiceButton as B, NiceSelect as ve, NiceAmountBreakdown as pn, NiceToggle as ge, NiceTabs as un, NiceTextArea as hn } from "@nice2dev/ui";
4
+ import ne, { forwardRef as E, useState as f, useMemo as I, useCallback as O } from "react";
5
+ import { NiceIcon as L } from "@nice2dev/ui-core";
6
+ const vn = ({ item: z }) => {
7
+ const [N, C] = f(!1), t = z.thumbnailUrl ?? z.url;
8
+ return z.type === "video" ? /* @__PURE__ */ e("div", { className: "nice-event-media__video-thumb", children: /* @__PURE__ */ e(ln, { size: 26 }) }) : N || !t ? /* @__PURE__ */ e("div", { className: "nice-event-media__broken", title: "Image unavailable", children: /* @__PURE__ */ e(rn, { size: 24 }) }) : /* @__PURE__ */ e(
9
+ "img",
10
+ {
11
+ src: t,
12
+ alt: z.caption ?? "",
13
+ className: "nice-event-media__thumb",
14
+ loading: "lazy",
15
+ onError: () => C(!0)
16
+ }
17
+ );
18
+ }, wn = E(
19
+ function(N, C) {
5
20
  const {
6
- messages: a,
7
- currentUserId: y,
8
- onSend: m,
9
- onReact: v,
10
- reactions: _ = ["👍", "❤️", "😂", "🎉", "🔥"],
11
- readOnly: g = !1,
12
- placeholder: S = "Type a message…",
13
- autoScroll: N = !0,
14
- className: f,
15
- style: C
16
- } = x, [s, u] = w(""), k = pe(null);
17
- me(() => {
18
- N && k.current && k.current.scrollIntoView({ behavior: "smooth" });
19
- }, [a.length, N]);
20
- const b = E(() => {
21
- !s.trim() || !m || (m(s.trim(), "text"), u(""));
22
- }, [s, m]), p = (c) => {
23
- c.key === "Enter" && !c.shiftKey && (c.preventDefault(), b());
24
- };
25
- return /* @__PURE__ */ t("div", { ref: A, className: `nice-event-chat ${f ?? ""}`, style: C, children: [
26
- /* @__PURE__ */ t("div", { className: "nice-event-chat__messages", children: [
27
- a.length === 0 && /* @__PURE__ */ e("p", { className: "nice-event-chat__empty", children: "No messages yet. Start the conversation!" }),
28
- a.map((c) => {
29
- const n = c.senderId === y;
30
- return c.type === "system" || c.type === "announcement" ? /* @__PURE__ */ t(
31
- "div",
32
- {
33
- className: `nice-event-chat__system nice-event-chat__${c.type}`,
34
- children: [
35
- /* @__PURE__ */ e("span", { children: c.content }),
36
- /* @__PURE__ */ e("time", { children: c.timestamp })
37
- ]
38
- },
39
- c.id
40
- ) : /* @__PURE__ */ t(
41
- "div",
42
- {
43
- className: `nice-event-chat__bubble ${n ? "nice-event-chat__bubble--own" : ""}`,
44
- children: [
45
- !n && /* @__PURE__ */ t("div", { className: "nice-event-chat__sender", children: [
46
- c.senderAvatarUrl && /* @__PURE__ */ e("img", { src: c.senderAvatarUrl, alt: "", className: "nice-event-chat__avatar" }),
47
- /* @__PURE__ */ e("strong", { children: c.senderName })
48
- ] }),
49
- c.type === "image" ? /* @__PURE__ */ e("img", { src: c.content, alt: "Shared image", className: "nice-event-chat__image" }) : /* @__PURE__ */ e("p", { className: "nice-event-chat__text", children: c.content }),
50
- /* @__PURE__ */ t("div", { className: "nice-event-chat__meta", children: [
51
- /* @__PURE__ */ e("time", { children: c.timestamp }),
52
- c.reactions && Object.keys(c.reactions).length > 0 && /* @__PURE__ */ e("span", { className: "nice-event-chat__reactions", children: Object.entries(c.reactions).map(([i, h]) => /* @__PURE__ */ t(
53
- "button",
54
- {
55
- className: "nice-event-chat__reaction",
56
- onClick: () => v == null ? void 0 : v(c.id, i),
57
- children: [
58
- i,
59
- " ",
60
- h
61
- ]
62
- },
63
- i
64
- )) })
65
- ] }),
66
- v && !g && /* @__PURE__ */ e("div", { className: "nice-event-chat__react-bar", children: _.map((i) => /* @__PURE__ */ e("button", { onClick: () => v(c.id, i), title: i, children: i }, i)) })
67
- ]
68
- },
69
- c.id
70
- );
71
- }),
72
- /* @__PURE__ */ e("div", { ref: k })
73
- ] }),
74
- !g && /* @__PURE__ */ t("div", { className: "nice-event-chat__input-bar", children: [
75
- /* @__PURE__ */ e(
76
- "textarea",
77
- {
78
- value: s,
79
- onChange: (c) => u(c.target.value),
80
- onKeyDown: p,
81
- placeholder: S,
82
- rows: 1
83
- }
84
- ),
85
- /* @__PURE__ */ e("button", { onClick: b, disabled: !s.trim(), children: "Send" })
86
- ] })
87
- ] });
88
- }
89
- ), X = {
90
- invited: "#3b82f6",
91
- confirmed: "#22c55e",
92
- declined: "#ef4444",
93
- "checked-in": "#8b5cf6",
94
- "no-show": "#9ca3af"
95
- }, Z = {
96
- host: "👑 Host",
97
- "co-host": "🎯 Co-Host",
98
- moderator: "🛡️ Moderator",
99
- participant: "👤 Participant",
100
- spectator: "👁️ Spectator",
101
- vip: "⭐ VIP"
102
- }, ke = P(
103
- function(x, A) {
104
- const {
105
- participants: a,
106
- currentParticipantId: y,
107
- onInvite: m,
108
- onRemove: v,
109
- onRoleChange: _,
110
- onCheckIn: g,
111
- onParticipantClick: S,
112
- showQR: N = !1,
113
- editable: f = !1,
114
- maxParticipants: C,
115
- className: s,
116
- style: u
117
- } = x, [k, b] = w(""), [p, c] = w(""), n = R(() => {
118
- let h = a;
119
- if (p && (h = h.filter((l) => l.status === p)), k.trim()) {
120
- const l = k.toLowerCase();
121
- h = h.filter((o) => o.name.toLowerCase().includes(l));
122
- }
123
- return h;
124
- }, [a, p, k]), d = R(() => {
125
- const h = /* @__PURE__ */ new Map(), l = [
126
- "host",
127
- "co-host",
128
- "moderator",
129
- "vip",
130
- "participant",
131
- "spectator"
132
- ];
133
- for (const o of l)
134
- h.set(o, []);
135
- for (const o of n)
136
- h.has(o.role) || h.set(o.role, []), h.get(o.role).push(o);
137
- return Array.from(h.entries()).filter(([, o]) => o.length > 0);
138
- }, [n]), i = R(() => {
139
- const h = {};
140
- for (const l of a)
141
- h[l.status] = (h[l.status] ?? 0) + 1;
142
- return h;
143
- }, [a]);
144
- return /* @__PURE__ */ t("div", { ref: A, className: `nice-event-participants ${s ?? ""}`, style: u, children: [
145
- /* @__PURE__ */ t("div", { className: "nice-event-participants__header", children: [
146
- /* @__PURE__ */ t("h3", { children: [
147
- "Participants (",
148
- a.length,
149
- C ? ` / ${C}` : "",
150
- ")"
151
- ] }),
152
- f && m && /* @__PURE__ */ e(
153
- "button",
154
- {
155
- onClick: m,
156
- disabled: C ? a.length >= C : !1,
157
- children: "+ Invite"
158
- }
159
- )
160
- ] }),
161
- /* @__PURE__ */ e("div", { className: "nice-event-participants__summary", children: Object.entries(i).map(([h, l]) => /* @__PURE__ */ t("span", { className: "nice-event-participants__stat", children: [
162
- /* @__PURE__ */ e(
163
- "span",
164
- {
165
- className: "nice-event-participants__dot",
166
- style: { backgroundColor: X[h] }
167
- }
168
- ),
169
- h,
170
- ": ",
171
- l
172
- ] }, h)) }),
173
- /* @__PURE__ */ t("div", { className: "nice-event-participants__toolbar", children: [
174
- /* @__PURE__ */ e(
175
- "input",
176
- {
177
- type: "text",
178
- value: k,
179
- onChange: (h) => b(h.target.value),
180
- placeholder: "Search…"
181
- }
182
- ),
183
- /* @__PURE__ */ t(
184
- "select",
185
- {
186
- value: p,
187
- onChange: (h) => c(h.target.value),
188
- children: [
189
- /* @__PURE__ */ e("option", { value: "", children: "All" }),
190
- /* @__PURE__ */ e("option", { value: "invited", children: "Invited" }),
191
- /* @__PURE__ */ e("option", { value: "confirmed", children: "Confirmed" }),
192
- /* @__PURE__ */ e("option", { value: "declined", children: "Declined" }),
193
- /* @__PURE__ */ e("option", { value: "checked-in", children: "Checked In" }),
194
- /* @__PURE__ */ e("option", { value: "no-show", children: "No Show" })
195
- ]
196
- }
197
- )
198
- ] }),
199
- d.map(([h, l]) => /* @__PURE__ */ t("div", { className: "nice-event-participants__group", children: [
200
- /* @__PURE__ */ t("h4", { className: "nice-event-participants__role-label", children: [
201
- Z[h],
202
- " (",
203
- l.length,
204
- ")"
205
- ] }),
206
- l.map((o) => /* @__PURE__ */ t(
207
- "div",
208
- {
209
- className: `nice-event-participants__item ${o.id === y ? "nice-event-participants__item--self" : ""}`,
210
- onClick: () => S == null ? void 0 : S(o),
211
- children: [
212
- o.avatarUrl ? /* @__PURE__ */ e("img", { src: o.avatarUrl, alt: "", className: "nice-event-participants__avatar" }) : /* @__PURE__ */ e("span", { className: "nice-event-participants__avatar-placeholder", children: o.name.charAt(0) }),
213
- /* @__PURE__ */ t("div", { className: "nice-event-participants__info", children: [
214
- /* @__PURE__ */ e("span", { className: "nice-event-participants__name", children: o.name }),
215
- /* @__PURE__ */ e(
216
- "span",
217
- {
218
- className: "nice-event-participants__status",
219
- style: { color: X[o.status] },
220
- children: o.status
221
- }
222
- ),
223
- o.score != null && /* @__PURE__ */ t("span", { className: "nice-event-participants__score", children: [
224
- "Score: ",
225
- o.score
226
- ] })
227
- ] }),
228
- N && o.qrCode && /* @__PURE__ */ e("span", { className: "nice-event-participants__qr", title: "QR Code", children: "📱" }),
229
- f && /* @__PURE__ */ t("div", { className: "nice-event-participants__actions", children: [
230
- _ && /* @__PURE__ */ e(
231
- "select",
232
- {
233
- value: o.role,
234
- onChange: (I) => _(o.id, I.target.value),
235
- onClick: (I) => I.stopPropagation(),
236
- children: Object.entries(Z).map(([I, O]) => /* @__PURE__ */ e("option", { value: I, children: O }, I))
237
- }
238
- ),
239
- g && o.status === "confirmed" && /* @__PURE__ */ e(
240
- "button",
241
- {
242
- onClick: (I) => {
243
- I.stopPropagation(), g(o.id);
244
- },
245
- children: "Check In"
246
- }
247
- ),
248
- v && o.role !== "host" && /* @__PURE__ */ e(
249
- "button",
250
- {
251
- onClick: (I) => {
252
- I.stopPropagation(), v(o.id);
253
- },
254
- children: "Remove"
255
- }
256
- )
257
- ] })
258
- ]
259
- },
260
- o.id
261
- ))
262
- ] }, h))
263
- ] });
264
- }
265
- ), Ce = P(
266
- function(x, A) {
267
- const {
268
- items: a,
269
- onUpload: y,
270
- onDelete: m,
271
- onLike: v,
272
- onItemClick: _,
273
- layout: g = "grid",
274
- uploadEnabled: S = !0,
275
- typeFilter: N = "all",
276
- className: f,
277
- style: C
278
- } = x, [s, u] = w(""), k = R(() => N === "all" ? a : a.filter((p) => p.type === N), [a, N]), b = (p) => {
279
- var n;
280
- const c = (n = p.target.files) == null ? void 0 : n[0];
281
- !c || !y || (y(c, s.trim() || void 0), u(""), p.target.value = "");
282
- };
283
- return /* @__PURE__ */ t(
21
+ items: t,
22
+ onUpload: p,
23
+ onDelete: u,
24
+ onLike: m,
25
+ onItemClick: h,
26
+ layout: v = "grid",
27
+ uploadEnabled: _ = !0,
28
+ typeFilter: g = "all",
29
+ className: S,
30
+ style: b
31
+ } = N, [l, o] = f(""), k = I(() => g === "all" ? t : t.filter((d) => d.type === g), [t, g]), y = (d) => {
32
+ const n = d[0];
33
+ !n || !p || (p(n, l.trim() || void 0), o(""));
34
+ }, x = v === "list";
35
+ return /* @__PURE__ */ i(
284
36
  "div",
285
37
  {
286
- ref: A,
287
- className: `nice-event-media nice-event-media--${g} ${f ?? ""}`,
288
- style: C,
38
+ ref: C,
39
+ className: `nice-event-media nice-event-media--${v} ${S ?? ""}`,
40
+ style: b,
289
41
  children: [
290
- /* @__PURE__ */ e("div", { className: "nice-event-media__header", children: /* @__PURE__ */ t("h3", { children: [
42
+ /* @__PURE__ */ e("div", { className: "nice-event-media__header", children: /* @__PURE__ */ i("h3", { children: [
291
43
  "Media (",
292
44
  k.length,
293
45
  ")"
294
46
  ] }) }),
295
- S && y && /* @__PURE__ */ t("div", { className: "nice-event-media__upload", children: [
296
- /* @__PURE__ */ e("input", { type: "file", accept: "image/*,video/*", onChange: b }),
47
+ _ && p && /* @__PURE__ */ i("div", { className: "nice-event-media__upload", children: [
297
48
  /* @__PURE__ */ e(
298
- "input",
49
+ dn,
299
50
  {
300
- type: "text",
301
- value: s,
302
- onChange: (p) => u(p.target.value),
303
- placeholder: "Add a caption…",
304
- className: "nice-event-media__caption-input"
51
+ accept: "image/*,video/*",
52
+ multiple: !1,
53
+ imagePreview: !1,
54
+ onFilesSelected: y
305
55
  }
306
- )
56
+ ),
57
+ /* @__PURE__ */ e(T, { value: l, onChange: o, placeholder: "Add a caption…" })
307
58
  ] }),
308
- k.length === 0 ? /* @__PURE__ */ e("p", { className: "nice-event-media__empty", children: "No media yet." }) : /* @__PURE__ */ e("div", { className: `nice-event-media__gallery nice-event-media__gallery--${g}`, children: k.map((p) => /* @__PURE__ */ t(
309
- "div",
59
+ k.length === 0 ? /* @__PURE__ */ e("p", { className: "nice-event-media__empty", children: "No media yet." }) : /* @__PURE__ */ e(
60
+ mn,
310
61
  {
311
- className: "nice-event-media__item",
312
- onClick: () => _ == null ? void 0 : _(p),
313
- role: _ ? "button" : void 0,
314
- children: [
315
- p.type === "photo" ? /* @__PURE__ */ e(
316
- "img",
317
- {
318
- src: p.thumbnailUrl ?? p.url,
319
- alt: p.caption ?? "",
320
- className: "nice-event-media__thumb"
321
- }
322
- ) : /* @__PURE__ */ e("div", { className: "nice-event-media__video-thumb", children: /* @__PURE__ */ e("span", { children: "▶" }) }),
323
- /* @__PURE__ */ t("div", { className: "nice-event-media__overlay", children: [
324
- p.caption && /* @__PURE__ */ e("span", { className: "nice-event-media__item-caption", children: p.caption }),
325
- /* @__PURE__ */ e("span", { className: "nice-event-media__uploader", children: p.uploadedByName }),
326
- /* @__PURE__ */ t("div", { className: "nice-event-media__item-actions", children: [
327
- v && /* @__PURE__ */ t(
328
- "button",
329
- {
330
- onClick: (c) => {
331
- c.stopPropagation(), v(p.id);
332
- },
333
- children: [
334
- "❤️ ",
335
- p.likes ?? 0
336
- ]
337
- }
338
- ),
339
- m && /* @__PURE__ */ e(
340
- "button",
341
- {
342
- onClick: (c) => {
343
- c.stopPropagation(), m(p.id);
344
- },
345
- children: "🗑️"
346
- }
347
- )
348
- ] })
349
- ] })
350
- ]
351
- },
352
- p.id
353
- )) })
62
+ columns: x ? 1 : void 0,
63
+ minColumnWidth: 200,
64
+ gap: 12,
65
+ align: "stretch",
66
+ children: k.map((d) => /* @__PURE__ */ i(
67
+ "div",
68
+ {
69
+ className: `nice-event-media__card${x ? " nice-event-media__card--row" : ""}`,
70
+ onClick: () => h == null ? void 0 : h(d),
71
+ role: h ? "button" : void 0,
72
+ tabIndex: h ? 0 : void 0,
73
+ children: [
74
+ /* @__PURE__ */ e(vn, { item: d }),
75
+ /* @__PURE__ */ i("div", { className: "nice-event-media__body", children: [
76
+ d.caption && /* @__PURE__ */ e("span", { className: "nice-event-media__caption", children: d.caption }),
77
+ d.uploadedByName && /* @__PURE__ */ e("span", { className: "nice-event-media__uploader", children: d.uploadedByName }),
78
+ /* @__PURE__ */ i("div", { className: "nice-event-media__actions", children: [
79
+ m && /* @__PURE__ */ i(
80
+ "button",
81
+ {
82
+ type: "button",
83
+ className: "nice-event-media__action",
84
+ onClick: (n) => {
85
+ n.stopPropagation(), m(d.id);
86
+ },
87
+ "aria-label": "Like",
88
+ children: [
89
+ /* @__PURE__ */ e(tn, { size: 15 }),
90
+ " ",
91
+ d.likes ?? 0
92
+ ]
93
+ }
94
+ ),
95
+ u && /* @__PURE__ */ e(
96
+ "button",
97
+ {
98
+ type: "button",
99
+ className: "nice-event-media__action nice-event-media__action--danger",
100
+ onClick: (n) => {
101
+ n.stopPropagation(), u(d.id);
102
+ },
103
+ "aria-label": "Delete",
104
+ children: /* @__PURE__ */ e(an, { size: 15 })
105
+ }
106
+ )
107
+ ] })
108
+ ] })
109
+ ]
110
+ },
111
+ d.id
112
+ ))
113
+ }
114
+ )
354
115
  ]
355
116
  }
356
117
  );
357
118
  }
358
- ), Se = P(
359
- function(x, A) {
360
- var G, K, H, Y, J;
119
+ );
120
+ function ee(z) {
121
+ const N = z.toLowerCase();
122
+ return ["active", "live", "published", "completed", "confirmed"].includes(N) ? "success" : ["cancelled", "canceled", "rejected", "failed"].includes(N) ? "error" : ["scheduled", "pending", "planning"].includes(N) ? "info" : ["draft", "archived"].includes(N) ? "secondary" : "warning";
123
+ }
124
+ const gn = {
125
+ micro: [],
126
+ compact: ["details", "location", "budget"],
127
+ normal: ["details", "location", "participants", "surveys", "budget"],
128
+ full: ["details", "location", "participants", "surveys", "budget", "settings"]
129
+ }, zn = E(
130
+ function(N, C) {
131
+ var ce, se, oe, de, me, pe;
361
132
  const {
362
- event: a,
363
- surveys: y = [],
133
+ event: t,
134
+ participants: p = [],
135
+ surveys: u = [],
364
136
  billing: m = [],
365
- onUpdateEvent: v,
366
- onUpdateLocation: _,
367
- onAddSurvey: g,
368
- onSurveyRespond: S,
369
- onAddBilling: N,
370
- editable: f = !1,
371
- className: C,
372
- style: s
373
- } = x, [u, k] = w("details"), [b, p] = w(a.title), [c, n] = w(a.description ?? ""), [d, i] = w(a.startDate ?? ""), [h, l] = w(a.endDate ?? ""), [o, I] = w(((G = a.location) == null ? void 0 : G.name) ?? ""), [O, te] = w(((K = a.location) == null ? void 0 : K.address) ?? ""), [z, ne] = w(((H = a.location) == null ? void 0 : H.virtualUrl) ?? ""), [B, ie] = w(((Y = a.location) == null ? void 0 : Y.isVirtual) ?? !1), [T, F] = w(""), [D, ae] = w("single"), [U, Q] = w(""), [V, W] = w(""), [q, j] = w(""), [M, ce] = w("PLN"), le = E(() => {
374
- v == null || v({
375
- title: b,
376
- description: c || void 0,
377
- startDate: d || void 0,
378
- endDate: h || void 0
137
+ displayMode: h = "normal",
138
+ tabs: v,
139
+ activeTab: _,
140
+ onTabChange: g,
141
+ tabsIconOnly: S = !0,
142
+ tabsCentered: b = "auto",
143
+ editable: l = !1,
144
+ onSave: o,
145
+ onPublish: k,
146
+ onShare: y,
147
+ onExport: x,
148
+ onUpdateEvent: d,
149
+ onUpdateLocation: n,
150
+ onAddSurvey: c,
151
+ onSurveyRespond: a,
152
+ onAddBilling: w,
153
+ className: s,
154
+ style: A
155
+ } = N, [P, V] = f(t.title), [M, Ce] = f(t.description ?? ""), [F, Se] = f(t.startDate ?? ""), [Q, xe] = f(t.endDate ?? ""), [j, we] = f(((ce = t.location) == null ? void 0 : ce.name) ?? ""), [G, ze] = f(((se = t.location) == null ? void 0 : se.address) ?? ""), [H, Ae] = f(((oe = t.location) == null ? void 0 : oe.virtualUrl) ?? ""), [U, Ie] = f(((de = t.location) == null ? void 0 : de.isVirtual) ?? !1), [$, ie] = f(""), [Y, Le] = f("single"), [K, te] = f(""), [D, ae] = f(""), [J, le] = f(""), [X, Te] = f("PLN"), re = v ?? gn[h], [Pe, Re] = f(re[0] ?? "details"), Be = _ ?? Pe, Ee = O(
156
+ (r) => {
157
+ const R = r;
158
+ _ === void 0 && Re(R), g == null || g(R);
159
+ },
160
+ [_, g]
161
+ ), Oe = O(() => {
162
+ d == null || d({
163
+ title: P,
164
+ description: M || void 0,
165
+ startDate: F || void 0,
166
+ endDate: Q || void 0
379
167
  });
380
- }, [b, c, d, h, v]), re = E(() => {
381
- _ == null || _({
382
- name: o,
383
- address: O || void 0,
384
- virtualUrl: z || void 0,
385
- isVirtual: B
168
+ }, [P, M, F, Q, d]), $e = O(() => {
169
+ n == null || n({
170
+ name: j,
171
+ address: G || void 0,
172
+ virtualUrl: H || void 0,
173
+ isVirtual: U
386
174
  });
387
- }, [o, O, z, B, _]), se = E(() => {
388
- if (!T.trim() || !g)
175
+ }, [j, G, H, U, n]), De = O(() => {
176
+ if (!$.trim() || !c)
389
177
  return;
390
- const r = U.split(",").map(($) => $.trim()).filter(Boolean);
391
- g(T.trim(), D, r.length > 0 ? r : void 0), F(""), Q("");
392
- }, [T, D, U, g]), oe = E(() => {
393
- !V.trim() || !N || (N({
394
- label: V.trim(),
395
- amount: parseFloat(q) || 0,
396
- currency: M
397
- }), W(""), j(""));
398
- }, [V, q, M, N]), de = m.reduce((r, $) => r + $.amount, 0);
399
- return /* @__PURE__ */ t("div", { ref: A, className: `nice-event-planning ${C ?? ""}`, style: s, children: [
400
- /* @__PURE__ */ e("div", { className: "nice-event-planning__tabs", children: ["details", "location", "surveys", "billing"].map((r) => /* @__PURE__ */ e(
401
- "button",
178
+ const r = K.split(",").map((R) => R.trim()).filter(Boolean);
179
+ c($.trim(), Y, r.length > 0 ? r : void 0), ie(""), te("");
180
+ }, [$, Y, K, c]), Ve = O(() => {
181
+ !D.trim() || !w || (w({
182
+ label: D.trim(),
183
+ amount: parseFloat(J) || 0,
184
+ currency: X
185
+ }), ae(""), le(""));
186
+ }, [D, J, X, w]), Me = I(
187
+ () => m.map((r) => ({
188
+ label: r.label,
189
+ amount: r.amount
190
+ })),
191
+ [m]
192
+ ), Ue = I(() => m.reduce((r, R) => r + R.amount, 0), [m]), We = ((me = m[0]) == null ? void 0 : me.currency) ?? "PLN", qe = /* @__PURE__ */ i("div", { className: "nice-event-planning__form", children: [
193
+ /* @__PURE__ */ e(
194
+ T,
402
195
  {
403
- className: `nice-event-planning__tab ${u === r ? "nice-event-planning__tab--active" : ""}`,
404
- onClick: () => k(r),
405
- children: r.charAt(0).toUpperCase() + r.slice(1)
406
- },
407
- r
408
- )) }),
409
- u === "details" && /* @__PURE__ */ t("div", { className: "nice-event-planning__section", children: [
410
- /* @__PURE__ */ t("label", { children: [
411
- "Title",
412
- /* @__PURE__ */ e(
413
- "input",
414
- {
415
- type: "text",
416
- value: b,
417
- onChange: (r) => p(r.target.value),
418
- readOnly: !f
419
- }
420
- )
421
- ] }),
422
- /* @__PURE__ */ t("label", { children: [
423
- "Description",
424
- /* @__PURE__ */ e(
425
- "textarea",
426
- {
427
- value: c,
428
- onChange: (r) => n(r.target.value),
429
- readOnly: !f,
430
- rows: 3
431
- }
432
- )
433
- ] }),
434
- /* @__PURE__ */ t("label", { children: [
435
- "Start",
196
+ label: "Title",
197
+ value: P,
198
+ onChange: V,
199
+ readOnly: !l
200
+ }
201
+ ),
202
+ /* @__PURE__ */ e(
203
+ hn,
204
+ {
205
+ label: "Description",
206
+ value: M,
207
+ onChange: Ce,
208
+ readOnly: !l,
209
+ rows: 3
210
+ }
211
+ ),
212
+ /* @__PURE__ */ i("div", { className: "nice-event-planning__row", children: [
213
+ /* @__PURE__ */ i("label", { className: "nice-field", children: [
214
+ /* @__PURE__ */ e("span", { className: "nice-field__label", children: "Start" }),
436
215
  /* @__PURE__ */ e(
437
216
  "input",
438
217
  {
218
+ className: "nice-input",
439
219
  type: "datetime-local",
440
- value: d,
441
- onChange: (r) => i(r.target.value),
442
- readOnly: !f
220
+ value: F,
221
+ onChange: (r) => Se(r.target.value),
222
+ readOnly: !l
443
223
  }
444
224
  )
445
225
  ] }),
446
- /* @__PURE__ */ t("label", { children: [
447
- "End",
226
+ /* @__PURE__ */ i("label", { className: "nice-field", children: [
227
+ /* @__PURE__ */ e("span", { className: "nice-field__label", children: "End" }),
448
228
  /* @__PURE__ */ e(
449
229
  "input",
450
230
  {
231
+ className: "nice-input",
451
232
  type: "datetime-local",
452
- value: h,
453
- onChange: (r) => l(r.target.value),
454
- readOnly: !f
455
- }
456
- )
457
- ] }),
458
- /* @__PURE__ */ t("div", { className: "nice-event-planning__status", children: [
459
- "Status: ",
460
- /* @__PURE__ */ e("strong", { children: a.status })
461
- ] }),
462
- f && /* @__PURE__ */ e("button", { onClick: le, children: "Save Details" })
463
- ] }),
464
- u === "location" && /* @__PURE__ */ t("div", { className: "nice-event-planning__section", children: [
465
- /* @__PURE__ */ t("label", { children: [
466
- /* @__PURE__ */ e(
467
- "input",
468
- {
469
- type: "checkbox",
470
- checked: B,
471
- onChange: (r) => ie(r.target.checked),
472
- disabled: !f
473
- }
474
- ),
475
- " ",
476
- "Virtual event"
477
- ] }),
478
- /* @__PURE__ */ t("label", { children: [
479
- "Venue Name",
480
- /* @__PURE__ */ e(
481
- "input",
482
- {
483
- type: "text",
484
- value: o,
485
- onChange: (r) => I(r.target.value),
486
- readOnly: !f
487
- }
488
- )
489
- ] }),
490
- !B && /* @__PURE__ */ t("label", { children: [
491
- "Address",
492
- /* @__PURE__ */ e(
493
- "input",
494
- {
495
- type: "text",
496
- value: O,
497
- onChange: (r) => te(r.target.value),
498
- readOnly: !f
233
+ value: Q,
234
+ onChange: (r) => xe(r.target.value),
235
+ readOnly: !l
499
236
  }
500
237
  )
501
- ] }),
502
- B && /* @__PURE__ */ t("label", { children: [
503
- "Virtual URL",
504
- /* @__PURE__ */ e(
505
- "input",
506
- {
507
- type: "url",
508
- value: z,
509
- onChange: (r) => ne(r.target.value),
510
- readOnly: !f
511
- }
512
- )
513
- ] }),
514
- f && /* @__PURE__ */ e("button", { onClick: re, children: "Save Location" })
238
+ ] })
515
239
  ] }),
516
- u === "surveys" && /* @__PURE__ */ t("div", { className: "nice-event-planning__section", children: [
517
- y.length === 0 ? /* @__PURE__ */ e("p", { children: "No surveys yet." }) : y.map((r) => /* @__PURE__ */ t("div", { className: "nice-event-planning__survey", children: [
518
- /* @__PURE__ */ e("strong", { children: r.question }),
519
- /* @__PURE__ */ t("span", { className: "nice-event-planning__survey-type", children: [
520
- "(",
521
- r.type,
522
- ")"
523
- ] }),
524
- r.options && /* @__PURE__ */ e("div", { className: "nice-event-planning__survey-options", children: r.options.map(($, he) => /* @__PURE__ */ e("button", { onClick: () => S == null ? void 0 : S(r.id, $), children: $ }, he)) }),
525
- r.responses && /* @__PURE__ */ t("span", { children: [
526
- r.responses.length,
527
- " responses"
528
- ] })
529
- ] }, r.id)),
530
- f && g && /* @__PURE__ */ t("div", { className: "nice-event-planning__add-survey", children: [
531
- /* @__PURE__ */ e("h4", { children: "Add Survey" }),
532
- /* @__PURE__ */ e(
533
- "input",
534
- {
535
- type: "text",
536
- value: T,
537
- onChange: (r) => F(r.target.value),
538
- placeholder: "Question"
539
- }
540
- ),
541
- /* @__PURE__ */ t(
542
- "select",
543
- {
544
- value: D,
545
- onChange: (r) => ae(r.target.value),
546
- children: [
547
- /* @__PURE__ */ e("option", { value: "single", children: "Single choice" }),
548
- /* @__PURE__ */ e("option", { value: "multiple", children: "Multiple choice" }),
549
- /* @__PURE__ */ e("option", { value: "text", children: "Free text" }),
550
- /* @__PURE__ */ e("option", { value: "rating", children: "Rating" })
551
- ]
552
- }
553
- ),
554
- /* @__PURE__ */ e(
555
- "input",
556
- {
557
- type: "text",
558
- value: U,
559
- onChange: (r) => Q(r.target.value),
560
- placeholder: "Options (comma-separated)"
561
- }
562
- ),
563
- /* @__PURE__ */ e("button", { onClick: se, disabled: !T.trim(), children: "Add" })
240
+ l && /* @__PURE__ */ e(
241
+ B,
242
+ {
243
+ variant: "primary",
244
+ leftIcon: /* @__PURE__ */ e(L, { name: "check", size: "sm" }),
245
+ onClick: Oe,
246
+ children: "Save details"
247
+ }
248
+ )
249
+ ] }), Fe = /* @__PURE__ */ i("div", { className: "nice-event-planning__form", children: [
250
+ /* @__PURE__ */ e(
251
+ ge,
252
+ {
253
+ label: "Virtual event",
254
+ checked: U,
255
+ onChange: Ie,
256
+ disabled: !l
257
+ }
258
+ ),
259
+ /* @__PURE__ */ e(
260
+ T,
261
+ {
262
+ label: "Venue name",
263
+ value: j,
264
+ onChange: we,
265
+ readOnly: !l
266
+ }
267
+ ),
268
+ U ? /* @__PURE__ */ e(
269
+ T,
270
+ {
271
+ label: "Virtual URL",
272
+ value: H,
273
+ onChange: Ae,
274
+ readOnly: !l
275
+ }
276
+ ) : /* @__PURE__ */ e(
277
+ T,
278
+ {
279
+ label: "Address",
280
+ value: G,
281
+ onChange: ze,
282
+ readOnly: !l
283
+ }
284
+ ),
285
+ l && /* @__PURE__ */ e(
286
+ B,
287
+ {
288
+ variant: "primary",
289
+ leftIcon: /* @__PURE__ */ e(L, { name: "check", size: "sm" }),
290
+ onClick: $e,
291
+ children: "Save location"
292
+ }
293
+ )
294
+ ] }), Qe = /* @__PURE__ */ e("div", { className: "nice-event-planning__participants", children: p.length === 0 ? /* @__PURE__ */ e("p", { className: "nice-event-planning__empty", children: "No participants yet." }) : /* @__PURE__ */ i(nn, { children: [
295
+ /* @__PURE__ */ e(he, { max: 8, children: p.map((r) => /* @__PURE__ */ e(Z, { name: r.name, src: r.avatarUrl }, r.id)) }),
296
+ /* @__PURE__ */ e("ul", { className: "nice-event-planning__participant-list", children: p.map((r) => /* @__PURE__ */ i("li", { className: "nice-event-planning__participant", children: [
297
+ /* @__PURE__ */ e(Z, { name: r.name, src: r.avatarUrl, size: "sm" }),
298
+ /* @__PURE__ */ e("span", { className: "nice-event-planning__participant-name", children: r.name }),
299
+ /* @__PURE__ */ e(W, { size: "xs", subtle: !0, variant: ee(r.status), children: r.status })
300
+ ] }, r.id)) })
301
+ ] }) }), je = /* @__PURE__ */ i("div", { className: "nice-event-planning__form", children: [
302
+ u.length === 0 ? /* @__PURE__ */ e("p", { className: "nice-event-planning__empty", children: "No surveys yet." }) : u.map((r) => /* @__PURE__ */ i("div", { className: "nice-event-planning__survey", children: [
303
+ /* @__PURE__ */ e("strong", { children: r.question }),
304
+ " ",
305
+ /* @__PURE__ */ e(W, { size: "xs", outline: !0, variant: "info", children: r.type }),
306
+ r.options && /* @__PURE__ */ e("div", { className: "nice-event-planning__survey-options", children: r.options.map((R, en) => /* @__PURE__ */ e(
307
+ B,
308
+ {
309
+ size: "sm",
310
+ variant: "outline",
311
+ onClick: () => a == null ? void 0 : a(r.id, R),
312
+ children: R
313
+ },
314
+ en
315
+ )) }),
316
+ r.responses && /* @__PURE__ */ i("span", { className: "nice-event-planning__muted", children: [
317
+ r.responses.length,
318
+ " responses"
564
319
  ] })
320
+ ] }, r.id)),
321
+ l && c && /* @__PURE__ */ i("div", { className: "nice-event-planning__form", children: [
322
+ /* @__PURE__ */ e(
323
+ T,
324
+ {
325
+ label: "New survey question",
326
+ value: $,
327
+ onChange: ie,
328
+ placeholder: "Question"
329
+ }
330
+ ),
331
+ /* @__PURE__ */ e(
332
+ ve,
333
+ {
334
+ label: "Type",
335
+ value: Y,
336
+ onChange: (r) => Le(r),
337
+ options: [
338
+ { value: "single", label: "Single choice" },
339
+ { value: "multiple", label: "Multiple choice" },
340
+ { value: "text", label: "Free text" },
341
+ { value: "rating", label: "Rating" }
342
+ ]
343
+ }
344
+ ),
345
+ /* @__PURE__ */ e(
346
+ T,
347
+ {
348
+ label: "Options (comma-separated)",
349
+ value: K,
350
+ onChange: te,
351
+ placeholder: "Yes, No, Maybe"
352
+ }
353
+ ),
354
+ /* @__PURE__ */ e(
355
+ B,
356
+ {
357
+ variant: "primary",
358
+ leftIcon: /* @__PURE__ */ e(L, { name: "plus", size: "sm" }),
359
+ onClick: De,
360
+ disabled: !$.trim(),
361
+ children: "Add survey"
362
+ }
363
+ )
364
+ ] })
365
+ ] }), Ge = /* @__PURE__ */ i("div", { className: "nice-event-planning__form", children: [
366
+ m.length === 0 ? /* @__PURE__ */ e("p", { className: "nice-event-planning__empty", children: "No billing items yet." }) : /* @__PURE__ */ e(
367
+ pn,
368
+ {
369
+ lines: [...Me, { label: "Total", amount: Ue, isSummary: !0 }],
370
+ currency: We
371
+ }
372
+ ),
373
+ l && w && /* @__PURE__ */ i("div", { className: "nice-event-planning__row", children: [
374
+ /* @__PURE__ */ e(
375
+ T,
376
+ {
377
+ label: "Item",
378
+ value: D,
379
+ onChange: ae,
380
+ placeholder: "Catering"
381
+ }
382
+ ),
383
+ /* @__PURE__ */ e(
384
+ T,
385
+ {
386
+ label: "Amount",
387
+ value: J,
388
+ onChange: le,
389
+ placeholder: "0.00"
390
+ }
391
+ ),
392
+ /* @__PURE__ */ e(
393
+ ve,
394
+ {
395
+ label: "Currency",
396
+ value: X,
397
+ onChange: (r) => Te(r),
398
+ options: ["PLN", "EUR", "USD", "GBP"]
399
+ }
400
+ ),
401
+ /* @__PURE__ */ e(
402
+ B,
403
+ {
404
+ variant: "primary",
405
+ leftIcon: /* @__PURE__ */ e(L, { name: "plus", size: "sm" }),
406
+ onClick: Ve,
407
+ disabled: !D.trim(),
408
+ children: "Add"
409
+ }
410
+ )
411
+ ] })
412
+ ] }), He = /* @__PURE__ */ i("div", { className: "nice-event-planning__form", children: [
413
+ /* @__PURE__ */ e(ge, { label: "Public event", checked: t.isPublic ?? !1, disabled: !l }),
414
+ /* @__PURE__ */ e(
415
+ T,
416
+ {
417
+ label: "Max participants",
418
+ value: t.maxParticipants != null ? String(t.maxParticipants) : "",
419
+ onChange: () => {
420
+ },
421
+ readOnly: !l
422
+ }
423
+ ),
424
+ /* @__PURE__ */ i("div", { className: "nice-event-planning__muted", children: [
425
+ "Host: ",
426
+ t.hostName,
427
+ " · Created ",
428
+ new Date(t.createdAt).toLocaleDateString()
429
+ ] })
430
+ ] }), Ye = {
431
+ details: qe,
432
+ location: Fe,
433
+ participants: Qe,
434
+ surveys: je,
435
+ budget: Ge,
436
+ settings: He
437
+ }, Ke = {
438
+ details: "file",
439
+ location: "home",
440
+ participants: "users",
441
+ surveys: "clipboard",
442
+ budget: "file",
443
+ settings: "settings"
444
+ }, Je = {
445
+ participants: p.length || void 0,
446
+ surveys: u.length || void 0,
447
+ budget: m.length || void 0
448
+ }, Xe = re.map((r) => ({
449
+ id: r,
450
+ label: r.charAt(0).toUpperCase() + r.slice(1),
451
+ icon: /* @__PURE__ */ e(L, { name: Ke[r], size: "sm" }),
452
+ badge: Je[r],
453
+ content: Ye[r]
454
+ })), Ze = /* @__PURE__ */ i("div", { className: "nice-event-planning__toolbar", children: [
455
+ /* @__PURE__ */ i("div", { className: "nice-event-planning__toolbar-title", children: [
456
+ /* @__PURE__ */ e(L, { name: "calendar", size: "md" }),
457
+ /* @__PURE__ */ e("span", { className: "nice-event-planning__title", children: t.title }),
458
+ /* @__PURE__ */ e(W, { size: "sm", variant: ee(t.status), children: t.status })
565
459
  ] }),
566
- u === "billing" && /* @__PURE__ */ t("div", { className: "nice-event-planning__section", children: [
567
- m.length === 0 ? /* @__PURE__ */ e("p", { children: "No billing items yet." }) : /* @__PURE__ */ t(ue, { children: [
568
- /* @__PURE__ */ t("table", { className: "nice-event-planning__billing-table", children: [
569
- /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ t("tr", { children: [
570
- /* @__PURE__ */ e("th", { children: "Item" }),
571
- /* @__PURE__ */ e("th", { children: "Amount" }),
572
- /* @__PURE__ */ e("th", { children: "Paid by" }),
573
- /* @__PURE__ */ e("th", { children: "Status" })
574
- ] }) }),
575
- /* @__PURE__ */ e("tbody", { children: m.map((r) => /* @__PURE__ */ t("tr", { children: [
576
- /* @__PURE__ */ e("td", { children: r.label }),
577
- /* @__PURE__ */ t("td", { children: [
578
- r.amount.toFixed(2),
579
- " ",
580
- r.currency
581
- ] }),
582
- /* @__PURE__ */ e("td", { children: r.paidByName ?? "—" }),
583
- /* @__PURE__ */ e("td", { children: r.isPaid ? "✅ Paid" : "⏳ Pending" })
584
- ] }, r.id)) })
585
- ] }),
586
- /* @__PURE__ */ t("div", { className: "nice-event-planning__billing-total", children: [
587
- "Total:",
588
- " ",
589
- /* @__PURE__ */ t("strong", { children: [
590
- de.toFixed(2),
591
- " ",
592
- ((J = m[0]) == null ? void 0 : J.currency) ?? ""
460
+ /* @__PURE__ */ e("span", { className: "nice-event-planning__toolbar-spacer" }),
461
+ /* @__PURE__ */ i("div", { className: "nice-event-planning__toolbar-actions", children: [
462
+ o && /* @__PURE__ */ e(
463
+ B,
464
+ {
465
+ size: "sm",
466
+ variant: "primary",
467
+ leftIcon: /* @__PURE__ */ e(L, { name: "check", size: "sm" }),
468
+ onClick: () => o({ title: P, description: M }),
469
+ children: "Save"
470
+ }
471
+ ),
472
+ k && /* @__PURE__ */ e(
473
+ B,
474
+ {
475
+ size: "sm",
476
+ variant: "success",
477
+ leftIcon: /* @__PURE__ */ e(L, { name: "upload", size: "sm" }),
478
+ onClick: k,
479
+ children: "Publish"
480
+ }
481
+ ),
482
+ y && /* @__PURE__ */ e(
483
+ B,
484
+ {
485
+ size: "sm",
486
+ variant: "ghost",
487
+ leftIcon: /* @__PURE__ */ e(L, { name: "link", size: "sm" }),
488
+ onClick: y,
489
+ children: "Share"
490
+ }
491
+ ),
492
+ x && /* @__PURE__ */ e(
493
+ B,
494
+ {
495
+ size: "sm",
496
+ variant: "ghost",
497
+ leftIcon: /* @__PURE__ */ e(L, { name: "download", size: "sm" }),
498
+ onClick: x,
499
+ children: "Export"
500
+ }
501
+ )
502
+ ] })
503
+ ] });
504
+ return h === "micro" ? /* @__PURE__ */ e(
505
+ "div",
506
+ {
507
+ ref: C,
508
+ className: `nice-event-planning nice-event-planning--micro ${s ?? ""}`,
509
+ style: A,
510
+ children: /* @__PURE__ */ i("div", { className: "nice-event-planning__micro", children: [
511
+ /* @__PURE__ */ e(L, { name: "calendar", size: "md" }),
512
+ /* @__PURE__ */ i("div", { className: "nice-event-planning__micro-body", children: [
513
+ /* @__PURE__ */ e("span", { className: "nice-event-planning__title", children: t.title }),
514
+ /* @__PURE__ */ i("span", { className: "nice-event-planning__muted", children: [
515
+ t.startDate ? new Date(t.startDate).toLocaleString() : "No date",
516
+ (pe = t.location) != null && pe.name ? ` · ${t.location.name}` : ""
593
517
  ] })
594
- ] })
595
- ] }),
596
- f && N && /* @__PURE__ */ t("div", { className: "nice-event-planning__add-billing", children: [
597
- /* @__PURE__ */ e(
598
- "input",
599
- {
600
- type: "text",
601
- value: V,
602
- onChange: (r) => W(r.target.value),
603
- placeholder: "Item"
604
- }
605
- ),
518
+ ] }),
519
+ /* @__PURE__ */ e(W, { size: "sm", variant: ee(t.status), children: t.status }),
520
+ p.length > 0 && /* @__PURE__ */ e(he, { max: 4, size: "sm", children: p.map((r) => /* @__PURE__ */ e(Z, { name: r.name, src: r.avatarUrl, size: "sm" }, r.id)) })
521
+ ] })
522
+ }
523
+ ) : /* @__PURE__ */ i(
524
+ "div",
525
+ {
526
+ ref: C,
527
+ className: `nice-event-planning nice-event-planning--${h} ${s ?? ""}`,
528
+ style: A,
529
+ children: [
530
+ Ze,
606
531
  /* @__PURE__ */ e(
607
- "input",
532
+ un,
608
533
  {
609
- type: "number",
610
- value: q,
611
- onChange: (r) => j(r.target.value),
612
- placeholder: "Amount",
613
- min: 0,
614
- step: 0.01
615
- }
616
- ),
617
- /* @__PURE__ */ t(
618
- "select",
619
- {
620
- value: M,
621
- onChange: (r) => ce(r.target.value),
622
- children: [
623
- /* @__PURE__ */ e("option", { value: "PLN", children: "PLN" }),
624
- /* @__PURE__ */ e("option", { value: "EUR", children: "EUR" }),
625
- /* @__PURE__ */ e("option", { value: "USD", children: "USD" }),
626
- /* @__PURE__ */ e("option", { value: "GBP", children: "GBP" })
627
- ]
534
+ tabs: Xe,
535
+ activeTab: Be,
536
+ onChange: Ee,
537
+ iconOnly: S,
538
+ centered: b
628
539
  }
629
- ),
630
- /* @__PURE__ */ e("button", { onClick: oe, disabled: !V.trim(), children: "Add" })
631
- ] })
632
- ] })
633
- ] });
540
+ )
541
+ ]
542
+ }
543
+ );
634
544
  }
635
- ), ve = {
545
+ ), yn = {
636
546
  upcoming: "⏳",
637
547
  active: "▶️",
638
548
  voting: "🗳️",
639
549
  scored: "📊",
640
550
  completed: "✅",
641
551
  skipped: "⏭️"
642
- }, ge = {
552
+ }, fn = {
643
553
  upcoming: "#9ca3af",
644
554
  active: "#22c55e",
645
555
  voting: "#eab308",
646
556
  scored: "#3b82f6",
647
557
  completed: "#6b7280",
648
558
  skipped: "#d1d5db"
649
- }, we = P(
650
- function(x, A) {
559
+ }, An = E(
560
+ function(N, C) {
651
561
  const {
652
- rounds: a,
653
- activeRoundId: y,
654
- onSelect: m,
655
- onStart: v,
656
- onEnd: _,
657
- onCreate: g,
658
- editable: S = !1,
659
- className: N,
660
- style: f
661
- } = x, C = [...a].sort((s, u) => s.order - u.order);
662
- return /* @__PURE__ */ t("div", { ref: A, className: `nice-round-list ${N ?? ""}`, style: f, children: [
663
- /* @__PURE__ */ t("div", { className: "nice-round-list__header", children: [
664
- /* @__PURE__ */ t("h3", { children: [
562
+ rounds: t,
563
+ activeRoundId: p,
564
+ onSelect: u,
565
+ onStart: m,
566
+ onEnd: h,
567
+ onCreate: v,
568
+ editable: _ = !1,
569
+ className: g,
570
+ style: S
571
+ } = N, b = [...t].sort((l, o) => l.order - o.order);
572
+ return /* @__PURE__ */ i("div", { ref: C, className: `nice-round-list ${g ?? ""}`, style: S, children: [
573
+ /* @__PURE__ */ i("div", { className: "nice-round-list__header", children: [
574
+ /* @__PURE__ */ i("h3", { children: [
665
575
  "Rounds (",
666
- a.length,
576
+ t.length,
667
577
  ")"
668
578
  ] }),
669
- S && g && /* @__PURE__ */ e("button", { onClick: g, children: "+ Add Round" })
579
+ _ && v && /* @__PURE__ */ e("button", { onClick: v, children: "+ Add Round" })
670
580
  ] }),
671
- C.length === 0 ? /* @__PURE__ */ e("p", { className: "nice-round-list__empty", children: "No rounds yet." }) : /* @__PURE__ */ e("div", { className: "nice-round-list__items", children: C.map((s) => {
672
- const u = s.id === y;
673
- return /* @__PURE__ */ t(
581
+ b.length === 0 ? /* @__PURE__ */ e("p", { className: "nice-round-list__empty", children: "No rounds yet." }) : /* @__PURE__ */ e("div", { className: "nice-round-list__items", children: b.map((l) => {
582
+ const o = l.id === p;
583
+ return /* @__PURE__ */ i(
674
584
  "div",
675
585
  {
676
- className: `nice-round-list__item ${u ? "nice-round-list__item--active" : ""}`,
677
- onClick: () => m == null ? void 0 : m(s),
678
- role: m ? "button" : void 0,
679
- tabIndex: m ? 0 : void 0,
586
+ className: `nice-round-list__item ${o ? "nice-round-list__item--active" : ""}`,
587
+ onClick: () => u == null ? void 0 : u(l),
588
+ role: u ? "button" : void 0,
589
+ tabIndex: u ? 0 : void 0,
680
590
  children: [
681
- /* @__PURE__ */ t("span", { className: "nice-round-list__order", children: [
591
+ /* @__PURE__ */ i("span", { className: "nice-round-list__order", children: [
682
592
  "#",
683
- s.order
593
+ l.order
684
594
  ] }),
685
- /* @__PURE__ */ e("span", { className: "nice-round-list__icon", children: ve[s.status] }),
686
- /* @__PURE__ */ t("div", { className: "nice-round-list__info", children: [
687
- /* @__PURE__ */ e("strong", { className: "nice-round-list__name", children: s.name }),
688
- s.description && /* @__PURE__ */ e("small", { children: s.description }),
689
- s.type && /* @__PURE__ */ e("span", { className: "nice-round-list__type", children: s.type })
595
+ /* @__PURE__ */ e("span", { className: "nice-round-list__icon", children: yn[l.status] }),
596
+ /* @__PURE__ */ i("div", { className: "nice-round-list__info", children: [
597
+ /* @__PURE__ */ e("strong", { className: "nice-round-list__name", children: l.name }),
598
+ l.description && /* @__PURE__ */ e("small", { children: l.description }),
599
+ l.type && /* @__PURE__ */ e("span", { className: "nice-round-list__type", children: l.type })
690
600
  ] }),
691
601
  /* @__PURE__ */ e(
692
602
  "span",
693
603
  {
694
604
  className: "nice-round-list__status",
695
- style: { color: ge[s.status] },
696
- children: s.status
605
+ style: { color: fn[l.status] },
606
+ children: l.status
697
607
  }
698
608
  ),
699
- s.durationMinutes && /* @__PURE__ */ t("span", { className: "nice-round-list__duration", children: [
700
- s.durationMinutes,
609
+ l.durationMinutes && /* @__PURE__ */ i("span", { className: "nice-round-list__duration", children: [
610
+ l.durationMinutes,
701
611
  "m"
702
612
  ] }),
703
- s.winnerIds && s.winnerIds.length > 0 && /* @__PURE__ */ t("span", { className: "nice-round-list__winners", children: [
613
+ l.winnerIds && l.winnerIds.length > 0 && /* @__PURE__ */ i("span", { className: "nice-round-list__winners", children: [
704
614
  "🏆 ",
705
- s.winnerIds.length
615
+ l.winnerIds.length
706
616
  ] }),
707
- S && /* @__PURE__ */ t("div", { className: "nice-round-list__actions", onClick: (k) => k.stopPropagation(), children: [
708
- s.status === "upcoming" && v && /* @__PURE__ */ e("button", { onClick: () => v(s.id), children: "Start" }),
709
- (s.status === "active" || s.status === "voting") && _ && /* @__PURE__ */ e("button", { onClick: () => _(s.id), children: "End" })
617
+ _ && /* @__PURE__ */ i("div", { className: "nice-round-list__actions", onClick: (k) => k.stopPropagation(), children: [
618
+ l.status === "upcoming" && m && /* @__PURE__ */ e("button", { onClick: () => m(l.id), children: "Start" }),
619
+ (l.status === "active" || l.status === "voting") && h && /* @__PURE__ */ e("button", { onClick: () => h(l.id), children: "End" })
710
620
  ] })
711
621
  ]
712
622
  },
713
- s.id
623
+ l.id
714
624
  );
715
625
  }) })
716
626
  ] });
717
627
  }
718
- ), xe = P(
719
- function(x, A) {
628
+ ), In = E(
629
+ function(N, C) {
720
630
  const {
721
- round: a,
722
- timerRunning: y = !1,
723
- remainingSeconds: m,
724
- onSubmitScore: v,
725
- onStart: _,
726
- onEnd: g,
727
- onSkip: S,
728
- editable: N = !1,
729
- footerActions: f,
730
- className: C,
731
- style: s
732
- } = x, [u, k] = w({}), b = E(
631
+ round: t,
632
+ timerRunning: p = !1,
633
+ remainingSeconds: u,
634
+ onSubmitScore: m,
635
+ onStart: h,
636
+ onEnd: v,
637
+ onSkip: _,
638
+ editable: g = !1,
639
+ footerActions: S,
640
+ className: b,
641
+ style: l
642
+ } = N, [o, k] = f({}), y = O(
733
643
  (n) => {
734
- const d = parseFloat(u[n] ?? "");
735
- isNaN(d) || !v || (v(n, d), k((i) => ({ ...i, [n]: "" })));
644
+ const c = parseFloat(o[n] ?? "");
645
+ isNaN(c) || !m || (m(n, c), k((a) => ({ ...a, [n]: "" })));
736
646
  },
737
- [u, v]
738
- ), p = (n) => {
739
- const d = Math.floor(n / 60), i = n % 60;
740
- return `${d}:${i.toString().padStart(2, "0")}`;
741
- }, c = a.scores ? [...a.scores].sort((n, d) => d.score - n.score) : [];
742
- return /* @__PURE__ */ t(
647
+ [o, m]
648
+ ), x = (n) => {
649
+ const c = Math.floor(n / 60), a = n % 60;
650
+ return `${c}:${a.toString().padStart(2, "0")}`;
651
+ }, d = t.scores ? [...t.scores].sort((n, c) => c.score - n.score) : [];
652
+ return /* @__PURE__ */ i(
743
653
  "div",
744
654
  {
745
- ref: A,
746
- className: `nice-round-card nice-round-card--${a.status} ${C ?? ""}`,
747
- style: s,
655
+ ref: C,
656
+ className: `nice-round-card nice-round-card--${t.status} ${b ?? ""}`,
657
+ style: l,
748
658
  children: [
749
- /* @__PURE__ */ t("div", { className: "nice-round-card__header", children: [
750
- /* @__PURE__ */ t("span", { className: "nice-round-card__order", children: [
659
+ /* @__PURE__ */ i("div", { className: "nice-round-card__header", children: [
660
+ /* @__PURE__ */ i("span", { className: "nice-round-card__order", children: [
751
661
  "Round #",
752
- a.order
662
+ t.order
753
663
  ] }),
754
- /* @__PURE__ */ e("h3", { className: "nice-round-card__name", children: a.name }),
755
- /* @__PURE__ */ e("span", { className: "nice-round-card__status", children: a.status })
664
+ /* @__PURE__ */ e("h3", { className: "nice-round-card__name", children: t.name }),
665
+ /* @__PURE__ */ e("span", { className: "nice-round-card__status", children: t.status })
756
666
  ] }),
757
- a.description && /* @__PURE__ */ e("p", { className: "nice-round-card__description", children: a.description }),
758
- (y || m != null) && /* @__PURE__ */ t(
667
+ t.description && /* @__PURE__ */ e("p", { className: "nice-round-card__description", children: t.description }),
668
+ (p || u != null) && /* @__PURE__ */ i(
759
669
  "div",
760
670
  {
761
- className: `nice-round-card__timer ${y ? "nice-round-card__timer--running" : ""}`,
671
+ className: `nice-round-card__timer ${p ? "nice-round-card__timer--running" : ""}`,
762
672
  children: [
763
673
  "⏱️ ",
764
- m != null ? p(m) : "—"
674
+ u != null ? x(u) : "—"
765
675
  ]
766
676
  }
767
677
  ),
768
- c.length > 0 && /* @__PURE__ */ t("div", { className: "nice-round-card__scoreboard", children: [
678
+ d.length > 0 && /* @__PURE__ */ i("div", { className: "nice-round-card__scoreboard", children: [
769
679
  /* @__PURE__ */ e("h4", { children: "Scoreboard" }),
770
- /* @__PURE__ */ t("table", { className: "nice-round-card__scores-table", children: [
771
- /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ t("tr", { children: [
680
+ /* @__PURE__ */ i("table", { className: "nice-round-card__scores-table", children: [
681
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ i("tr", { children: [
772
682
  /* @__PURE__ */ e("th", { children: "Rank" }),
773
683
  /* @__PURE__ */ e("th", { children: "Participant" }),
774
684
  /* @__PURE__ */ e("th", { children: "Score" })
775
685
  ] }) }),
776
- /* @__PURE__ */ e("tbody", { children: c.map((n, d) => /* @__PURE__ */ t(
686
+ /* @__PURE__ */ e("tbody", { children: d.map((n, c) => /* @__PURE__ */ i(
777
687
  "tr",
778
688
  {
779
- className: d < 3 ? `nice-round-card__top-${d + 1}` : "",
689
+ className: c < 3 ? `nice-round-card__top-${c + 1}` : "",
780
690
  children: [
781
- /* @__PURE__ */ t("td", { children: [
782
- n.rank ?? d + 1,
783
- d === 0 ? " 🥇" : d === 1 ? " 🥈" : d === 2 ? " 🥉" : ""
691
+ /* @__PURE__ */ i("td", { children: [
692
+ n.rank ?? c + 1,
693
+ c === 0 ? " 🥇" : c === 1 ? " 🥈" : c === 2 ? " 🥉" : ""
784
694
  ] }),
785
695
  /* @__PURE__ */ e("td", { children: n.participantName }),
786
696
  /* @__PURE__ */ e("td", { children: n.score })
@@ -790,123 +700,123 @@ const be = P(
790
700
  )) })
791
701
  ] })
792
702
  ] }),
793
- v && (a.status === "active" || a.status === "voting") && c.length > 0 && /* @__PURE__ */ t("div", { className: "nice-round-card__score-input", children: [
703
+ m && (t.status === "active" || t.status === "voting") && d.length > 0 && /* @__PURE__ */ i("div", { className: "nice-round-card__score-input", children: [
794
704
  /* @__PURE__ */ e("h4", { children: "Submit Scores" }),
795
- c.map((n) => /* @__PURE__ */ t("div", { className: "nice-round-card__score-row", children: [
705
+ d.map((n) => /* @__PURE__ */ i("div", { className: "nice-round-card__score-row", children: [
796
706
  /* @__PURE__ */ e("span", { children: n.participantName }),
797
707
  /* @__PURE__ */ e(
798
708
  "input",
799
709
  {
800
710
  type: "number",
801
- value: u[n.participantId] ?? "",
802
- onChange: (d) => k((i) => ({ ...i, [n.participantId]: d.target.value })),
711
+ value: o[n.participantId] ?? "",
712
+ onChange: (c) => k((a) => ({ ...a, [n.participantId]: c.target.value })),
803
713
  min: 0,
804
714
  step: 1,
805
715
  placeholder: "Score"
806
716
  }
807
717
  ),
808
- /* @__PURE__ */ e("button", { onClick: () => b(n.participantId), children: "Submit" })
718
+ /* @__PURE__ */ e("button", { onClick: () => y(n.participantId), children: "Submit" })
809
719
  ] }, n.participantId))
810
720
  ] }),
811
- /* @__PURE__ */ t("div", { className: "nice-round-card__footer", children: [
812
- N && /* @__PURE__ */ t("div", { className: "nice-round-card__actions", children: [
813
- a.status === "upcoming" && _ && /* @__PURE__ */ e("button", { onClick: _, children: "▶ Start Round" }),
814
- (a.status === "active" || a.status === "voting") && g && /* @__PURE__ */ e("button", { onClick: g, children: "⏹ End Round" }),
815
- a.status === "upcoming" && S && /* @__PURE__ */ e("button", { onClick: S, children: "⏭ Skip" })
721
+ /* @__PURE__ */ i("div", { className: "nice-round-card__footer", children: [
722
+ g && /* @__PURE__ */ i("div", { className: "nice-round-card__actions", children: [
723
+ t.status === "upcoming" && h && /* @__PURE__ */ e("button", { onClick: h, children: "▶ Start Round" }),
724
+ (t.status === "active" || t.status === "voting") && v && /* @__PURE__ */ e("button", { onClick: v, children: "⏹ End Round" }),
725
+ t.status === "upcoming" && _ && /* @__PURE__ */ e("button", { onClick: _, children: "⏭ Skip" })
816
726
  ] }),
817
- f
727
+ S
818
728
  ] }),
819
- a.winnerIds && a.winnerIds.length > 0 && /* @__PURE__ */ t("div", { className: "nice-round-card__winners", children: [
729
+ t.winnerIds && t.winnerIds.length > 0 && /* @__PURE__ */ i("div", { className: "nice-round-card__winners", children: [
820
730
  "🏆 Winners: ",
821
- a.winnerIds.length
731
+ t.winnerIds.length
822
732
  ] })
823
733
  ]
824
734
  }
825
735
  );
826
736
  }
827
- ), Ae = P(
828
- function(x, A) {
737
+ ), Ln = E(
738
+ function(N, C) {
829
739
  const {
830
- songs: a,
831
- onAdd: y,
832
- onRemove: m,
833
- onVote: v,
834
- onSearch: _,
835
- showQueue: g = !0,
836
- readOnly: S = !1,
837
- className: N,
838
- style: f
839
- } = x, [C, s] = w(""), u = R(() => {
840
- if (!C.trim())
841
- return a;
842
- const n = C.toLowerCase();
843
- return a.filter(
844
- (d) => d.title.toLowerCase().includes(n) || d.artist.toLowerCase().includes(n)
740
+ songs: t,
741
+ onAdd: p,
742
+ onRemove: u,
743
+ onVote: m,
744
+ onSearch: h,
745
+ showQueue: v = !0,
746
+ readOnly: _ = !1,
747
+ className: g,
748
+ style: S
749
+ } = N, [b, l] = f(""), o = I(() => {
750
+ if (!b.trim())
751
+ return t;
752
+ const n = b.toLowerCase();
753
+ return t.filter(
754
+ (c) => c.title.toLowerCase().includes(n) || c.artist.toLowerCase().includes(n)
845
755
  );
846
- }, [a, C]), k = R(() => a.filter((n) => n.isQueued), [a]), b = a.find((n) => n.isPlaying), p = (n) => {
847
- s(n), _ == null || _(n);
848
- }, c = (n) => {
756
+ }, [t, b]), k = I(() => t.filter((n) => n.isQueued), [t]), y = t.find((n) => n.isPlaying), x = (n) => {
757
+ l(n), h == null || h(n);
758
+ }, d = (n) => {
849
759
  if (!n)
850
760
  return "";
851
- const d = Math.floor(n / 60), i = n % 60;
852
- return `${d}:${i.toString().padStart(2, "0")}`;
761
+ const c = Math.floor(n / 60), a = n % 60;
762
+ return `${c}:${a.toString().padStart(2, "0")}`;
853
763
  };
854
- return /* @__PURE__ */ t("div", { ref: A, className: `nice-song-picker ${N ?? ""}`, style: f, children: [
855
- b && /* @__PURE__ */ t("div", { className: "nice-song-picker__now-playing", children: [
764
+ return /* @__PURE__ */ i("div", { ref: C, className: `nice-song-picker ${g ?? ""}`, style: S, children: [
765
+ y && /* @__PURE__ */ i("div", { className: "nice-song-picker__now-playing", children: [
856
766
  /* @__PURE__ */ e("span", { className: "nice-song-picker__np-label", children: "🎵 Now Playing" }),
857
- b.albumArt && /* @__PURE__ */ e("img", { src: b.albumArt, alt: "", className: "nice-song-picker__album-art" }),
858
- /* @__PURE__ */ e("strong", { children: b.title }),
859
- /* @__PURE__ */ e("span", { children: b.artist })
767
+ y.albumArt && /* @__PURE__ */ e("img", { src: y.albumArt, alt: "", className: "nice-song-picker__album-art" }),
768
+ /* @__PURE__ */ e("strong", { children: y.title }),
769
+ /* @__PURE__ */ e("span", { children: y.artist })
860
770
  ] }),
861
771
  /* @__PURE__ */ e(
862
772
  "input",
863
773
  {
864
774
  type: "text",
865
- value: C,
866
- onChange: (n) => p(n.target.value),
775
+ value: b,
776
+ onChange: (n) => x(n.target.value),
867
777
  placeholder: "Search songs…",
868
778
  className: "nice-song-picker__search"
869
779
  }
870
780
  ),
871
- /* @__PURE__ */ e("div", { className: "nice-song-picker__list", children: u.length === 0 ? /* @__PURE__ */ e("p", { className: "nice-song-picker__empty", children: "No songs found." }) : u.map((n) => /* @__PURE__ */ t(
781
+ /* @__PURE__ */ e("div", { className: "nice-song-picker__list", children: o.length === 0 ? /* @__PURE__ */ e("p", { className: "nice-song-picker__empty", children: "No songs found." }) : o.map((n) => /* @__PURE__ */ i(
872
782
  "div",
873
783
  {
874
784
  className: `nice-song-picker__item ${n.isPlaying ? "nice-song-picker__item--playing" : ""}`,
875
785
  children: [
876
786
  n.albumArt && /* @__PURE__ */ e("img", { src: n.albumArt, alt: "", className: "nice-song-picker__thumb" }),
877
- /* @__PURE__ */ t("div", { className: "nice-song-picker__info", children: [
787
+ /* @__PURE__ */ i("div", { className: "nice-song-picker__info", children: [
878
788
  /* @__PURE__ */ e("strong", { children: n.title }),
879
789
  /* @__PURE__ */ e("span", { children: n.artist }),
880
- n.duration && /* @__PURE__ */ e("span", { className: "nice-song-picker__duration", children: c(n.duration) }),
881
- n.addedByName && /* @__PURE__ */ t("small", { children: [
790
+ n.duration && /* @__PURE__ */ e("span", { className: "nice-song-picker__duration", children: d(n.duration) }),
791
+ n.addedByName && /* @__PURE__ */ i("small", { children: [
882
792
  "Added by ",
883
793
  n.addedByName
884
794
  ] })
885
795
  ] }),
886
- !S && /* @__PURE__ */ t("div", { className: "nice-song-picker__actions", children: [
887
- v && /* @__PURE__ */ t("button", { onClick: () => v(n.id), children: [
796
+ !_ && /* @__PURE__ */ i("div", { className: "nice-song-picker__actions", children: [
797
+ m && /* @__PURE__ */ i("button", { onClick: () => m(n.id), children: [
888
798
  "👍 ",
889
799
  n.votes ?? 0
890
800
  ] }),
891
- y && !n.isQueued && /* @__PURE__ */ e("button", { onClick: () => y(n.id), children: "+ Queue" }),
892
- m && n.isQueued && /* @__PURE__ */ e("button", { onClick: () => m(n.id), children: "Remove" })
801
+ p && !n.isQueued && /* @__PURE__ */ e("button", { onClick: () => p(n.id), children: "+ Queue" }),
802
+ u && n.isQueued && /* @__PURE__ */ e("button", { onClick: () => u(n.id), children: "Remove" })
893
803
  ] })
894
804
  ]
895
805
  },
896
806
  n.id
897
807
  )) }),
898
- g && k.length > 0 && /* @__PURE__ */ t("div", { className: "nice-song-picker__queue", children: [
899
- /* @__PURE__ */ t("h4", { children: [
808
+ v && k.length > 0 && /* @__PURE__ */ i("div", { className: "nice-song-picker__queue", children: [
809
+ /* @__PURE__ */ i("h4", { children: [
900
810
  "Queue (",
901
811
  k.length,
902
812
  ")"
903
813
  ] }),
904
- k.map((n, d) => /* @__PURE__ */ t("div", { className: "nice-song-picker__queue-item", children: [
905
- /* @__PURE__ */ t("span", { className: "nice-song-picker__queue-pos", children: [
906
- d + 1,
814
+ k.map((n, c) => /* @__PURE__ */ i("div", { className: "nice-song-picker__queue-item", children: [
815
+ /* @__PURE__ */ i("span", { className: "nice-song-picker__queue-pos", children: [
816
+ c + 1,
907
817
  "."
908
818
  ] }),
909
- /* @__PURE__ */ t("span", { children: [
819
+ /* @__PURE__ */ i("span", { children: [
910
820
  n.title,
911
821
  " — ",
912
822
  n.artist
@@ -915,29 +825,29 @@ const be = P(
915
825
  ] })
916
826
  ] });
917
827
  }
918
- ), Ie = P(
919
- function(x, A) {
828
+ ), Tn = E(
829
+ function(N, C) {
920
830
  const {
921
- songs: a,
922
- queue: y = [],
923
- onEnqueue: m,
924
- onDequeue: v,
925
- onNext: _,
926
- nowPlayingId: g,
927
- readOnly: S = !1,
928
- className: N,
929
- style: f
930
- } = x, [C, s] = w(""), [u, k] = w(""), b = a.find((i) => i.id === g), p = R(() => {
931
- let i = a;
932
- if (C.trim()) {
933
- const h = C.toLowerCase();
934
- i = i.filter(
935
- (l) => l.title.toLowerCase().includes(h) || l.artist.toLowerCase().includes(h)
831
+ songs: t,
832
+ queue: p = [],
833
+ onEnqueue: u,
834
+ onDequeue: m,
835
+ onNext: h,
836
+ nowPlayingId: v,
837
+ readOnly: _ = !1,
838
+ className: g,
839
+ style: S
840
+ } = N, [b, l] = f(""), [o, k] = f(""), y = t.find((a) => a.id === v), x = I(() => {
841
+ let a = t;
842
+ if (b.trim()) {
843
+ const w = b.toLowerCase();
844
+ a = a.filter(
845
+ (s) => s.title.toLowerCase().includes(w) || s.artist.toLowerCase().includes(w)
936
846
  );
937
847
  }
938
- return u && (i = i.filter((h) => h.difficulty === u)), i;
939
- }, [a, C, u]), c = R(() => new Set(y.map((i) => i.id)), [y]), n = ["easy", "medium", "hard", "expert"], d = (i) => {
940
- switch (i) {
848
+ return o && (a = a.filter((w) => w.difficulty === o)), a;
849
+ }, [t, b, o]), d = I(() => new Set(p.map((a) => a.id)), [p]), n = ["easy", "medium", "hard", "expert"], c = (a) => {
850
+ switch (a) {
941
851
  case "easy":
942
852
  return "#4caf50";
943
853
  case "medium":
@@ -950,8 +860,8 @@ const be = P(
950
860
  return "#999";
951
861
  }
952
862
  };
953
- return /* @__PURE__ */ t("div", { ref: A, className: `nice-karaoke-picker ${N ?? ""}`, style: f, children: [
954
- b && /* @__PURE__ */ t(
863
+ return /* @__PURE__ */ i("div", { ref: C, className: `nice-karaoke-picker ${g ?? ""}`, style: S, children: [
864
+ y && /* @__PURE__ */ i(
955
865
  "div",
956
866
  {
957
867
  className: "nice-karaoke-picker__now-singing",
@@ -963,21 +873,21 @@ const be = P(
963
873
  },
964
874
  children: [
965
875
  /* @__PURE__ */ e("span", { style: { fontWeight: 600 }, children: "🎤 Now Singing" }),
966
- /* @__PURE__ */ t("div", { children: [
967
- /* @__PURE__ */ e("strong", { children: b.title }),
876
+ /* @__PURE__ */ i("div", { children: [
877
+ /* @__PURE__ */ e("strong", { children: y.title }),
968
878
  " — ",
969
- b.artist,
970
- b.performerName && /* @__PURE__ */ t("span", { children: [
879
+ y.artist,
880
+ y.performerName && /* @__PURE__ */ i("span", { children: [
971
881
  " (by ",
972
- b.performerName,
882
+ y.performerName,
973
883
  ")"
974
884
  ] })
975
885
  ] }),
976
- !S && _ && /* @__PURE__ */ e("button", { onClick: _, style: { marginTop: 8 }, children: "Skip / Next ⏭" })
886
+ !_ && h && /* @__PURE__ */ e("button", { onClick: h, style: { marginTop: 8 }, children: "Skip / Next ⏭" })
977
887
  ]
978
888
  }
979
889
  ),
980
- /* @__PURE__ */ t(
890
+ /* @__PURE__ */ i(
981
891
  "div",
982
892
  {
983
893
  className: "nice-karaoke-picker__filters",
@@ -987,20 +897,20 @@ const be = P(
987
897
  "input",
988
898
  {
989
899
  type: "text",
990
- value: C,
991
- onChange: (i) => s(i.target.value),
900
+ value: b,
901
+ onChange: (a) => l(a.target.value),
992
902
  placeholder: "Search songs or artists…",
993
903
  style: { flex: 1 }
994
904
  }
995
905
  ),
996
- /* @__PURE__ */ t("select", { value: u, onChange: (i) => k(i.target.value), children: [
906
+ /* @__PURE__ */ i("select", { value: o, onChange: (a) => k(a.target.value), children: [
997
907
  /* @__PURE__ */ e("option", { value: "", children: "All Difficulties" }),
998
- n.map((i) => /* @__PURE__ */ e("option", { value: i, children: i }, i))
908
+ n.map((a) => /* @__PURE__ */ e("option", { value: a, children: a }, a))
999
909
  ] })
1000
910
  ]
1001
911
  }
1002
912
  ),
1003
- /* @__PURE__ */ e("div", { className: "nice-karaoke-picker__catalog", children: p.length === 0 ? /* @__PURE__ */ e("p", { children: "No songs match your search." }) : p.map((i) => /* @__PURE__ */ t(
913
+ /* @__PURE__ */ e("div", { className: "nice-karaoke-picker__catalog", children: x.length === 0 ? /* @__PURE__ */ e("p", { children: "No songs match your search." }) : x.map((a) => /* @__PURE__ */ i(
1004
914
  "div",
1005
915
  {
1006
916
  className: "nice-karaoke-picker__song",
@@ -1012,81 +922,81 @@ const be = P(
1012
922
  borderBottom: "1px solid #eee"
1013
923
  },
1014
924
  children: [
1015
- /* @__PURE__ */ t("div", { children: [
1016
- /* @__PURE__ */ e("strong", { children: i.title }),
925
+ /* @__PURE__ */ i("div", { children: [
926
+ /* @__PURE__ */ e("strong", { children: a.title }),
1017
927
  " — ",
1018
- i.artist,
1019
- i.difficulty && /* @__PURE__ */ t(
928
+ a.artist,
929
+ a.difficulty && /* @__PURE__ */ i(
1020
930
  "span",
1021
931
  {
1022
932
  style: {
1023
933
  marginLeft: 8,
1024
934
  fontSize: 12,
1025
- color: d(i.difficulty),
935
+ color: c(a.difficulty),
1026
936
  fontWeight: 600
1027
937
  },
1028
938
  children: [
1029
939
  "[",
1030
- i.difficulty,
940
+ a.difficulty,
1031
941
  "]"
1032
942
  ]
1033
943
  }
1034
944
  ),
1035
- i.hasLyrics && /* @__PURE__ */ e("span", { style: { marginLeft: 6, fontSize: 12 }, title: "Lyrics available", children: "📝" }),
1036
- i.language && /* @__PURE__ */ t("span", { style: { marginLeft: 6, fontSize: 12, color: "#666" }, children: [
945
+ a.hasLyrics && /* @__PURE__ */ e("span", { style: { marginLeft: 6, fontSize: 12 }, title: "Lyrics available", children: "📝" }),
946
+ a.language && /* @__PURE__ */ i("span", { style: { marginLeft: 6, fontSize: 12, color: "#666" }, children: [
1037
947
  "(",
1038
- i.language,
948
+ a.language,
1039
949
  ")"
1040
950
  ] })
1041
951
  ] }),
1042
- !S && /* @__PURE__ */ e("div", { children: c.has(i.id) ? /* @__PURE__ */ e("button", { onClick: () => v == null ? void 0 : v(i.id), style: { color: "#f44336" }, children: "Remove" }) : /* @__PURE__ */ e("button", { onClick: () => m == null ? void 0 : m(i.id), children: "🎤 Sing" }) })
952
+ !_ && /* @__PURE__ */ e("div", { children: d.has(a.id) ? /* @__PURE__ */ e("button", { onClick: () => m == null ? void 0 : m(a.id), style: { color: "#f44336" }, children: "Remove" }) : /* @__PURE__ */ e("button", { onClick: () => u == null ? void 0 : u(a.id), children: "🎤 Sing" }) })
1043
953
  ]
1044
954
  },
1045
- i.id
955
+ a.id
1046
956
  )) }),
1047
- y.length > 0 && /* @__PURE__ */ t("div", { className: "nice-karaoke-picker__queue", style: { marginTop: 16 }, children: [
1048
- /* @__PURE__ */ t("h4", { children: [
957
+ p.length > 0 && /* @__PURE__ */ i("div", { className: "nice-karaoke-picker__queue", style: { marginTop: 16 }, children: [
958
+ /* @__PURE__ */ i("h4", { children: [
1049
959
  "🎶 Queue (",
1050
- y.length,
960
+ p.length,
1051
961
  ")"
1052
962
  ] }),
1053
- y.map((i, h) => /* @__PURE__ */ t(
963
+ p.map((a, w) => /* @__PURE__ */ i(
1054
964
  "div",
1055
965
  {
1056
966
  style: { display: "flex", justifyContent: "space-between", padding: "4px 0" },
1057
967
  children: [
1058
- /* @__PURE__ */ t("span", { children: [
1059
- /* @__PURE__ */ t("strong", { children: [
1060
- h + 1,
968
+ /* @__PURE__ */ i("span", { children: [
969
+ /* @__PURE__ */ i("strong", { children: [
970
+ w + 1,
1061
971
  "."
1062
972
  ] }),
1063
973
  " ",
1064
- i.title,
974
+ a.title,
1065
975
  " — ",
1066
- i.artist,
1067
- i.performerName && /* @__PURE__ */ t("em", { children: [
976
+ a.artist,
977
+ a.performerName && /* @__PURE__ */ i("em", { children: [
1068
978
  " (",
1069
- i.performerName,
979
+ a.performerName,
1070
980
  ")"
1071
981
  ] })
1072
982
  ] }),
1073
- !S && v && /* @__PURE__ */ e("button", { onClick: () => v(i.id), style: { fontSize: 12 }, children: "✕" })
983
+ !_ && m && /* @__PURE__ */ e("button", { onClick: () => m(a.id), style: { fontSize: 12 }, children: "✕" })
1074
984
  ]
1075
985
  },
1076
- i.id
986
+ a.id
1077
987
  ))
1078
988
  ] })
1079
989
  ] });
1080
990
  }
1081
- ), ee = {
1082
- game: "🎮",
1083
- music: "🎵",
1084
- dance: "💃",
1085
- quiz: "❓",
1086
- karaoke: "🎤",
1087
- photo: "📸",
1088
- custom: "✨"
1089
- }, _e = {
991
+ ), ye = {
992
+ game: ke,
993
+ music: q,
994
+ dance: q,
995
+ quiz: be,
996
+ karaoke: _e,
997
+ photo: Ne,
998
+ custom: fe
999
+ }, Nn = {
1090
1000
  game: "Games",
1091
1001
  music: "Music",
1092
1002
  dance: "Dance",
@@ -1094,346 +1004,410 @@ const be = P(
1094
1004
  karaoke: "Karaoke",
1095
1005
  photo: "Photo",
1096
1006
  custom: "Custom"
1097
- }, Re = P(
1098
- function(x, A) {
1007
+ }, Pn = E(
1008
+ function(N, C) {
1099
1009
  const {
1100
- attractions: a,
1101
- onSelect: y,
1102
- onDeselect: m,
1103
- onVote: v,
1104
- selectedIds: _ = [],
1105
- maxSelections: g,
1106
- showVotes: S = !0,
1107
- readOnly: N = !1,
1108
- layout: f = "grid",
1109
- className: C,
1110
- style: s
1111
- } = x, [u, k] = w(""), [b, p] = w(""), c = R(() => new Set(_), [_]), n = R(() => {
1112
- const l = new Set(a.map((o) => o.category));
1113
- return Array.from(l);
1114
- }, [a]), d = R(() => {
1115
- let l = a;
1116
- if (u && (l = l.filter((o) => o.category === u)), b.trim()) {
1117
- const o = b.toLowerCase();
1118
- l = l.filter(
1119
- (I) => {
1120
- var O;
1121
- return I.name.toLowerCase().includes(o) || ((O = I.description) == null ? void 0 : O.toLowerCase().includes(o));
1010
+ attractions: t,
1011
+ onSelect: p,
1012
+ onDeselect: u,
1013
+ onVote: m,
1014
+ selectedIds: h = [],
1015
+ maxSelections: v,
1016
+ showVotes: _ = !0,
1017
+ readOnly: g = !1,
1018
+ layout: S = "grid",
1019
+ className: b,
1020
+ style: l
1021
+ } = N, [o, k] = f(""), [y, x] = f(""), d = I(() => new Set(h), [h]), n = I(() => {
1022
+ const s = new Set(t.map((A) => A.category));
1023
+ return Array.from(s);
1024
+ }, [t]), c = I(() => {
1025
+ let s = t;
1026
+ if (o && (s = s.filter((A) => A.category === o)), y.trim()) {
1027
+ const A = y.toLowerCase();
1028
+ s = s.filter(
1029
+ (P) => {
1030
+ var V;
1031
+ return P.name.toLowerCase().includes(A) || ((V = P.description) == null ? void 0 : V.toLowerCase().includes(A));
1122
1032
  }
1123
1033
  );
1124
1034
  }
1125
- return l;
1126
- }, [a, u, b]), i = !g || c.size < g, h = (l) => {
1127
- N || (c.has(l) ? m == null || m(l) : i && (y == null || y(l)));
1035
+ return s;
1036
+ }, [t, o, y]), a = !v || d.size < v, w = (s) => {
1037
+ g || (d.has(s) ? u == null || u(s) : a && (p == null || p(s)));
1128
1038
  };
1129
- return /* @__PURE__ */ t("div", { ref: A, className: `nice-attraction-picker ${C ?? ""}`, style: s, children: [
1130
- /* @__PURE__ */ t(
1131
- "div",
1132
- {
1133
- style: {
1134
- display: "flex",
1135
- justifyContent: "space-between",
1136
- alignItems: "center",
1137
- marginBottom: 12
1138
- },
1139
- children: [
1140
- /* @__PURE__ */ e("h3", { style: { margin: 0 }, children: "Attractions" }),
1141
- g && /* @__PURE__ */ t("span", { style: { color: "#666", fontSize: 14 }, children: [
1142
- c.size,
1143
- "/",
1144
- g,
1145
- " selected"
1146
- ] })
1147
- ]
1148
- }
1149
- ),
1150
- /* @__PURE__ */ t("div", { style: { display: "flex", gap: 8, marginBottom: 12, flexWrap: "wrap" }, children: [
1151
- /* @__PURE__ */ e(
1152
- "input",
1153
- {
1154
- type: "text",
1155
- value: b,
1156
- onChange: (l) => p(l.target.value),
1157
- placeholder: "Search attractions…",
1158
- style: { flex: 1, minWidth: 150 }
1159
- }
1160
- ),
1161
- /* @__PURE__ */ e(
1162
- "button",
1163
- {
1164
- onClick: () => k(""),
1165
- style: { fontWeight: u ? 400 : 700 },
1166
- children: "All"
1167
- }
1168
- ),
1169
- n.map((l) => /* @__PURE__ */ t(
1170
- "button",
1171
- {
1172
- onClick: () => k(l === u ? "" : l),
1173
- style: { fontWeight: l === u ? 700 : 400 },
1174
- children: [
1175
- ee[l],
1176
- " ",
1177
- _e[l]
1178
- ]
1179
- },
1180
- l
1181
- ))
1182
- ] }),
1183
- /* @__PURE__ */ e(
1184
- "div",
1185
- {
1186
- style: {
1187
- display: f === "grid" ? "grid" : "flex",
1188
- gridTemplateColumns: f === "grid" ? "repeat(auto-fill, minmax(200px, 1fr))" : void 0,
1189
- gap: 12,
1190
- flexDirection: f === "list" ? "column" : void 0
1191
- },
1192
- children: d.length === 0 ? /* @__PURE__ */ e("p", { children: "No attractions found." }) : d.map((l) => {
1193
- const o = c.has(l.id);
1194
- return /* @__PURE__ */ t(
1195
- "div",
1039
+ return /* @__PURE__ */ i(
1040
+ "div",
1041
+ {
1042
+ ref: C,
1043
+ className: `nice-attraction-picker ${b ?? ""}`,
1044
+ style: { color: "var(--text-primary)", ...l },
1045
+ children: [
1046
+ /* @__PURE__ */ i(
1047
+ "div",
1048
+ {
1049
+ style: {
1050
+ display: "flex",
1051
+ justifyContent: "space-between",
1052
+ alignItems: "center",
1053
+ marginBottom: 12
1054
+ },
1055
+ children: [
1056
+ /* @__PURE__ */ e("h3", { style: { margin: 0 }, children: "Attractions" }),
1057
+ v && /* @__PURE__ */ i("span", { style: { color: "var(--text-secondary, #64748b)", fontSize: 14 }, children: [
1058
+ d.size,
1059
+ "/",
1060
+ v,
1061
+ " selected"
1062
+ ] })
1063
+ ]
1064
+ }
1065
+ ),
1066
+ /* @__PURE__ */ i("div", { style: { display: "flex", gap: 8, marginBottom: 12, flexWrap: "wrap" }, children: [
1067
+ /* @__PURE__ */ e(
1068
+ "input",
1196
1069
  {
1197
- className: "nice-attraction-picker__card",
1070
+ type: "text",
1071
+ value: y,
1072
+ onChange: (s) => x(s.target.value),
1073
+ placeholder: "Search attractions…",
1074
+ style: { flex: 1, minWidth: 150 }
1075
+ }
1076
+ ),
1077
+ /* @__PURE__ */ e(
1078
+ "button",
1079
+ {
1080
+ onClick: () => k(""),
1081
+ style: { fontWeight: o ? 400 : 700 },
1082
+ children: "All"
1083
+ }
1084
+ ),
1085
+ n.map((s) => /* @__PURE__ */ i(
1086
+ "button",
1087
+ {
1088
+ onClick: () => k(s === o ? "" : s),
1198
1089
  style: {
1199
- border: o ? "2px solid #1976d2" : "1px solid #ddd",
1200
- borderRadius: 8,
1201
- padding: 12,
1202
- cursor: N ? "default" : "pointer",
1203
- background: o ? "#e3f2fd" : "#fff",
1204
- transition: "all 0.2s"
1090
+ fontWeight: s === o ? 700 : 400,
1091
+ display: "inline-flex",
1092
+ alignItems: "center",
1093
+ gap: 4
1205
1094
  },
1206
- onClick: () => h(l.id),
1207
1095
  children: [
1208
- l.imageUrl && /* @__PURE__ */ e(
1209
- "img",
1210
- {
1211
- src: l.imageUrl,
1212
- alt: l.name,
1213
- style: {
1214
- width: "100%",
1215
- borderRadius: 6,
1216
- marginBottom: 8,
1217
- objectFit: "cover",
1218
- maxHeight: 120
1219
- }
1220
- }
1221
- ),
1222
- /* @__PURE__ */ t("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
1223
- /* @__PURE__ */ e("span", { children: ee[l.category] }),
1224
- /* @__PURE__ */ e("strong", { children: l.name })
1225
- ] }),
1226
- l.description && /* @__PURE__ */ e("p", { style: { fontSize: 13, color: "#666", margin: "6px 0" }, children: l.description }),
1227
- /* @__PURE__ */ t(
1228
- "div",
1229
- {
1230
- style: {
1231
- display: "flex",
1232
- justifyContent: "space-between",
1233
- alignItems: "center",
1234
- marginTop: 8
1235
- },
1236
- children: [
1237
- S && /* @__PURE__ */ t("span", { style: { fontSize: 13 }, children: [
1238
- "👍 ",
1239
- l.votes ?? 0
1240
- ] }),
1241
- !N && v && /* @__PURE__ */ e(
1242
- "button",
1243
- {
1244
- onClick: (I) => {
1245
- I.stopPropagation(), v(l.id);
1246
- },
1247
- style: { fontSize: 12 },
1248
- children: "Vote"
1249
- }
1250
- )
1251
- ]
1252
- }
1253
- )
1096
+ ne.createElement(ye[s], { size: 14 }),
1097
+ " ",
1098
+ Nn[s]
1254
1099
  ]
1255
1100
  },
1256
- l.id
1257
- );
1258
- })
1259
- }
1260
- )
1261
- ] });
1101
+ s
1102
+ ))
1103
+ ] }),
1104
+ /* @__PURE__ */ e(
1105
+ "div",
1106
+ {
1107
+ style: {
1108
+ display: S === "grid" ? "grid" : "flex",
1109
+ gridTemplateColumns: S === "grid" ? "repeat(auto-fill, minmax(200px, 1fr))" : void 0,
1110
+ gap: 12,
1111
+ flexDirection: S === "list" ? "column" : void 0
1112
+ },
1113
+ children: c.length === 0 ? /* @__PURE__ */ e("p", { children: "No attractions found." }) : c.map((s) => {
1114
+ const A = d.has(s.id);
1115
+ return /* @__PURE__ */ i(
1116
+ "div",
1117
+ {
1118
+ className: "nice-attraction-picker__card",
1119
+ style: {
1120
+ border: A ? "2px solid var(--color-primary, #6366f1)" : "1px solid var(--border-color, #cbd5e1)",
1121
+ borderRadius: 8,
1122
+ padding: 12,
1123
+ cursor: g ? "default" : "pointer",
1124
+ background: A ? "color-mix(in srgb, var(--color-primary) 12%, transparent)" : "var(--bg-elevated, var(--bg-primary))",
1125
+ transition: "all 0.2s"
1126
+ },
1127
+ onClick: () => w(s.id),
1128
+ children: [
1129
+ s.imageUrl && /* @__PURE__ */ e(
1130
+ "img",
1131
+ {
1132
+ src: s.imageUrl,
1133
+ alt: s.name,
1134
+ style: {
1135
+ width: "100%",
1136
+ borderRadius: 6,
1137
+ marginBottom: 8,
1138
+ objectFit: "cover",
1139
+ maxHeight: 120
1140
+ }
1141
+ }
1142
+ ),
1143
+ /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
1144
+ /* @__PURE__ */ e("span", { style: { display: "inline-flex" }, children: ne.createElement(ye[s.category], { size: 16 }) }),
1145
+ /* @__PURE__ */ e("strong", { children: s.name })
1146
+ ] }),
1147
+ s.description && /* @__PURE__ */ e(
1148
+ "p",
1149
+ {
1150
+ style: {
1151
+ fontSize: 13,
1152
+ color: "var(--text-secondary, #64748b)",
1153
+ margin: "6px 0"
1154
+ },
1155
+ children: s.description
1156
+ }
1157
+ ),
1158
+ /* @__PURE__ */ i(
1159
+ "div",
1160
+ {
1161
+ style: {
1162
+ display: "flex",
1163
+ justifyContent: "space-between",
1164
+ alignItems: "center",
1165
+ marginTop: 8
1166
+ },
1167
+ children: [
1168
+ _ && /* @__PURE__ */ i(
1169
+ "span",
1170
+ {
1171
+ style: {
1172
+ fontSize: 13,
1173
+ display: "inline-flex",
1174
+ alignItems: "center",
1175
+ gap: 4
1176
+ },
1177
+ children: [
1178
+ /* @__PURE__ */ e(cn, { size: 14 }),
1179
+ " ",
1180
+ s.votes ?? 0
1181
+ ]
1182
+ }
1183
+ ),
1184
+ !g && m && /* @__PURE__ */ e(
1185
+ "button",
1186
+ {
1187
+ onClick: (P) => {
1188
+ P.stopPropagation(), m(s.id);
1189
+ },
1190
+ style: { fontSize: 12 },
1191
+ children: "Vote"
1192
+ }
1193
+ )
1194
+ ]
1195
+ }
1196
+ )
1197
+ ]
1198
+ },
1199
+ s.id
1200
+ );
1201
+ })
1202
+ }
1203
+ )
1204
+ ]
1205
+ }
1206
+ );
1262
1207
  }
1263
- ), fe = {
1264
- game: "🎮",
1265
- music: "🎵",
1266
- dance: "💃",
1267
- quiz: "❓",
1268
- karaoke: "🎤",
1269
- photo: "📸",
1270
- custom: "✨"
1271
- }, Pe = P(
1272
- function(x, A) {
1208
+ ), _n = {
1209
+ game: ke,
1210
+ music: q,
1211
+ dance: q,
1212
+ quiz: be,
1213
+ karaoke: _e,
1214
+ photo: Ne,
1215
+ custom: fe
1216
+ }, Rn = E(
1217
+ function(N, C) {
1273
1218
  const {
1274
- attractions: a,
1275
- onVote: y,
1276
- onUnvote: m,
1277
- votedIds: v = [],
1278
- maxVotes: _,
1279
- closed: g = !1,
1280
- sortBy: S = "votes",
1281
- showResults: N = !0,
1282
- className: f,
1283
- style: C
1284
- } = x, s = R(() => new Set(v), [v]), u = _ ? _ - s.size : void 0, k = R(() => {
1285
- const n = [...a];
1286
- switch (S) {
1219
+ attractions: t,
1220
+ onVote: p,
1221
+ onUnvote: u,
1222
+ votedIds: m = [],
1223
+ maxVotes: h,
1224
+ closed: v = !1,
1225
+ sortBy: _ = "votes",
1226
+ showResults: g = !0,
1227
+ className: S,
1228
+ style: b
1229
+ } = N, l = I(() => new Set(m), [m]), o = h ? h - l.size : void 0, k = I(() => {
1230
+ const n = [...t];
1231
+ switch (_) {
1287
1232
  case "votes":
1288
- n.sort((d, i) => (i.votes ?? 0) - (d.votes ?? 0));
1233
+ n.sort((c, a) => (a.votes ?? 0) - (c.votes ?? 0));
1289
1234
  break;
1290
1235
  case "name":
1291
- n.sort((d, i) => d.name.localeCompare(i.name));
1236
+ n.sort((c, a) => c.name.localeCompare(a.name));
1292
1237
  break;
1293
1238
  case "category":
1294
- n.sort((d, i) => d.category.localeCompare(i.category));
1239
+ n.sort((c, a) => c.category.localeCompare(a.category));
1295
1240
  break;
1296
1241
  }
1297
1242
  return n;
1298
- }, [a, S]), b = R(
1299
- () => Math.max(...a.map((n) => n.votes ?? 0), 1),
1300
- [a]
1301
- ), p = (n) => {
1302
- g || (s.has(n) ? m == null || m(n) : (!u || u > 0) && (y == null || y(n)));
1303
- }, c = (n) => {
1243
+ }, [t, _]), y = I(
1244
+ () => Math.max(...t.map((n) => n.votes ?? 0), 1),
1245
+ [t]
1246
+ ), x = (n) => {
1247
+ v || (l.has(n) ? u == null || u(n) : (!o || o > 0) && (p == null || p(n)));
1248
+ }, d = (n) => {
1304
1249
  switch (n) {
1305
1250
  case 0:
1306
- return "🥇";
1251
+ return /* @__PURE__ */ e(on, { size: 18, primaryColor: "#f59e0b", title: "1st place" });
1307
1252
  case 1:
1308
- return "🥈";
1253
+ return /* @__PURE__ */ e(ue, { size: 18, primaryColor: "#94a3b8", title: "2nd place" });
1309
1254
  case 2:
1310
- return "🥉";
1255
+ return /* @__PURE__ */ e(ue, { size: 18, primaryColor: "#b45309", title: "3rd place" });
1311
1256
  default:
1312
1257
  return `${n + 1}.`;
1313
1258
  }
1314
1259
  };
1315
- return /* @__PURE__ */ t("div", { ref: A, className: `nice-attraction-voting ${f ?? ""}`, style: C, children: [
1316
- /* @__PURE__ */ t(
1317
- "div",
1318
- {
1319
- style: {
1320
- display: "flex",
1321
- justifyContent: "space-between",
1322
- alignItems: "center",
1323
- marginBottom: 16
1324
- },
1325
- children: [
1326
- /* @__PURE__ */ e("h3", { style: { margin: 0 }, children: g ? "🗳️ Voting Results" : "🗳️ Vote for Attractions" }),
1327
- !g && u !== void 0 && /* @__PURE__ */ t("span", { style: { fontSize: 14, color: u > 0 ? "#1976d2" : "#f44336" }, children: [
1328
- u,
1329
- " vote",
1330
- u !== 1 ? "s" : "",
1331
- " remaining"
1332
- ] })
1333
- ]
1334
- }
1335
- ),
1336
- g && /* @__PURE__ */ e("p", { style: { color: "#666", marginBottom: 12 }, children: "Voting is closed. Final results:" }),
1337
- /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: k.map((n, d) => {
1338
- const i = s.has(n.id), h = n.votes ?? 0, l = N ? `${Math.round(h / b * 100)}%` : "0%";
1339
- return /* @__PURE__ */ t(
1340
- "div",
1341
- {
1342
- style: {
1343
- display: "flex",
1344
- alignItems: "center",
1345
- gap: 12,
1346
- padding: "10px 14px",
1347
- borderRadius: 8,
1348
- border: i ? "2px solid #1976d2" : "1px solid #e0e0e0",
1349
- background: i ? "#e3f2fd" : "#fff",
1350
- cursor: g ? "default" : "pointer",
1351
- transition: "all 0.2s"
1352
- },
1353
- onClick: () => p(n.id),
1354
- children: [
1355
- N && /* @__PURE__ */ e("span", { style: { fontSize: 18, minWidth: 32, textAlign: "center" }, children: c(d) }),
1356
- /* @__PURE__ */ e("span", { style: { fontSize: 20 }, children: fe[n.category] }),
1357
- /* @__PURE__ */ t("div", { style: { flex: 1, minWidth: 0 }, children: [
1358
- /* @__PURE__ */ e("div", { style: { fontWeight: 600 }, children: n.name }),
1359
- n.description && /* @__PURE__ */ e(
1360
- "div",
1260
+ return /* @__PURE__ */ i(
1261
+ "div",
1262
+ {
1263
+ ref: C,
1264
+ className: `nice-attraction-voting ${S ?? ""}`,
1265
+ style: { color: "var(--text-primary)", ...b },
1266
+ children: [
1267
+ /* @__PURE__ */ i(
1268
+ "div",
1269
+ {
1270
+ style: {
1271
+ display: "flex",
1272
+ justifyContent: "space-between",
1273
+ alignItems: "center",
1274
+ marginBottom: 16
1275
+ },
1276
+ children: [
1277
+ /* @__PURE__ */ i("h3", { style: { margin: 0, display: "inline-flex", alignItems: "center", gap: 8 }, children: [
1278
+ /* @__PURE__ */ e(sn, { size: 20 }),
1279
+ v ? "Voting Results" : "Vote for Attractions"
1280
+ ] }),
1281
+ !v && o !== void 0 && /* @__PURE__ */ i(
1282
+ "span",
1361
1283
  {
1362
1284
  style: {
1363
- fontSize: 13,
1364
- color: "#666",
1365
- overflow: "hidden",
1366
- textOverflow: "ellipsis",
1367
- whiteSpace: "nowrap"
1285
+ fontSize: 14,
1286
+ color: o > 0 ? "var(--color-primary, #6366f1)" : "var(--color-error, #ef4444)"
1368
1287
  },
1369
- children: n.description
1288
+ children: [
1289
+ o,
1290
+ " vote",
1291
+ o !== 1 ? "s" : "",
1292
+ " remaining"
1293
+ ]
1370
1294
  }
1371
- ),
1372
- N && /* @__PURE__ */ e(
1373
- "div",
1374
- {
1375
- style: {
1376
- marginTop: 4,
1377
- height: 6,
1378
- borderRadius: 3,
1379
- background: "#e0e0e0",
1380
- overflow: "hidden"
1381
- },
1382
- children: /* @__PURE__ */ e(
1295
+ )
1296
+ ]
1297
+ }
1298
+ ),
1299
+ v && /* @__PURE__ */ e("p", { style: { color: "var(--text-secondary, #64748b)", marginBottom: 12 }, children: "Voting is closed. Final results:" }),
1300
+ /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: k.map((n, c) => {
1301
+ const a = l.has(n.id), w = n.votes ?? 0, s = g ? `${Math.round(w / y * 100)}%` : "0%";
1302
+ return /* @__PURE__ */ i(
1303
+ "div",
1304
+ {
1305
+ style: {
1306
+ display: "flex",
1307
+ alignItems: "center",
1308
+ gap: 12,
1309
+ padding: "10px 14px",
1310
+ borderRadius: 8,
1311
+ border: a ? "2px solid var(--color-primary, #6366f1)" : "1px solid var(--border-color, #cbd5e1)",
1312
+ background: a ? "color-mix(in srgb, var(--color-primary) 12%, transparent)" : "var(--bg-elevated, var(--bg-primary))",
1313
+ cursor: v ? "default" : "pointer",
1314
+ transition: "all 0.2s"
1315
+ },
1316
+ onClick: () => x(n.id),
1317
+ children: [
1318
+ g && /* @__PURE__ */ e("span", { style: { fontSize: 18, minWidth: 32, textAlign: "center" }, children: d(c) }),
1319
+ /* @__PURE__ */ e("span", { style: { display: "inline-flex", fontSize: 20 }, children: ne.createElement(_n[n.category], { size: 20 }) }),
1320
+ /* @__PURE__ */ i("div", { style: { flex: 1, minWidth: 0 }, children: [
1321
+ /* @__PURE__ */ e("div", { style: { fontWeight: 600 }, children: n.name }),
1322
+ n.description && /* @__PURE__ */ e(
1383
1323
  "div",
1384
1324
  {
1385
1325
  style: {
1386
- height: "100%",
1387
- width: l,
1388
- background: "#1976d2",
1326
+ fontSize: 13,
1327
+ color: "var(--text-secondary, #64748b)",
1328
+ overflow: "hidden",
1329
+ textOverflow: "ellipsis",
1330
+ whiteSpace: "nowrap"
1331
+ },
1332
+ children: n.description
1333
+ }
1334
+ ),
1335
+ g && /* @__PURE__ */ e(
1336
+ "div",
1337
+ {
1338
+ style: {
1339
+ marginTop: 4,
1340
+ height: 6,
1389
1341
  borderRadius: 3,
1390
- transition: "width 0.3s"
1391
- }
1342
+ background: "var(--bg-tertiary, #e2e8f0)",
1343
+ overflow: "hidden"
1344
+ },
1345
+ children: /* @__PURE__ */ e(
1346
+ "div",
1347
+ {
1348
+ style: {
1349
+ height: "100%",
1350
+ width: s,
1351
+ background: "var(--color-primary, #6366f1)",
1352
+ borderRadius: 3,
1353
+ transition: "width 0.3s"
1354
+ }
1355
+ }
1356
+ )
1392
1357
  }
1393
1358
  )
1394
- }
1395
- )
1396
- ] }),
1397
- N && /* @__PURE__ */ e("span", { style: { fontWeight: 600, fontSize: 16, minWidth: 40, textAlign: "right" }, children: h }),
1398
- !g && /* @__PURE__ */ e(
1399
- "button",
1400
- {
1401
- onClick: (o) => {
1402
- o.stopPropagation(), p(n.id);
1403
- },
1404
- style: {
1405
- padding: "4px 12px",
1406
- borderRadius: 4,
1407
- border: "none",
1408
- background: i ? "#f44336" : "#1976d2",
1409
- color: "#fff",
1410
- cursor: "pointer",
1411
- fontSize: 13
1412
- },
1413
- children: i ? "Unvote" : "Vote"
1414
- }
1415
- )
1416
- ]
1417
- },
1418
- n.id
1419
- );
1420
- }) }),
1421
- N && /* @__PURE__ */ t("div", { style: { marginTop: 12, textAlign: "right", fontSize: 13, color: "#666" }, children: [
1422
- "Total votes: ",
1423
- a.reduce((n, d) => n + (d.votes ?? 0), 0)
1424
- ] })
1425
- ] });
1359
+ ] }),
1360
+ g && /* @__PURE__ */ e("span", { style: { fontWeight: 600, fontSize: 16, minWidth: 40, textAlign: "right" }, children: w }),
1361
+ !v && /* @__PURE__ */ e(
1362
+ "button",
1363
+ {
1364
+ onClick: (A) => {
1365
+ A.stopPropagation(), x(n.id);
1366
+ },
1367
+ style: {
1368
+ padding: "4px 12px",
1369
+ borderRadius: 4,
1370
+ border: "none",
1371
+ background: a ? "var(--color-error, #ef4444)" : "var(--color-primary, #6366f1)",
1372
+ color: "#fff",
1373
+ cursor: "pointer",
1374
+ fontSize: 13
1375
+ },
1376
+ children: a ? "Unvote" : "Vote"
1377
+ }
1378
+ )
1379
+ ]
1380
+ },
1381
+ n.id
1382
+ );
1383
+ }) }),
1384
+ g && /* @__PURE__ */ i(
1385
+ "div",
1386
+ {
1387
+ style: {
1388
+ marginTop: 12,
1389
+ textAlign: "right",
1390
+ fontSize: 13,
1391
+ color: "var(--text-secondary, #64748b)"
1392
+ },
1393
+ children: [
1394
+ "Total votes: ",
1395
+ t.reduce((n, c) => n + (c.votes ?? 0), 0)
1396
+ ]
1397
+ }
1398
+ )
1399
+ ]
1400
+ }
1401
+ );
1426
1402
  }
1427
1403
  );
1428
1404
  export {
1429
- Re as NiceAttractionPicker,
1430
- Pe as NiceAttractionVoting,
1431
- be as NiceEventChat,
1432
- Ce as NiceEventMedia,
1433
- ke as NiceEventParticipants,
1434
- Se as NiceEventPlanning,
1435
- Ie as NiceKaraokePicker,
1436
- xe as NiceRoundCard,
1437
- we as NiceRoundList,
1438
- Ae as NiceSongPicker
1405
+ Pn as NiceAttractionPicker,
1406
+ Rn as NiceAttractionVoting,
1407
+ wn as NiceEventMedia,
1408
+ zn as NiceEventPlanning,
1409
+ Tn as NiceKaraokePicker,
1410
+ In as NiceRoundCard,
1411
+ An as NiceRoundList,
1412
+ Ln as NiceSongPicker
1439
1413
  };