@nice2dev/events 1.0.27 → 1.0.29

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @nice2dev/events — Changelog
2
2
 
3
+ ## 1.0.29
4
+
5
+ ### Patch Changes
6
+
7
+ - Library-wide consistency pass + showcase overhaul.
8
+ - **Universal app shell:** every genuine multi-panel editor/studio/designer/builder/workspace standardized onto `NiceAppShell` (slots + `flush`), incl. `NiceTeamsWorkspace` and `NiceAPIDesigner`. No public API changes — internal layout only.
9
+ - **Icons:** foreign icons (emoji, raw unicode glyphs, inline `<svg>`, FontAwesome) replaced with `@nice2dev/icons` / `NiceIcon` built-ins across the packages; ~110 built-in icon paths added to `NiceIcon`.
10
+ - **Control sizing:** every basic control now honours the full `xs · sm · md · lg · xl` size scale with working CSS — fixed `NiceCard`, `NiceAlert`, `NiceSkeleton`, `NiceDivider`, `NiceSearchInput`, `NiceCallout`, `NiceStatistic`, `NiceSegmentedControl`, `NiceCheckbox`, `NiceParagraph`, and a `NiceSpinner` CSS-shadow regression (`md` baseline unchanged). `NiceNumericInput` gained a `size` prop.
11
+ - **NiceKioskShell:** the `style` prop now overrides the default full-screen `position: fixed` (so it can be embedded contained).
12
+ - **Input devices + spatial navigation:** `NiceGamepad` / `NiceMicrophone` / `NiceDeviceManager` / `NiceDeviceTile` and `NavShell` spatial-navigation support.
13
+ - **Audio:** AudioVerse → `@nice2dev/ui-audio` parity (15 controls; optional `recharts` visualizers).
14
+ - **Display atoms + forms:** standardized atoms (`NiceBadge`/`NiceTag`/`NiceAvatarGroup`/`NiceProgress`/…), removed the deprecated `NiceStatusBadge` (migrated to `NiceBadge` variants), entity validation builder, selectable `NiceCard`.
15
+ - **Editors inside satellites** (`ui-ai`/`ui-api`/`ui-bi`/`ui-math`/`ui-video`/`ui-audio`/`events`) now declare `@nice2dev/ui` (and where used `@nice2dev/icons` / `@nice2dev/ui-core`) as peer dependencies.
16
+
3
17
  ## [0.2.0] — 2026-03-25
4
18
 
5
19
  ### Added (FAZA 7.6)
@@ -30,6 +44,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
30
44
  ## [0.1.0] — 2025-06-01
31
45
 
32
46
  ### Added
47
+
33
48
  - Shared event model types (Event, Participant, Round, Attraction, etc.)
34
49
  - EventService interface for API abstraction
35
50
  - `NiceEventChat` — real-time event chat with reactions and message types
package/README.md CHANGED
@@ -18,18 +18,16 @@ npm install @nice2dev/events
18
18
 
19
19
  ## Components
20
20
 
21
- | Component | Category | Description |
22
- |---|---|---|
23
- | `NiceEventChat` | Party | Real-time event chat with reactions and message types |
24
- | `NiceEventParticipants` | Party | Participant list with roles, status, and QR codes |
25
- | `NiceEventMedia` | Content | Media gallery with upload, photos, and collages |
26
- | `NiceEventPlanning` | Planning | Event planning with dates, location, surveys, billing |
27
- | `NiceRoundList` | Rounds | Round system list with status and scoring |
28
- | `NiceRoundCard` | Rounds | Individual round card with actions, timer, scoreboard |
29
- | `NiceSongPicker` | Music | Song selection for music events |
30
- | `NiceKaraokePicker` | Music | Karaoke song picker with queue management |
31
- | `NiceAttractionPicker` | Attractions | Attraction selection grid with categories |
32
- | `NiceAttractionVoting` | Attractions | Anonymous voting on attractions |
21
+ | Component | Category | Description |
22
+ | ---------------------- | ----------- | ----------------------------------------------------- |
23
+ | `NiceEventMedia` | Content | Media gallery with upload, photos, and collages |
24
+ | `NiceEventPlanning` | Planning | Event planning with dates, location, surveys, billing |
25
+ | `NiceRoundList` | Rounds | Round system list with status and scoring |
26
+ | `NiceRoundCard` | Rounds | Individual round card with actions, timer, scoreboard |
27
+ | `NiceSongPicker` | Music | Song selection for music events |
28
+ | `NiceKaraokePicker` | Music | Karaoke song picker with queue management |
29
+ | `NiceAttractionPicker` | Attractions | Attraction selection grid with categories |
30
+ | `NiceAttractionVoting` | Attractions | Anonymous voting on attractions |
33
31
 
34
32
  ## Types & Interfaces
35
33
 
@@ -43,14 +41,13 @@ npm install @nice2dev/events
43
41
  ## Usage
44
42
 
45
43
  ```tsx
46
- import { NiceEventChat, NiceEventPlanning, NiceRoundList } from '@nice2dev/events';
44
+ import { NiceEventPlanning, NiceRoundList } from '@nice2dev/events';
47
45
 
48
46
  function EventPage({ event }) {
49
47
  return (
50
48
  <>
51
49
  <NiceEventPlanning event={event} />
52
50
  <NiceRoundList rounds={event.rounds} />
53
- <NiceEventChat eventId={event.id} />
54
51
  </>
55
52
  );
56
53
  }
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("react"),le=i.forwardRef(function(k,C){const{messages:s,currentUserId:f,onSend:m,onReact:x,reactions:j=["👍","❤️","😂","🎉","🔥"],readOnly:v=!1,placeholder:S="Type a message…",autoScroll:_=!0,className:g,style:b}=k,[l,h]=i.useState(""),N=i.useRef(null);i.useEffect(()=>{_&&N.current&&N.current.scrollIntoView({behavior:"smooth"})},[s.length,_]);const y=i.useCallback(()=>{!l.trim()||!m||(m(l.trim(),"text"),h(""))},[l,m]),p=a=>{a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),y())};return e.jsxs("div",{ref:C,className:`nice-event-chat ${g??""}`,style:b,children:[e.jsxs("div",{className:"nice-event-chat__messages",children:[s.length===0&&e.jsx("p",{className:"nice-event-chat__empty",children:"No messages yet. Start the conversation!"}),s.map(a=>{const t=a.senderId===f;return a.type==="system"||a.type==="announcement"?e.jsxs("div",{className:`nice-event-chat__system nice-event-chat__${a.type}`,children:[e.jsx("span",{children:a.content}),e.jsx("time",{children:a.timestamp})]},a.id):e.jsxs("div",{className:`nice-event-chat__bubble ${t?"nice-event-chat__bubble--own":""}`,children:[!t&&e.jsxs("div",{className:"nice-event-chat__sender",children:[a.senderAvatarUrl&&e.jsx("img",{src:a.senderAvatarUrl,alt:"",className:"nice-event-chat__avatar"}),e.jsx("strong",{children:a.senderName})]}),a.type==="image"?e.jsx("img",{src:a.content,alt:"Shared image",className:"nice-event-chat__image"}):e.jsx("p",{className:"nice-event-chat__text",children:a.content}),e.jsxs("div",{className:"nice-event-chat__meta",children:[e.jsx("time",{children:a.timestamp}),a.reactions&&Object.keys(a.reactions).length>0&&e.jsx("span",{className:"nice-event-chat__reactions",children:Object.entries(a.reactions).map(([n,u])=>e.jsxs("button",{className:"nice-event-chat__reaction",onClick:()=>x==null?void 0:x(a.id,n),children:[n," ",u]},n))})]}),x&&!v&&e.jsx("div",{className:"nice-event-chat__react-bar",children:j.map(n=>e.jsx("button",{onClick:()=>x(a.id,n),title:n,children:n},n))})]},a.id)}),e.jsx("div",{ref:N})]}),!v&&e.jsxs("div",{className:"nice-event-chat__input-bar",children:[e.jsx("textarea",{value:l,onChange:a=>h(a.target.value),onKeyDown:p,placeholder:S,rows:1}),e.jsx("button",{onClick:y,disabled:!l.trim(),children:"Send"})]})]})}),G={invited:"#3b82f6",confirmed:"#22c55e",declined:"#ef4444","checked-in":"#8b5cf6","no-show":"#9ca3af"},H={host:"👑 Host","co-host":"🎯 Co-Host",moderator:"🛡️ Moderator",participant:"👤 Participant",spectator:"👁️ Spectator",vip:"⭐ VIP"},oe=i.forwardRef(function(k,C){const{participants:s,currentParticipantId:f,onInvite:m,onRemove:x,onRoleChange:j,onCheckIn:v,onParticipantClick:S,showQR:_=!1,editable:g=!1,maxParticipants:b,className:l,style:h}=k,[N,y]=i.useState(""),[p,a]=i.useState(""),t=i.useMemo(()=>{let u=s;if(p&&(u=u.filter(c=>c.status===p)),N.trim()){const c=N.toLowerCase();u=u.filter(o=>o.name.toLowerCase().includes(c))}return u},[s,p,N]),d=i.useMemo(()=>{const u=new Map,c=["host","co-host","moderator","vip","participant","spectator"];for(const o of c)u.set(o,[]);for(const o of t)u.has(o.role)||u.set(o.role,[]),u.get(o.role).push(o);return Array.from(u.entries()).filter(([,o])=>o.length>0)},[t]),n=i.useMemo(()=>{const u={};for(const c of s)u[c.status]=(u[c.status]??0)+1;return u},[s]);return e.jsxs("div",{ref:C,className:`nice-event-participants ${l??""}`,style:h,children:[e.jsxs("div",{className:"nice-event-participants__header",children:[e.jsxs("h3",{children:["Participants (",s.length,b?` / ${b}`:"",")"]}),g&&m&&e.jsx("button",{onClick:m,disabled:b?s.length>=b:!1,children:"+ Invite"})]}),e.jsx("div",{className:"nice-event-participants__summary",children:Object.entries(n).map(([u,c])=>e.jsxs("span",{className:"nice-event-participants__stat",children:[e.jsx("span",{className:"nice-event-participants__dot",style:{backgroundColor:G[u]}}),u,": ",c]},u))}),e.jsxs("div",{className:"nice-event-participants__toolbar",children:[e.jsx("input",{type:"text",value:N,onChange:u=>y(u.target.value),placeholder:"Search…"}),e.jsxs("select",{value:p,onChange:u=>a(u.target.value),children:[e.jsx("option",{value:"",children:"All"}),e.jsx("option",{value:"invited",children:"Invited"}),e.jsx("option",{value:"confirmed",children:"Confirmed"}),e.jsx("option",{value:"declined",children:"Declined"}),e.jsx("option",{value:"checked-in",children:"Checked In"}),e.jsx("option",{value:"no-show",children:"No Show"})]})]}),d.map(([u,c])=>e.jsxs("div",{className:"nice-event-participants__group",children:[e.jsxs("h4",{className:"nice-event-participants__role-label",children:[H[u]," (",c.length,")"]}),c.map(o=>e.jsxs("div",{className:`nice-event-participants__item ${o.id===f?"nice-event-participants__item--self":""}`,onClick:()=>S==null?void 0:S(o),children:[o.avatarUrl?e.jsx("img",{src:o.avatarUrl,alt:"",className:"nice-event-participants__avatar"}):e.jsx("span",{className:"nice-event-participants__avatar-placeholder",children:o.name.charAt(0)}),e.jsxs("div",{className:"nice-event-participants__info",children:[e.jsx("span",{className:"nice-event-participants__name",children:o.name}),e.jsx("span",{className:"nice-event-participants__status",style:{color:G[o.status]},children:o.status}),o.score!=null&&e.jsxs("span",{className:"nice-event-participants__score",children:["Score: ",o.score]})]}),_&&o.qrCode&&e.jsx("span",{className:"nice-event-participants__qr",title:"QR Code",children:"📱"}),g&&e.jsxs("div",{className:"nice-event-participants__actions",children:[j&&e.jsx("select",{value:o.role,onChange:w=>j(o.id,w.target.value),onClick:w=>w.stopPropagation(),children:Object.entries(H).map(([w,R])=>e.jsx("option",{value:w,children:R},w))}),v&&o.status==="confirmed"&&e.jsx("button",{onClick:w=>{w.stopPropagation(),v(o.id)},children:"Check In"}),x&&o.role!=="host"&&e.jsx("button",{onClick:w=>{w.stopPropagation(),x(o.id)},children:"Remove"})]})]},o.id))]},u))]})}),de=i.forwardRef(function(k,C){const{items:s,onUpload:f,onDelete:m,onLike:x,onItemClick:j,layout:v="grid",uploadEnabled:S=!0,typeFilter:_="all",className:g,style:b}=k,[l,h]=i.useState(""),N=i.useMemo(()=>_==="all"?s:s.filter(p=>p.type===_),[s,_]),y=p=>{var t;const a=(t=p.target.files)==null?void 0:t[0];!a||!f||(f(a,l.trim()||void 0),h(""),p.target.value="")};return e.jsxs("div",{ref:C,className:`nice-event-media nice-event-media--${v} ${g??""}`,style:b,children:[e.jsx("div",{className:"nice-event-media__header",children:e.jsxs("h3",{children:["Media (",N.length,")"]})}),S&&f&&e.jsxs("div",{className:"nice-event-media__upload",children:[e.jsx("input",{type:"file",accept:"image/*,video/*",onChange:y}),e.jsx("input",{type:"text",value:l,onChange:p=>h(p.target.value),placeholder:"Add a caption…",className:"nice-event-media__caption-input"})]}),N.length===0?e.jsx("p",{className:"nice-event-media__empty",children:"No media yet."}):e.jsx("div",{className:`nice-event-media__gallery nice-event-media__gallery--${v}`,children:N.map(p=>e.jsxs("div",{className:"nice-event-media__item",onClick:()=>j==null?void 0:j(p),role:j?"button":void 0,children:[p.type==="photo"?e.jsx("img",{src:p.thumbnailUrl??p.url,alt:p.caption??"",className:"nice-event-media__thumb"}):e.jsx("div",{className:"nice-event-media__video-thumb",children:e.jsx("span",{children:"▶"})}),e.jsxs("div",{className:"nice-event-media__overlay",children:[p.caption&&e.jsx("span",{className:"nice-event-media__item-caption",children:p.caption}),e.jsx("span",{className:"nice-event-media__uploader",children:p.uploadedByName}),e.jsxs("div",{className:"nice-event-media__item-actions",children:[x&&e.jsxs("button",{onClick:a=>{a.stopPropagation(),x(p.id)},children:["❤️ ",p.likes??0]}),m&&e.jsx("button",{onClick:a=>{a.stopPropagation(),m(p.id)},children:"🗑️"})]})]})]},p.id))})]})}),ue=i.forwardRef(function(k,C){var q,F,Q,W,K;const{event:s,surveys:f=[],billing:m=[],onUpdateEvent:x,onUpdateLocation:j,onAddSurvey:v,onSurveyRespond:S,onAddBilling:_,editable:g=!1,className:b,style:l}=k,[h,N]=i.useState("details"),[y,p]=i.useState(s.title),[a,t]=i.useState(s.description??""),[d,n]=i.useState(s.startDate??""),[u,c]=i.useState(s.endDate??""),[o,w]=i.useState(((q=s.location)==null?void 0:q.name)??""),[R,J]=i.useState(((F=s.location)==null?void 0:F.address)??""),[O,X]=i.useState(((Q=s.location)==null?void 0:Q.virtualUrl)??""),[I,Z]=i.useState(((W=s.location)==null?void 0:W.isVirtual)??!1),[L,V]=i.useState(""),[M,ee]=i.useState("single"),[$,z]=i.useState(""),[E,D]=i.useState(""),[B,U]=i.useState(""),[T,te]=i.useState("PLN"),ne=i.useCallback(()=>{x==null||x({title:y,description:a||void 0,startDate:d||void 0,endDate:u||void 0})},[y,a,d,u,x]),se=i.useCallback(()=>{j==null||j({name:o,address:R||void 0,virtualUrl:O||void 0,isVirtual:I})},[o,R,O,I,j]),ie=i.useCallback(()=>{if(!L.trim()||!v)return;const r=$.split(",").map(P=>P.trim()).filter(Boolean);v(L.trim(),M,r.length>0?r:void 0),V(""),z("")},[L,M,$,v]),ae=i.useCallback(()=>{!E.trim()||!_||(_({label:E.trim(),amount:parseFloat(B)||0,currency:T}),D(""),U(""))},[E,B,T,_]),ce=m.reduce((r,P)=>r+P.amount,0);return e.jsxs("div",{ref:C,className:`nice-event-planning ${b??""}`,style:l,children:[e.jsx("div",{className:"nice-event-planning__tabs",children:["details","location","surveys","billing"].map(r=>e.jsx("button",{className:`nice-event-planning__tab ${h===r?"nice-event-planning__tab--active":""}`,onClick:()=>N(r),children:r.charAt(0).toUpperCase()+r.slice(1)},r))}),h==="details"&&e.jsxs("div",{className:"nice-event-planning__section",children:[e.jsxs("label",{children:["Title",e.jsx("input",{type:"text",value:y,onChange:r=>p(r.target.value),readOnly:!g})]}),e.jsxs("label",{children:["Description",e.jsx("textarea",{value:a,onChange:r=>t(r.target.value),readOnly:!g,rows:3})]}),e.jsxs("label",{children:["Start",e.jsx("input",{type:"datetime-local",value:d,onChange:r=>n(r.target.value),readOnly:!g})]}),e.jsxs("label",{children:["End",e.jsx("input",{type:"datetime-local",value:u,onChange:r=>c(r.target.value),readOnly:!g})]}),e.jsxs("div",{className:"nice-event-planning__status",children:["Status: ",e.jsx("strong",{children:s.status})]}),g&&e.jsx("button",{onClick:ne,children:"Save Details"})]}),h==="location"&&e.jsxs("div",{className:"nice-event-planning__section",children:[e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:I,onChange:r=>Z(r.target.checked),disabled:!g})," ","Virtual event"]}),e.jsxs("label",{children:["Venue Name",e.jsx("input",{type:"text",value:o,onChange:r=>w(r.target.value),readOnly:!g})]}),!I&&e.jsxs("label",{children:["Address",e.jsx("input",{type:"text",value:R,onChange:r=>J(r.target.value),readOnly:!g})]}),I&&e.jsxs("label",{children:["Virtual URL",e.jsx("input",{type:"url",value:O,onChange:r=>X(r.target.value),readOnly:!g})]}),g&&e.jsx("button",{onClick:se,children:"Save Location"})]}),h==="surveys"&&e.jsxs("div",{className:"nice-event-planning__section",children:[f.length===0?e.jsx("p",{children:"No surveys yet."}):f.map(r=>e.jsxs("div",{className:"nice-event-planning__survey",children:[e.jsx("strong",{children:r.question}),e.jsxs("span",{className:"nice-event-planning__survey-type",children:["(",r.type,")"]}),r.options&&e.jsx("div",{className:"nice-event-planning__survey-options",children:r.options.map((P,re)=>e.jsx("button",{onClick:()=>S==null?void 0:S(r.id,P),children:P},re))}),r.responses&&e.jsxs("span",{children:[r.responses.length," responses"]})]},r.id)),g&&v&&e.jsxs("div",{className:"nice-event-planning__add-survey",children:[e.jsx("h4",{children:"Add Survey"}),e.jsx("input",{type:"text",value:L,onChange:r=>V(r.target.value),placeholder:"Question"}),e.jsxs("select",{value:M,onChange:r=>ee(r.target.value),children:[e.jsx("option",{value:"single",children:"Single choice"}),e.jsx("option",{value:"multiple",children:"Multiple choice"}),e.jsx("option",{value:"text",children:"Free text"}),e.jsx("option",{value:"rating",children:"Rating"})]}),e.jsx("input",{type:"text",value:$,onChange:r=>z(r.target.value),placeholder:"Options (comma-separated)"}),e.jsx("button",{onClick:ie,disabled:!L.trim(),children:"Add"})]})]}),h==="billing"&&e.jsxs("div",{className:"nice-event-planning__section",children:[m.length===0?e.jsx("p",{children:"No billing items yet."}):e.jsxs(e.Fragment,{children:[e.jsxs("table",{className:"nice-event-planning__billing-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Item"}),e.jsx("th",{children:"Amount"}),e.jsx("th",{children:"Paid by"}),e.jsx("th",{children:"Status"})]})}),e.jsx("tbody",{children:m.map(r=>e.jsxs("tr",{children:[e.jsx("td",{children:r.label}),e.jsxs("td",{children:[r.amount.toFixed(2)," ",r.currency]}),e.jsx("td",{children:r.paidByName??"—"}),e.jsx("td",{children:r.isPaid?"✅ Paid":"⏳ Pending"})]},r.id))})]}),e.jsxs("div",{className:"nice-event-planning__billing-total",children:["Total:"," ",e.jsxs("strong",{children:[ce.toFixed(2)," ",((K=m[0])==null?void 0:K.currency)??""]})]})]}),g&&_&&e.jsxs("div",{className:"nice-event-planning__add-billing",children:[e.jsx("input",{type:"text",value:E,onChange:r=>D(r.target.value),placeholder:"Item"}),e.jsx("input",{type:"number",value:B,onChange:r=>U(r.target.value),placeholder:"Amount",min:0,step:.01}),e.jsxs("select",{value:T,onChange:r=>te(r.target.value),children:[e.jsx("option",{value:"PLN",children:"PLN"}),e.jsx("option",{value:"EUR",children:"EUR"}),e.jsx("option",{value:"USD",children:"USD"}),e.jsx("option",{value:"GBP",children:"GBP"})]}),e.jsx("button",{onClick:ae,disabled:!E.trim(),children:"Add"})]})]})]})}),he={upcoming:"⏳",active:"▶️",voting:"🗳️",scored:"📊",completed:"✅",skipped:"⏭️"},pe={upcoming:"#9ca3af",active:"#22c55e",voting:"#eab308",scored:"#3b82f6",completed:"#6b7280",skipped:"#d1d5db"},me=i.forwardRef(function(k,C){const{rounds:s,activeRoundId:f,onSelect:m,onStart:x,onEnd:j,onCreate:v,editable:S=!1,className:_,style:g}=k,b=[...s].sort((l,h)=>l.order-h.order);return e.jsxs("div",{ref:C,className:`nice-round-list ${_??""}`,style:g,children:[e.jsxs("div",{className:"nice-round-list__header",children:[e.jsxs("h3",{children:["Rounds (",s.length,")"]}),S&&v&&e.jsx("button",{onClick:v,children:"+ Add Round"})]}),b.length===0?e.jsx("p",{className:"nice-round-list__empty",children:"No rounds yet."}):e.jsx("div",{className:"nice-round-list__items",children:b.map(l=>{const h=l.id===f;return e.jsxs("div",{className:`nice-round-list__item ${h?"nice-round-list__item--active":""}`,onClick:()=>m==null?void 0:m(l),role:m?"button":void 0,tabIndex:m?0:void 0,children:[e.jsxs("span",{className:"nice-round-list__order",children:["#",l.order]}),e.jsx("span",{className:"nice-round-list__icon",children:he[l.status]}),e.jsxs("div",{className:"nice-round-list__info",children:[e.jsx("strong",{className:"nice-round-list__name",children:l.name}),l.description&&e.jsx("small",{children:l.description}),l.type&&e.jsx("span",{className:"nice-round-list__type",children:l.type})]}),e.jsx("span",{className:"nice-round-list__status",style:{color:pe[l.status]},children:l.status}),l.durationMinutes&&e.jsxs("span",{className:"nice-round-list__duration",children:[l.durationMinutes,"m"]}),l.winnerIds&&l.winnerIds.length>0&&e.jsxs("span",{className:"nice-round-list__winners",children:["🏆 ",l.winnerIds.length]}),S&&e.jsxs("div",{className:"nice-round-list__actions",onClick:N=>N.stopPropagation(),children:[l.status==="upcoming"&&x&&e.jsx("button",{onClick:()=>x(l.id),children:"Start"}),(l.status==="active"||l.status==="voting")&&j&&e.jsx("button",{onClick:()=>j(l.id),children:"End"})]})]},l.id)})})]})}),xe=i.forwardRef(function(k,C){const{round:s,timerRunning:f=!1,remainingSeconds:m,onSubmitScore:x,onStart:j,onEnd:v,onSkip:S,editable:_=!1,footerActions:g,className:b,style:l}=k,[h,N]=i.useState({}),y=i.useCallback(t=>{const d=parseFloat(h[t]??"");isNaN(d)||!x||(x(t,d),N(n=>({...n,[t]:""})))},[h,x]),p=t=>{const d=Math.floor(t/60),n=t%60;return`${d}:${n.toString().padStart(2,"0")}`},a=s.scores?[...s.scores].sort((t,d)=>d.score-t.score):[];return e.jsxs("div",{ref:C,className:`nice-round-card nice-round-card--${s.status} ${b??""}`,style:l,children:[e.jsxs("div",{className:"nice-round-card__header",children:[e.jsxs("span",{className:"nice-round-card__order",children:["Round #",s.order]}),e.jsx("h3",{className:"nice-round-card__name",children:s.name}),e.jsx("span",{className:"nice-round-card__status",children:s.status})]}),s.description&&e.jsx("p",{className:"nice-round-card__description",children:s.description}),(f||m!=null)&&e.jsxs("div",{className:`nice-round-card__timer ${f?"nice-round-card__timer--running":""}`,children:["⏱️ ",m!=null?p(m):"—"]}),a.length>0&&e.jsxs("div",{className:"nice-round-card__scoreboard",children:[e.jsx("h4",{children:"Scoreboard"}),e.jsxs("table",{className:"nice-round-card__scores-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Rank"}),e.jsx("th",{children:"Participant"}),e.jsx("th",{children:"Score"})]})}),e.jsx("tbody",{children:a.map((t,d)=>e.jsxs("tr",{className:d<3?`nice-round-card__top-${d+1}`:"",children:[e.jsxs("td",{children:[t.rank??d+1,d===0?" 🥇":d===1?" 🥈":d===2?" 🥉":""]}),e.jsx("td",{children:t.participantName}),e.jsx("td",{children:t.score})]},t.participantId))})]})]}),x&&(s.status==="active"||s.status==="voting")&&a.length>0&&e.jsxs("div",{className:"nice-round-card__score-input",children:[e.jsx("h4",{children:"Submit Scores"}),a.map(t=>e.jsxs("div",{className:"nice-round-card__score-row",children:[e.jsx("span",{children:t.participantName}),e.jsx("input",{type:"number",value:h[t.participantId]??"",onChange:d=>N(n=>({...n,[t.participantId]:d.target.value})),min:0,step:1,placeholder:"Score"}),e.jsx("button",{onClick:()=>y(t.participantId),children:"Submit"})]},t.participantId))]}),e.jsxs("div",{className:"nice-round-card__footer",children:[_&&e.jsxs("div",{className:"nice-round-card__actions",children:[s.status==="upcoming"&&j&&e.jsx("button",{onClick:j,children:"▶ Start Round"}),(s.status==="active"||s.status==="voting")&&v&&e.jsx("button",{onClick:v,children:"⏹ End Round"}),s.status==="upcoming"&&S&&e.jsx("button",{onClick:S,children:"⏭ Skip"})]}),g]}),s.winnerIds&&s.winnerIds.length>0&&e.jsxs("div",{className:"nice-round-card__winners",children:["🏆 Winners: ",s.winnerIds.length]})]})}),ve=i.forwardRef(function(k,C){const{songs:s,onAdd:f,onRemove:m,onVote:x,onSearch:j,showQueue:v=!0,readOnly:S=!1,className:_,style:g}=k,[b,l]=i.useState(""),h=i.useMemo(()=>{if(!b.trim())return s;const t=b.toLowerCase();return s.filter(d=>d.title.toLowerCase().includes(t)||d.artist.toLowerCase().includes(t))},[s,b]),N=i.useMemo(()=>s.filter(t=>t.isQueued),[s]),y=s.find(t=>t.isPlaying),p=t=>{l(t),j==null||j(t)},a=t=>{if(!t)return"";const d=Math.floor(t/60),n=t%60;return`${d}:${n.toString().padStart(2,"0")}`};return e.jsxs("div",{ref:C,className:`nice-song-picker ${_??""}`,style:g,children:[y&&e.jsxs("div",{className:"nice-song-picker__now-playing",children:[e.jsx("span",{className:"nice-song-picker__np-label",children:"🎵 Now Playing"}),y.albumArt&&e.jsx("img",{src:y.albumArt,alt:"",className:"nice-song-picker__album-art"}),e.jsx("strong",{children:y.title}),e.jsx("span",{children:y.artist})]}),e.jsx("input",{type:"text",value:b,onChange:t=>p(t.target.value),placeholder:"Search songs…",className:"nice-song-picker__search"}),e.jsx("div",{className:"nice-song-picker__list",children:h.length===0?e.jsx("p",{className:"nice-song-picker__empty",children:"No songs found."}):h.map(t=>e.jsxs("div",{className:`nice-song-picker__item ${t.isPlaying?"nice-song-picker__item--playing":""}`,children:[t.albumArt&&e.jsx("img",{src:t.albumArt,alt:"",className:"nice-song-picker__thumb"}),e.jsxs("div",{className:"nice-song-picker__info",children:[e.jsx("strong",{children:t.title}),e.jsx("span",{children:t.artist}),t.duration&&e.jsx("span",{className:"nice-song-picker__duration",children:a(t.duration)}),t.addedByName&&e.jsxs("small",{children:["Added by ",t.addedByName]})]}),!S&&e.jsxs("div",{className:"nice-song-picker__actions",children:[x&&e.jsxs("button",{onClick:()=>x(t.id),children:["👍 ",t.votes??0]}),f&&!t.isQueued&&e.jsx("button",{onClick:()=>f(t.id),children:"+ Queue"}),m&&t.isQueued&&e.jsx("button",{onClick:()=>m(t.id),children:"Remove"})]})]},t.id))}),v&&N.length>0&&e.jsxs("div",{className:"nice-song-picker__queue",children:[e.jsxs("h4",{children:["Queue (",N.length,")"]}),N.map((t,d)=>e.jsxs("div",{className:"nice-song-picker__queue-item",children:[e.jsxs("span",{className:"nice-song-picker__queue-pos",children:[d+1,"."]}),e.jsxs("span",{children:[t.title," — ",t.artist]})]},t.id))]})]})}),je=i.forwardRef(function(k,C){const{songs:s,queue:f=[],onEnqueue:m,onDequeue:x,onNext:j,nowPlayingId:v,readOnly:S=!1,className:_,style:g}=k,[b,l]=i.useState(""),[h,N]=i.useState(""),y=s.find(n=>n.id===v),p=i.useMemo(()=>{let n=s;if(b.trim()){const u=b.toLowerCase();n=n.filter(c=>c.title.toLowerCase().includes(u)||c.artist.toLowerCase().includes(u))}return h&&(n=n.filter(u=>u.difficulty===h)),n},[s,b,h]),a=i.useMemo(()=>new Set(f.map(n=>n.id)),[f]),t=["easy","medium","hard","expert"],d=n=>{switch(n){case"easy":return"#4caf50";case"medium":return"#ff9800";case"hard":return"#f44336";case"expert":return"#9c27b0";default:return"#999"}};return e.jsxs("div",{ref:C,className:`nice-karaoke-picker ${_??""}`,style:g,children:[y&&e.jsxs("div",{className:"nice-karaoke-picker__now-singing",style:{borderLeft:"4px solid #e91e63",padding:"12px",marginBottom:12,background:"#fce4ec"},children:[e.jsx("span",{style:{fontWeight:600},children:"🎤 Now Singing"}),e.jsxs("div",{children:[e.jsx("strong",{children:y.title})," — ",y.artist,y.performerName&&e.jsxs("span",{children:[" (by ",y.performerName,")"]})]}),!S&&j&&e.jsx("button",{onClick:j,style:{marginTop:8},children:"Skip / Next ⏭"})]}),e.jsxs("div",{className:"nice-karaoke-picker__filters",style:{display:"flex",gap:8,marginBottom:12},children:[e.jsx("input",{type:"text",value:b,onChange:n=>l(n.target.value),placeholder:"Search songs or artists…",style:{flex:1}}),e.jsxs("select",{value:h,onChange:n=>N(n.target.value),children:[e.jsx("option",{value:"",children:"All Difficulties"}),t.map(n=>e.jsx("option",{value:n,children:n},n))]})]}),e.jsx("div",{className:"nice-karaoke-picker__catalog",children:p.length===0?e.jsx("p",{children:"No songs match your search."}):p.map(n=>e.jsxs("div",{className:"nice-karaoke-picker__song",style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 0",borderBottom:"1px solid #eee"},children:[e.jsxs("div",{children:[e.jsx("strong",{children:n.title})," — ",n.artist,n.difficulty&&e.jsxs("span",{style:{marginLeft:8,fontSize:12,color:d(n.difficulty),fontWeight:600},children:["[",n.difficulty,"]"]}),n.hasLyrics&&e.jsx("span",{style:{marginLeft:6,fontSize:12},title:"Lyrics available",children:"📝"}),n.language&&e.jsxs("span",{style:{marginLeft:6,fontSize:12,color:"#666"},children:["(",n.language,")"]})]}),!S&&e.jsx("div",{children:a.has(n.id)?e.jsx("button",{onClick:()=>x==null?void 0:x(n.id),style:{color:"#f44336"},children:"Remove"}):e.jsx("button",{onClick:()=>m==null?void 0:m(n.id),children:"🎤 Sing"})})]},n.id))}),f.length>0&&e.jsxs("div",{className:"nice-karaoke-picker__queue",style:{marginTop:16},children:[e.jsxs("h4",{children:["🎶 Queue (",f.length,")"]}),f.map((n,u)=>e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",padding:"4px 0"},children:[e.jsxs("span",{children:[e.jsxs("strong",{children:[u+1,"."]})," ",n.title," — ",n.artist,n.performerName&&e.jsxs("em",{children:[" (",n.performerName,")"]})]}),!S&&x&&e.jsx("button",{onClick:()=>x(n.id),style:{fontSize:12},children:"✕"})]},n.id))]})]})}),Y={game:"🎮",music:"🎵",dance:"💃",quiz:"❓",karaoke:"🎤",photo:"📸",custom:"✨"},ge={game:"Games",music:"Music",dance:"Dance",quiz:"Quiz",karaoke:"Karaoke",photo:"Photo",custom:"Custom"},fe=i.forwardRef(function(k,C){const{attractions:s,onSelect:f,onDeselect:m,onVote:x,selectedIds:j=[],maxSelections:v,showVotes:S=!0,readOnly:_=!1,layout:g="grid",className:b,style:l}=k,[h,N]=i.useState(""),[y,p]=i.useState(""),a=i.useMemo(()=>new Set(j),[j]),t=i.useMemo(()=>{const c=new Set(s.map(o=>o.category));return Array.from(c)},[s]),d=i.useMemo(()=>{let c=s;if(h&&(c=c.filter(o=>o.category===h)),y.trim()){const o=y.toLowerCase();c=c.filter(w=>{var R;return w.name.toLowerCase().includes(o)||((R=w.description)==null?void 0:R.toLowerCase().includes(o))})}return c},[s,h,y]),n=!v||a.size<v,u=c=>{_||(a.has(c)?m==null||m(c):n&&(f==null||f(c)))};return e.jsxs("div",{ref:C,className:`nice-attraction-picker ${b??""}`,style:l,children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:12},children:[e.jsx("h3",{style:{margin:0},children:"Attractions"}),v&&e.jsxs("span",{style:{color:"#666",fontSize:14},children:[a.size,"/",v," selected"]})]}),e.jsxs("div",{style:{display:"flex",gap:8,marginBottom:12,flexWrap:"wrap"},children:[e.jsx("input",{type:"text",value:y,onChange:c=>p(c.target.value),placeholder:"Search attractions…",style:{flex:1,minWidth:150}}),e.jsx("button",{onClick:()=>N(""),style:{fontWeight:h?400:700},children:"All"}),t.map(c=>e.jsxs("button",{onClick:()=>N(c===h?"":c),style:{fontWeight:c===h?700:400},children:[Y[c]," ",ge[c]]},c))]}),e.jsx("div",{style:{display:g==="grid"?"grid":"flex",gridTemplateColumns:g==="grid"?"repeat(auto-fill, minmax(200px, 1fr))":void 0,gap:12,flexDirection:g==="list"?"column":void 0},children:d.length===0?e.jsx("p",{children:"No attractions found."}):d.map(c=>{const o=a.has(c.id);return e.jsxs("div",{className:"nice-attraction-picker__card",style:{border:o?"2px solid #1976d2":"1px solid #ddd",borderRadius:8,padding:12,cursor:_?"default":"pointer",background:o?"#e3f2fd":"#fff",transition:"all 0.2s"},onClick:()=>u(c.id),children:[c.imageUrl&&e.jsx("img",{src:c.imageUrl,alt:c.name,style:{width:"100%",borderRadius:6,marginBottom:8,objectFit:"cover",maxHeight:120}}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[e.jsx("span",{children:Y[c.category]}),e.jsx("strong",{children:c.name})]}),c.description&&e.jsx("p",{style:{fontSize:13,color:"#666",margin:"6px 0"},children:c.description}),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:8},children:[S&&e.jsxs("span",{style:{fontSize:13},children:["👍 ",c.votes??0]}),!_&&x&&e.jsx("button",{onClick:w=>{w.stopPropagation(),x(c.id)},style:{fontSize:12},children:"Vote"})]})]},c.id)})})]})}),_e={game:"🎮",music:"🎵",dance:"💃",quiz:"❓",karaoke:"🎤",photo:"📸",custom:"✨"},ye=i.forwardRef(function(k,C){const{attractions:s,onVote:f,onUnvote:m,votedIds:x=[],maxVotes:j,closed:v=!1,sortBy:S="votes",showResults:_=!0,className:g,style:b}=k,l=i.useMemo(()=>new Set(x),[x]),h=j?j-l.size:void 0,N=i.useMemo(()=>{const t=[...s];switch(S){case"votes":t.sort((d,n)=>(n.votes??0)-(d.votes??0));break;case"name":t.sort((d,n)=>d.name.localeCompare(n.name));break;case"category":t.sort((d,n)=>d.category.localeCompare(n.category));break}return t},[s,S]),y=i.useMemo(()=>Math.max(...s.map(t=>t.votes??0),1),[s]),p=t=>{v||(l.has(t)?m==null||m(t):(!h||h>0)&&(f==null||f(t)))},a=t=>{switch(t){case 0:return"🥇";case 1:return"🥈";case 2:return"🥉";default:return`${t+1}.`}};return e.jsxs("div",{ref:C,className:`nice-attraction-voting ${g??""}`,style:b,children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16},children:[e.jsx("h3",{style:{margin:0},children:v?"🗳️ Voting Results":"🗳️ Vote for Attractions"}),!v&&h!==void 0&&e.jsxs("span",{style:{fontSize:14,color:h>0?"#1976d2":"#f44336"},children:[h," vote",h!==1?"s":""," remaining"]})]}),v&&e.jsx("p",{style:{color:"#666",marginBottom:12},children:"Voting is closed. Final results:"}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:N.map((t,d)=>{const n=l.has(t.id),u=t.votes??0,c=_?`${Math.round(u/y*100)}%`:"0%";return e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,padding:"10px 14px",borderRadius:8,border:n?"2px solid #1976d2":"1px solid #e0e0e0",background:n?"#e3f2fd":"#fff",cursor:v?"default":"pointer",transition:"all 0.2s"},onClick:()=>p(t.id),children:[_&&e.jsx("span",{style:{fontSize:18,minWidth:32,textAlign:"center"},children:a(d)}),e.jsx("span",{style:{fontSize:20},children:_e[t.category]}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontWeight:600},children:t.name}),t.description&&e.jsx("div",{style:{fontSize:13,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.description}),_&&e.jsx("div",{style:{marginTop:4,height:6,borderRadius:3,background:"#e0e0e0",overflow:"hidden"},children:e.jsx("div",{style:{height:"100%",width:c,background:"#1976d2",borderRadius:3,transition:"width 0.3s"}})})]}),_&&e.jsx("span",{style:{fontWeight:600,fontSize:16,minWidth:40,textAlign:"right"},children:u}),!v&&e.jsx("button",{onClick:o=>{o.stopPropagation(),p(t.id)},style:{padding:"4px 12px",borderRadius:4,border:"none",background:n?"#f44336":"#1976d2",color:"#fff",cursor:"pointer",fontSize:13},children:n?"Unvote":"Vote"})]},t.id)})}),_&&e.jsxs("div",{style:{marginTop:12,textAlign:"right",fontSize:13,color:"#666"},children:["Total votes: ",s.reduce((t,d)=>t+(d.votes??0),0)]})]})});exports.NiceAttractionPicker=fe;exports.NiceAttractionVoting=ye;exports.NiceEventChat=le;exports.NiceEventMedia=de;exports.NiceEventParticipants=oe;exports.NiceEventPlanning=ue;exports.NiceKaraokePicker=je;exports.NiceRoundCard=xe;exports.NiceRoundList=me;exports.NiceSongPicker=ve;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),y=require("@nice2dev/icons"),o=require("@nice2dev/ui"),i=require("react"),A=require("@nice2dev/ui-core"),Pe=({item:w})=>{const[_,C]=i.useState(!1),t=w.thumbnailUrl??w.url;return w.type==="video"?e.jsx("div",{className:"nice-event-media__video-thumb",children:e.jsx(y.NtdPlay,{size:26})}):_||!t?e.jsx("div",{className:"nice-event-media__broken",title:"Image unavailable",children:e.jsx(y.NtdImage,{size:24})}):e.jsx("img",{src:t,alt:w.caption??"",className:"nice-event-media__thumb",loading:"lazy",onError:()=>C(!0)})},Ee=i.forwardRef(function(_,C){const{items:t,onUpload:p,onDelete:h,onLike:m,onItemClick:v,layout:j="grid",uploadEnabled:b=!0,typeFilter:N="all",className:x,style:f}=_,[r,d]=i.useState(""),k=i.useMemo(()=>N==="all"?t:t.filter(u=>u.type===N),[t,N]),g=u=>{const n=u[0];!n||!p||(p(n,r.trim()||void 0),d(""))},S=j==="list";return e.jsxs("div",{ref:C,className:`nice-event-media nice-event-media--${j} ${x??""}`,style:f,children:[e.jsx("div",{className:"nice-event-media__header",children:e.jsxs("h3",{children:["Media (",k.length,")"]})}),b&&p&&e.jsxs("div",{className:"nice-event-media__upload",children:[e.jsx(o.NiceUpload,{accept:"image/*,video/*",multiple:!1,imagePreview:!1,onFilesSelected:g}),e.jsx(o.NiceTextInput,{value:r,onChange:d,placeholder:"Add a caption…"})]}),k.length===0?e.jsx("p",{className:"nice-event-media__empty",children:"No media yet."}):e.jsx(o.NiceCardGroup,{columns:S?1:void 0,minColumnWidth:200,gap:12,align:"stretch",children:k.map(u=>e.jsxs("div",{className:`nice-event-media__card${S?" nice-event-media__card--row":""}`,onClick:()=>v==null?void 0:v(u),role:v?"button":void 0,tabIndex:v?0:void 0,children:[e.jsx(Pe,{item:u}),e.jsxs("div",{className:"nice-event-media__body",children:[u.caption&&e.jsx("span",{className:"nice-event-media__caption",children:u.caption}),u.uploadedByName&&e.jsx("span",{className:"nice-event-media__uploader",children:u.uploadedByName}),e.jsxs("div",{className:"nice-event-media__actions",children:[m&&e.jsxs("button",{type:"button",className:"nice-event-media__action",onClick:n=>{n.stopPropagation(),m(u.id)},"aria-label":"Like",children:[e.jsx(y.NtdHeart,{size:15})," ",u.likes??0]}),h&&e.jsx("button",{type:"button",className:"nice-event-media__action nice-event-media__action--danger",onClick:n=>{n.stopPropagation(),h(u.id)},"aria-label":"Delete",children:e.jsx(y.NtdTrash,{size:15})})]})]})]},u.id))})]})});function Q(w){const _=w.toLowerCase();return["active","live","published","completed","confirmed"].includes(_)?"success":["cancelled","canceled","rejected","failed"].includes(_)?"error":["scheduled","pending","planning"].includes(_)?"info":["draft","archived"].includes(_)?"secondary":"warning"}const $e={micro:[],compact:["details","location","budget"],normal:["details","location","participants","surveys","budget"],full:["details","location","participants","surveys","budget","settings"]},Oe=i.forwardRef(function(_,C){var X,Z,ee,ne,te,se;const{event:t,participants:p=[],surveys:h=[],billing:m=[],displayMode:v="normal",tabs:j,activeTab:b,onTabChange:N,editable:x=!1,onSave:f,onPublish:r,onShare:d,onExport:k,onUpdateEvent:g,onUpdateLocation:S,onAddSurvey:u,onSurveyRespond:n,onAddBilling:l,className:s,style:I}=_,[c,z]=i.useState(t.title),[T,M]=i.useState(t.description??""),[E,ae]=i.useState(t.startDate??""),[$,ce]=i.useState(t.endDate??""),[O,re]=i.useState(((X=t.location)==null?void 0:X.name)??""),[V,le]=i.useState(((Z=t.location)==null?void 0:Z.address)??""),[D,oe]=i.useState(((ee=t.location)==null?void 0:ee.virtualUrl)??""),[P,de]=i.useState(((ne=t.location)==null?void 0:ne.isVirtual)??!1),[B,G]=i.useState(""),[q,ue]=i.useState("single"),[U,H]=i.useState(""),[L,K]=i.useState(""),[W,Y]=i.useState(""),[F,me]=i.useState("PLN"),J=j??$e[v],[pe,he]=i.useState(J[0]??"details"),xe=b??pe,ve=i.useCallback(a=>{const R=a;b===void 0&&he(R),N==null||N(R)},[b,N]),ge=i.useCallback(()=>{g==null||g({title:c,description:T||void 0,startDate:E||void 0,endDate:$||void 0})},[c,T,E,$,g]),je=i.useCallback(()=>{S==null||S({name:O,address:V||void 0,virtualUrl:D||void 0,isVirtual:P})},[O,V,D,P,S]),Ne=i.useCallback(()=>{if(!B.trim()||!u)return;const a=U.split(",").map(R=>R.trim()).filter(Boolean);u(B.trim(),q,a.length>0?a:void 0),G(""),H("")},[B,q,U,u]),fe=i.useCallback(()=>{!L.trim()||!l||(l({label:L.trim(),amount:parseFloat(W)||0,currency:F}),K(""),Y(""))},[L,W,F,l]),ye=i.useMemo(()=>m.map(a=>({label:a.label,amount:a.amount})),[m]),_e=i.useMemo(()=>m.reduce((a,R)=>a+R.amount,0),[m]),be=((te=m[0])==null?void 0:te.currency)??"PLN",ke=e.jsxs("div",{className:"nice-event-planning__form",children:[e.jsx(o.NiceTextInput,{label:"Title",value:c,onChange:z,readOnly:!x}),e.jsx(o.NiceTextArea,{label:"Description",value:T,onChange:M,readOnly:!x,rows:3}),e.jsxs("div",{className:"nice-event-planning__row",children:[e.jsxs("label",{className:"nice-field",children:[e.jsx("span",{className:"nice-field__label",children:"Start"}),e.jsx("input",{className:"nice-input",type:"datetime-local",value:E,onChange:a=>ae(a.target.value),readOnly:!x})]}),e.jsxs("label",{className:"nice-field",children:[e.jsx("span",{className:"nice-field__label",children:"End"}),e.jsx("input",{className:"nice-input",type:"datetime-local",value:$,onChange:a=>ce(a.target.value),readOnly:!x})]})]}),x&&e.jsx(o.NiceButton,{variant:"primary",leftIcon:e.jsx(A.NiceIcon,{name:"check",size:"sm"}),onClick:ge,children:"Save details"})]}),Se=e.jsxs("div",{className:"nice-event-planning__form",children:[e.jsx(o.NiceToggle,{label:"Virtual event",checked:P,onChange:de,disabled:!x}),e.jsx(o.NiceTextInput,{label:"Venue name",value:O,onChange:re,readOnly:!x}),P?e.jsx(o.NiceTextInput,{label:"Virtual URL",value:D,onChange:oe,readOnly:!x}):e.jsx(o.NiceTextInput,{label:"Address",value:V,onChange:le,readOnly:!x}),x&&e.jsx(o.NiceButton,{variant:"primary",leftIcon:e.jsx(A.NiceIcon,{name:"check",size:"sm"}),onClick:je,children:"Save location"})]}),Ce=e.jsx("div",{className:"nice-event-planning__participants",children:p.length===0?e.jsx("p",{className:"nice-event-planning__empty",children:"No participants yet."}):e.jsxs(e.Fragment,{children:[e.jsx(o.NiceAvatarGroup,{max:8,children:p.map(a=>e.jsx(o.NiceAvatar,{name:a.name,src:a.avatarUrl},a.id))}),e.jsx("ul",{className:"nice-event-planning__participant-list",children:p.map(a=>e.jsxs("li",{className:"nice-event-planning__participant",children:[e.jsx(o.NiceAvatar,{name:a.name,src:a.avatarUrl,size:"sm"}),e.jsx("span",{className:"nice-event-planning__participant-name",children:a.name}),e.jsx(o.NiceBadge,{size:"xs",subtle:!0,variant:Q(a.status),children:a.status})]},a.id))})]})}),we=e.jsxs("div",{className:"nice-event-planning__form",children:[h.length===0?e.jsx("p",{className:"nice-event-planning__empty",children:"No surveys yet."}):h.map(a=>e.jsxs("div",{className:"nice-event-planning__survey",children:[e.jsx("strong",{children:a.question})," ",e.jsx(o.NiceBadge,{size:"xs",outline:!0,variant:"info",children:a.type}),a.options&&e.jsx("div",{className:"nice-event-planning__survey-options",children:a.options.map((R,Me)=>e.jsx(o.NiceButton,{size:"sm",variant:"outline",onClick:()=>n==null?void 0:n(a.id,R),children:R},Me))}),a.responses&&e.jsxs("span",{className:"nice-event-planning__muted",children:[a.responses.length," responses"]})]},a.id)),x&&u&&e.jsxs("div",{className:"nice-event-planning__form",children:[e.jsx(o.NiceTextInput,{label:"New survey question",value:B,onChange:G,placeholder:"Question"}),e.jsx(o.NiceSelect,{label:"Type",value:q,onChange:a=>ue(a),options:[{value:"single",label:"Single choice"},{value:"multiple",label:"Multiple choice"},{value:"text",label:"Free text"},{value:"rating",label:"Rating"}]}),e.jsx(o.NiceTextInput,{label:"Options (comma-separated)",value:U,onChange:H,placeholder:"Yes, No, Maybe"}),e.jsx(o.NiceButton,{variant:"primary",leftIcon:e.jsx(A.NiceIcon,{name:"plus",size:"sm"}),onClick:Ne,disabled:!B.trim(),children:"Add survey"})]})]}),Ie=e.jsxs("div",{className:"nice-event-planning__form",children:[m.length===0?e.jsx("p",{className:"nice-event-planning__empty",children:"No billing items yet."}):e.jsx(o.NiceAmountBreakdown,{lines:[...ye,{label:"Total",amount:_e,isSummary:!0}],currency:be}),x&&l&&e.jsxs("div",{className:"nice-event-planning__row",children:[e.jsx(o.NiceTextInput,{label:"Item",value:L,onChange:K,placeholder:"Catering"}),e.jsx(o.NiceTextInput,{label:"Amount",value:W,onChange:Y,placeholder:"0.00"}),e.jsx(o.NiceSelect,{label:"Currency",value:F,onChange:a=>me(a),options:["PLN","EUR","USD","GBP"]}),e.jsx(o.NiceButton,{variant:"primary",leftIcon:e.jsx(A.NiceIcon,{name:"plus",size:"sm"}),onClick:fe,disabled:!L.trim(),children:"Add"})]})]}),ze=e.jsxs("div",{className:"nice-event-planning__form",children:[e.jsx(o.NiceToggle,{label:"Public event",checked:t.isPublic??!1,disabled:!x}),e.jsx(o.NiceTextInput,{label:"Max participants",value:t.maxParticipants!=null?String(t.maxParticipants):"",onChange:()=>{},readOnly:!x}),e.jsxs("div",{className:"nice-event-planning__muted",children:["Host: ",t.hostName," · Created ",new Date(t.createdAt).toLocaleDateString()]})]}),Ae={details:ke,location:Se,participants:Ce,surveys:we,budget:Ie,settings:ze},Te={details:"file",location:"home",participants:"users",surveys:"clipboard",budget:"file",settings:"settings"},Re={participants:p.length||void 0,surveys:h.length||void 0,budget:m.length||void 0},Be=J.map(a=>({id:a,label:a.charAt(0).toUpperCase()+a.slice(1),icon:e.jsx(A.NiceIcon,{name:Te[a],size:"sm"}),badge:Re[a],content:Ae[a]})),Le=e.jsxs("div",{className:"nice-event-planning__toolbar",children:[e.jsxs("div",{className:"nice-event-planning__toolbar-title",children:[e.jsx(A.NiceIcon,{name:"calendar",size:"md"}),e.jsx("span",{className:"nice-event-planning__title",children:t.title}),e.jsx(o.NiceBadge,{size:"sm",variant:Q(t.status),children:t.status})]}),e.jsx("span",{className:"nice-event-planning__toolbar-spacer"}),e.jsxs("div",{className:"nice-event-planning__toolbar-actions",children:[f&&e.jsx(o.NiceButton,{size:"sm",variant:"primary",leftIcon:e.jsx(A.NiceIcon,{name:"check",size:"sm"}),onClick:()=>f({title:c,description:T}),children:"Save"}),r&&e.jsx(o.NiceButton,{size:"sm",variant:"success",leftIcon:e.jsx(A.NiceIcon,{name:"upload",size:"sm"}),onClick:r,children:"Publish"}),d&&e.jsx(o.NiceButton,{size:"sm",variant:"ghost",leftIcon:e.jsx(A.NiceIcon,{name:"link",size:"sm"}),onClick:d,children:"Share"}),k&&e.jsx(o.NiceButton,{size:"sm",variant:"ghost",leftIcon:e.jsx(A.NiceIcon,{name:"download",size:"sm"}),onClick:k,children:"Export"})]})]});return v==="micro"?e.jsx("div",{ref:C,className:`nice-event-planning nice-event-planning--micro ${s??""}`,style:I,children:e.jsxs("div",{className:"nice-event-planning__micro",children:[e.jsx(A.NiceIcon,{name:"calendar",size:"md"}),e.jsxs("div",{className:"nice-event-planning__micro-body",children:[e.jsx("span",{className:"nice-event-planning__title",children:t.title}),e.jsxs("span",{className:"nice-event-planning__muted",children:[t.startDate?new Date(t.startDate).toLocaleString():"No date",(se=t.location)!=null&&se.name?` · ${t.location.name}`:""]})]}),e.jsx(o.NiceBadge,{size:"sm",variant:Q(t.status),children:t.status}),p.length>0&&e.jsx(o.NiceAvatarGroup,{max:4,size:"sm",children:p.map(a=>e.jsx(o.NiceAvatar,{name:a.name,src:a.avatarUrl,size:"sm"},a.id))})]})}):e.jsxs("div",{ref:C,className:`nice-event-planning nice-event-planning--${v} ${s??""}`,style:I,children:[Le,e.jsx(o.NiceTabs,{tabs:Be,activeTab:xe,onChange:ve})]})}),Ve={upcoming:"⏳",active:"▶️",voting:"🗳️",scored:"📊",completed:"✅",skipped:"⏭️"},De={upcoming:"#9ca3af",active:"#22c55e",voting:"#eab308",scored:"#3b82f6",completed:"#6b7280",skipped:"#d1d5db"},qe=i.forwardRef(function(_,C){const{rounds:t,activeRoundId:p,onSelect:h,onStart:m,onEnd:v,onCreate:j,editable:b=!1,className:N,style:x}=_,f=[...t].sort((r,d)=>r.order-d.order);return e.jsxs("div",{ref:C,className:`nice-round-list ${N??""}`,style:x,children:[e.jsxs("div",{className:"nice-round-list__header",children:[e.jsxs("h3",{children:["Rounds (",t.length,")"]}),b&&j&&e.jsx("button",{onClick:j,children:"+ Add Round"})]}),f.length===0?e.jsx("p",{className:"nice-round-list__empty",children:"No rounds yet."}):e.jsx("div",{className:"nice-round-list__items",children:f.map(r=>{const d=r.id===p;return e.jsxs("div",{className:`nice-round-list__item ${d?"nice-round-list__item--active":""}`,onClick:()=>h==null?void 0:h(r),role:h?"button":void 0,tabIndex:h?0:void 0,children:[e.jsxs("span",{className:"nice-round-list__order",children:["#",r.order]}),e.jsx("span",{className:"nice-round-list__icon",children:Ve[r.status]}),e.jsxs("div",{className:"nice-round-list__info",children:[e.jsx("strong",{className:"nice-round-list__name",children:r.name}),r.description&&e.jsx("small",{children:r.description}),r.type&&e.jsx("span",{className:"nice-round-list__type",children:r.type})]}),e.jsx("span",{className:"nice-round-list__status",style:{color:De[r.status]},children:r.status}),r.durationMinutes&&e.jsxs("span",{className:"nice-round-list__duration",children:[r.durationMinutes,"m"]}),r.winnerIds&&r.winnerIds.length>0&&e.jsxs("span",{className:"nice-round-list__winners",children:["🏆 ",r.winnerIds.length]}),b&&e.jsxs("div",{className:"nice-round-list__actions",onClick:k=>k.stopPropagation(),children:[r.status==="upcoming"&&m&&e.jsx("button",{onClick:()=>m(r.id),children:"Start"}),(r.status==="active"||r.status==="voting")&&v&&e.jsx("button",{onClick:()=>v(r.id),children:"End"})]})]},r.id)})})]})}),Ue=i.forwardRef(function(_,C){const{round:t,timerRunning:p=!1,remainingSeconds:h,onSubmitScore:m,onStart:v,onEnd:j,onSkip:b,editable:N=!1,footerActions:x,className:f,style:r}=_,[d,k]=i.useState({}),g=i.useCallback(n=>{const l=parseFloat(d[n]??"");isNaN(l)||!m||(m(n,l),k(s=>({...s,[n]:""})))},[d,m]),S=n=>{const l=Math.floor(n/60),s=n%60;return`${l}:${s.toString().padStart(2,"0")}`},u=t.scores?[...t.scores].sort((n,l)=>l.score-n.score):[];return e.jsxs("div",{ref:C,className:`nice-round-card nice-round-card--${t.status} ${f??""}`,style:r,children:[e.jsxs("div",{className:"nice-round-card__header",children:[e.jsxs("span",{className:"nice-round-card__order",children:["Round #",t.order]}),e.jsx("h3",{className:"nice-round-card__name",children:t.name}),e.jsx("span",{className:"nice-round-card__status",children:t.status})]}),t.description&&e.jsx("p",{className:"nice-round-card__description",children:t.description}),(p||h!=null)&&e.jsxs("div",{className:`nice-round-card__timer ${p?"nice-round-card__timer--running":""}`,children:["⏱️ ",h!=null?S(h):"—"]}),u.length>0&&e.jsxs("div",{className:"nice-round-card__scoreboard",children:[e.jsx("h4",{children:"Scoreboard"}),e.jsxs("table",{className:"nice-round-card__scores-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Rank"}),e.jsx("th",{children:"Participant"}),e.jsx("th",{children:"Score"})]})}),e.jsx("tbody",{children:u.map((n,l)=>e.jsxs("tr",{className:l<3?`nice-round-card__top-${l+1}`:"",children:[e.jsxs("td",{children:[n.rank??l+1,l===0?" 🥇":l===1?" 🥈":l===2?" 🥉":""]}),e.jsx("td",{children:n.participantName}),e.jsx("td",{children:n.score})]},n.participantId))})]})]}),m&&(t.status==="active"||t.status==="voting")&&u.length>0&&e.jsxs("div",{className:"nice-round-card__score-input",children:[e.jsx("h4",{children:"Submit Scores"}),u.map(n=>e.jsxs("div",{className:"nice-round-card__score-row",children:[e.jsx("span",{children:n.participantName}),e.jsx("input",{type:"number",value:d[n.participantId]??"",onChange:l=>k(s=>({...s,[n.participantId]:l.target.value})),min:0,step:1,placeholder:"Score"}),e.jsx("button",{onClick:()=>g(n.participantId),children:"Submit"})]},n.participantId))]}),e.jsxs("div",{className:"nice-round-card__footer",children:[N&&e.jsxs("div",{className:"nice-round-card__actions",children:[t.status==="upcoming"&&v&&e.jsx("button",{onClick:v,children:"▶ Start Round"}),(t.status==="active"||t.status==="voting")&&j&&e.jsx("button",{onClick:j,children:"⏹ End Round"}),t.status==="upcoming"&&b&&e.jsx("button",{onClick:b,children:"⏭ Skip"})]}),x]}),t.winnerIds&&t.winnerIds.length>0&&e.jsxs("div",{className:"nice-round-card__winners",children:["🏆 Winners: ",t.winnerIds.length]})]})}),We=i.forwardRef(function(_,C){const{songs:t,onAdd:p,onRemove:h,onVote:m,onSearch:v,showQueue:j=!0,readOnly:b=!1,className:N,style:x}=_,[f,r]=i.useState(""),d=i.useMemo(()=>{if(!f.trim())return t;const n=f.toLowerCase();return t.filter(l=>l.title.toLowerCase().includes(n)||l.artist.toLowerCase().includes(n))},[t,f]),k=i.useMemo(()=>t.filter(n=>n.isQueued),[t]),g=t.find(n=>n.isPlaying),S=n=>{r(n),v==null||v(n)},u=n=>{if(!n)return"";const l=Math.floor(n/60),s=n%60;return`${l}:${s.toString().padStart(2,"0")}`};return e.jsxs("div",{ref:C,className:`nice-song-picker ${N??""}`,style:x,children:[g&&e.jsxs("div",{className:"nice-song-picker__now-playing",children:[e.jsx("span",{className:"nice-song-picker__np-label",children:"🎵 Now Playing"}),g.albumArt&&e.jsx("img",{src:g.albumArt,alt:"",className:"nice-song-picker__album-art"}),e.jsx("strong",{children:g.title}),e.jsx("span",{children:g.artist})]}),e.jsx("input",{type:"text",value:f,onChange:n=>S(n.target.value),placeholder:"Search songs…",className:"nice-song-picker__search"}),e.jsx("div",{className:"nice-song-picker__list",children:d.length===0?e.jsx("p",{className:"nice-song-picker__empty",children:"No songs found."}):d.map(n=>e.jsxs("div",{className:`nice-song-picker__item ${n.isPlaying?"nice-song-picker__item--playing":""}`,children:[n.albumArt&&e.jsx("img",{src:n.albumArt,alt:"",className:"nice-song-picker__thumb"}),e.jsxs("div",{className:"nice-song-picker__info",children:[e.jsx("strong",{children:n.title}),e.jsx("span",{children:n.artist}),n.duration&&e.jsx("span",{className:"nice-song-picker__duration",children:u(n.duration)}),n.addedByName&&e.jsxs("small",{children:["Added by ",n.addedByName]})]}),!b&&e.jsxs("div",{className:"nice-song-picker__actions",children:[m&&e.jsxs("button",{onClick:()=>m(n.id),children:["👍 ",n.votes??0]}),p&&!n.isQueued&&e.jsx("button",{onClick:()=>p(n.id),children:"+ Queue"}),h&&n.isQueued&&e.jsx("button",{onClick:()=>h(n.id),children:"Remove"})]})]},n.id))}),j&&k.length>0&&e.jsxs("div",{className:"nice-song-picker__queue",children:[e.jsxs("h4",{children:["Queue (",k.length,")"]}),k.map((n,l)=>e.jsxs("div",{className:"nice-song-picker__queue-item",children:[e.jsxs("span",{className:"nice-song-picker__queue-pos",children:[l+1,"."]}),e.jsxs("span",{children:[n.title," — ",n.artist]})]},n.id))]})]})}),Fe=i.forwardRef(function(_,C){const{songs:t,queue:p=[],onEnqueue:h,onDequeue:m,onNext:v,nowPlayingId:j,readOnly:b=!1,className:N,style:x}=_,[f,r]=i.useState(""),[d,k]=i.useState(""),g=t.find(s=>s.id===j),S=i.useMemo(()=>{let s=t;if(f.trim()){const I=f.toLowerCase();s=s.filter(c=>c.title.toLowerCase().includes(I)||c.artist.toLowerCase().includes(I))}return d&&(s=s.filter(I=>I.difficulty===d)),s},[t,f,d]),u=i.useMemo(()=>new Set(p.map(s=>s.id)),[p]),n=["easy","medium","hard","expert"],l=s=>{switch(s){case"easy":return"#4caf50";case"medium":return"#ff9800";case"hard":return"#f44336";case"expert":return"#9c27b0";default:return"#999"}};return e.jsxs("div",{ref:C,className:`nice-karaoke-picker ${N??""}`,style:x,children:[g&&e.jsxs("div",{className:"nice-karaoke-picker__now-singing",style:{borderLeft:"4px solid #e91e63",padding:"12px",marginBottom:12,background:"#fce4ec"},children:[e.jsx("span",{style:{fontWeight:600},children:"🎤 Now Singing"}),e.jsxs("div",{children:[e.jsx("strong",{children:g.title})," — ",g.artist,g.performerName&&e.jsxs("span",{children:[" (by ",g.performerName,")"]})]}),!b&&v&&e.jsx("button",{onClick:v,style:{marginTop:8},children:"Skip / Next ⏭"})]}),e.jsxs("div",{className:"nice-karaoke-picker__filters",style:{display:"flex",gap:8,marginBottom:12},children:[e.jsx("input",{type:"text",value:f,onChange:s=>r(s.target.value),placeholder:"Search songs or artists…",style:{flex:1}}),e.jsxs("select",{value:d,onChange:s=>k(s.target.value),children:[e.jsx("option",{value:"",children:"All Difficulties"}),n.map(s=>e.jsx("option",{value:s,children:s},s))]})]}),e.jsx("div",{className:"nice-karaoke-picker__catalog",children:S.length===0?e.jsx("p",{children:"No songs match your search."}):S.map(s=>e.jsxs("div",{className:"nice-karaoke-picker__song",style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 0",borderBottom:"1px solid #eee"},children:[e.jsxs("div",{children:[e.jsx("strong",{children:s.title})," — ",s.artist,s.difficulty&&e.jsxs("span",{style:{marginLeft:8,fontSize:12,color:l(s.difficulty),fontWeight:600},children:["[",s.difficulty,"]"]}),s.hasLyrics&&e.jsx("span",{style:{marginLeft:6,fontSize:12},title:"Lyrics available",children:"📝"}),s.language&&e.jsxs("span",{style:{marginLeft:6,fontSize:12,color:"#666"},children:["(",s.language,")"]})]}),!b&&e.jsx("div",{children:u.has(s.id)?e.jsx("button",{onClick:()=>m==null?void 0:m(s.id),style:{color:"#f44336"},children:"Remove"}):e.jsx("button",{onClick:()=>h==null?void 0:h(s.id),children:"🎤 Sing"})})]},s.id))}),p.length>0&&e.jsxs("div",{className:"nice-karaoke-picker__queue",style:{marginTop:16},children:[e.jsxs("h4",{children:["🎶 Queue (",p.length,")"]}),p.map((s,I)=>e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",padding:"4px 0"},children:[e.jsxs("span",{children:[e.jsxs("strong",{children:[I+1,"."]})," ",s.title," — ",s.artist,s.performerName&&e.jsxs("em",{children:[" (",s.performerName,")"]})]}),!b&&m&&e.jsx("button",{onClick:()=>m(s.id),style:{fontSize:12},children:"✕"})]},s.id))]})]})}),ie={game:y.NtdGamepad,music:y.NtdMusic,dance:y.NtdMusic,quiz:y.NtdHelp,karaoke:y.NtdMicrophone,photo:y.NtdCamera,custom:y.NtdSparkle},Qe={game:"Games",music:"Music",dance:"Dance",quiz:"Quiz",karaoke:"Karaoke",photo:"Photo",custom:"Custom"},Ge=i.forwardRef(function(_,C){const{attractions:t,onSelect:p,onDeselect:h,onVote:m,selectedIds:v=[],maxSelections:j,showVotes:b=!0,readOnly:N=!1,layout:x="grid",className:f,style:r}=_,[d,k]=i.useState(""),[g,S]=i.useState(""),u=i.useMemo(()=>new Set(v),[v]),n=i.useMemo(()=>{const c=new Set(t.map(z=>z.category));return Array.from(c)},[t]),l=i.useMemo(()=>{let c=t;if(d&&(c=c.filter(z=>z.category===d)),g.trim()){const z=g.toLowerCase();c=c.filter(T=>{var M;return T.name.toLowerCase().includes(z)||((M=T.description)==null?void 0:M.toLowerCase().includes(z))})}return c},[t,d,g]),s=!j||u.size<j,I=c=>{N||(u.has(c)?h==null||h(c):s&&(p==null||p(c)))};return e.jsxs("div",{ref:C,className:`nice-attraction-picker ${f??""}`,style:{color:"var(--text-primary)",...r},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:12},children:[e.jsx("h3",{style:{margin:0},children:"Attractions"}),j&&e.jsxs("span",{style:{color:"var(--text-secondary, #64748b)",fontSize:14},children:[u.size,"/",j," selected"]})]}),e.jsxs("div",{style:{display:"flex",gap:8,marginBottom:12,flexWrap:"wrap"},children:[e.jsx("input",{type:"text",value:g,onChange:c=>S(c.target.value),placeholder:"Search attractions…",style:{flex:1,minWidth:150}}),e.jsx("button",{onClick:()=>k(""),style:{fontWeight:d?400:700},children:"All"}),n.map(c=>e.jsxs("button",{onClick:()=>k(c===d?"":c),style:{fontWeight:c===d?700:400,display:"inline-flex",alignItems:"center",gap:4},children:[i.createElement(ie[c],{size:14})," ",Qe[c]]},c))]}),e.jsx("div",{style:{display:x==="grid"?"grid":"flex",gridTemplateColumns:x==="grid"?"repeat(auto-fill, minmax(200px, 1fr))":void 0,gap:12,flexDirection:x==="list"?"column":void 0},children:l.length===0?e.jsx("p",{children:"No attractions found."}):l.map(c=>{const z=u.has(c.id);return e.jsxs("div",{className:"nice-attraction-picker__card",style:{border:z?"2px solid var(--color-primary, #6366f1)":"1px solid var(--border-color, #cbd5e1)",borderRadius:8,padding:12,cursor:N?"default":"pointer",background:z?"color-mix(in srgb, var(--color-primary) 12%, transparent)":"var(--bg-elevated, var(--bg-primary))",transition:"all 0.2s"},onClick:()=>I(c.id),children:[c.imageUrl&&e.jsx("img",{src:c.imageUrl,alt:c.name,style:{width:"100%",borderRadius:6,marginBottom:8,objectFit:"cover",maxHeight:120}}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[e.jsx("span",{style:{display:"inline-flex"},children:i.createElement(ie[c.category],{size:16})}),e.jsx("strong",{children:c.name})]}),c.description&&e.jsx("p",{style:{fontSize:13,color:"var(--text-secondary, #64748b)",margin:"6px 0"},children:c.description}),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:8},children:[b&&e.jsxs("span",{style:{fontSize:13,display:"inline-flex",alignItems:"center",gap:4},children:[e.jsx(y.NtdThumbsUp,{size:14})," ",c.votes??0]}),!N&&m&&e.jsx("button",{onClick:T=>{T.stopPropagation(),m(c.id)},style:{fontSize:12},children:"Vote"})]})]},c.id)})})]})}),He={game:y.NtdGamepad,music:y.NtdMusic,dance:y.NtdMusic,quiz:y.NtdHelp,karaoke:y.NtdMicrophone,photo:y.NtdCamera,custom:y.NtdSparkle},Ke=i.forwardRef(function(_,C){const{attractions:t,onVote:p,onUnvote:h,votedIds:m=[],maxVotes:v,closed:j=!1,sortBy:b="votes",showResults:N=!0,className:x,style:f}=_,r=i.useMemo(()=>new Set(m),[m]),d=v?v-r.size:void 0,k=i.useMemo(()=>{const n=[...t];switch(b){case"votes":n.sort((l,s)=>(s.votes??0)-(l.votes??0));break;case"name":n.sort((l,s)=>l.name.localeCompare(s.name));break;case"category":n.sort((l,s)=>l.category.localeCompare(s.category));break}return n},[t,b]),g=i.useMemo(()=>Math.max(...t.map(n=>n.votes??0),1),[t]),S=n=>{j||(r.has(n)?h==null||h(n):(!d||d>0)&&(p==null||p(n)))},u=n=>{switch(n){case 0:return e.jsx(y.NtdTrophy,{size:18,primaryColor:"#f59e0b",title:"1st place"});case 1:return e.jsx(y.NtdMedal,{size:18,primaryColor:"#94a3b8",title:"2nd place"});case 2:return e.jsx(y.NtdMedal,{size:18,primaryColor:"#b45309",title:"3rd place"});default:return`${n+1}.`}};return e.jsxs("div",{ref:C,className:`nice-attraction-voting ${x??""}`,style:{color:"var(--text-primary)",...f},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16},children:[e.jsxs("h3",{style:{margin:0,display:"inline-flex",alignItems:"center",gap:8},children:[e.jsx(y.NtdClipboardCheck,{size:20}),j?"Voting Results":"Vote for Attractions"]}),!j&&d!==void 0&&e.jsxs("span",{style:{fontSize:14,color:d>0?"var(--color-primary, #6366f1)":"var(--color-error, #ef4444)"},children:[d," vote",d!==1?"s":""," remaining"]})]}),j&&e.jsx("p",{style:{color:"var(--text-secondary, #64748b)",marginBottom:12},children:"Voting is closed. Final results:"}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:k.map((n,l)=>{const s=r.has(n.id),I=n.votes??0,c=N?`${Math.round(I/g*100)}%`:"0%";return e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,padding:"10px 14px",borderRadius:8,border:s?"2px solid var(--color-primary, #6366f1)":"1px solid var(--border-color, #cbd5e1)",background:s?"color-mix(in srgb, var(--color-primary) 12%, transparent)":"var(--bg-elevated, var(--bg-primary))",cursor:j?"default":"pointer",transition:"all 0.2s"},onClick:()=>S(n.id),children:[N&&e.jsx("span",{style:{fontSize:18,minWidth:32,textAlign:"center"},children:u(l)}),e.jsx("span",{style:{display:"inline-flex",fontSize:20},children:i.createElement(He[n.category],{size:20})}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontWeight:600},children:n.name}),n.description&&e.jsx("div",{style:{fontSize:13,color:"var(--text-secondary, #64748b)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n.description}),N&&e.jsx("div",{style:{marginTop:4,height:6,borderRadius:3,background:"var(--bg-tertiary, #e2e8f0)",overflow:"hidden"},children:e.jsx("div",{style:{height:"100%",width:c,background:"var(--color-primary, #6366f1)",borderRadius:3,transition:"width 0.3s"}})})]}),N&&e.jsx("span",{style:{fontWeight:600,fontSize:16,minWidth:40,textAlign:"right"},children:I}),!j&&e.jsx("button",{onClick:z=>{z.stopPropagation(),S(n.id)},style:{padding:"4px 12px",borderRadius:4,border:"none",background:s?"var(--color-error, #ef4444)":"var(--color-primary, #6366f1)",color:"#fff",cursor:"pointer",fontSize:13},children:s?"Unvote":"Vote"})]},n.id)})}),N&&e.jsxs("div",{style:{marginTop:12,textAlign:"right",fontSize:13,color:"var(--text-secondary, #64748b)"},children:["Total votes: ",t.reduce((n,l)=>n+(l.votes??0),0)]})]})});exports.NiceAttractionPicker=Ge;exports.NiceAttractionVoting=Ke;exports.NiceEventMedia=Ee;exports.NiceEventPlanning=Oe;exports.NiceKaraokePicker=Fe;exports.NiceRoundCard=Ue;exports.NiceRoundList=qe;exports.NiceSongPicker=We;
package/dist/index.d.ts CHANGED
@@ -166,6 +166,12 @@ export declare interface EventParticipant {
166
166
  score?: number;
167
167
  }
168
168
 
169
+ /** Display density / scope of {@link NiceEventPlanning}. */
170
+ declare type EventPlanningDisplayMode = 'micro' | 'compact' | 'normal' | 'full';
171
+
172
+ /** Available planner tabs. */
173
+ declare type EventPlanningTab = 'details' | 'location' | 'participants' | 'surveys' | 'budget' | 'settings';
174
+
169
175
  /** Event round. */
170
176
  export declare interface EventRound {
171
177
  id: string;
@@ -324,34 +330,10 @@ export declare interface NiceAttractionVotingProps {
324
330
  }
325
331
 
326
332
  /**
327
- * {@link NiceEventChat} — Real-time event chat with reactions and message types.
328
- */
329
- export declare const NiceEventChat: default_2.ForwardRefExoticComponent<NiceEventChatProps & default_2.RefAttributes<HTMLDivElement>>;
330
-
331
- /** Props for {@link NiceEventChat}. */
332
- export declare interface NiceEventChatProps {
333
- /** Messages to display. */
334
- messages: ChatMessage[];
335
- /** Current user ID. */
336
- currentUserId: string;
337
- /** Called when sending a message. */
338
- onSend?: (content: string, type?: ChatMessageType) => void;
339
- /** Called when reacting to a message. */
340
- onReact?: (messageId: string, reaction: string) => void;
341
- /** Available reaction emojis. */
342
- reactions?: string[];
343
- /** Whether the chat is read-only. */
344
- readOnly?: boolean;
345
- /** Placeholder text. */
346
- placeholder?: string;
347
- /** Whether to auto-scroll to bottom on new messages. */
348
- autoScroll?: boolean;
349
- className?: string;
350
- style?: default_2.CSSProperties;
351
- }
352
-
353
- /**
354
- * {@link NiceEventMedia} — Media gallery with upload, photos, and collages.
333
+ * {@link NiceEventMedia} — responsive media gallery (photos / videos) built from
334
+ * Nice* controls: NiceUpload for adding media and NiceCardGroup for the layout.
335
+ * Each card keeps its thumbnail, caption and actions together on one line and
336
+ * wraps responsively; broken images fall back to a themed placeholder.
355
337
  */
356
338
  export declare const NiceEventMedia: default_2.ForwardRefExoticComponent<NiceEventMediaProps & default_2.RefAttributes<HTMLDivElement>>;
357
339
 
@@ -367,7 +349,7 @@ export declare interface NiceEventMediaProps {
367
349
  onLike?: (mediaId: string) => void;
368
350
  /** Called when clicking on a media item. */
369
351
  onItemClick?: (item: EventMediaItem) => void;
370
- /** Display mode. */
352
+ /** Display mode — `grid`/`masonry` lay out as a responsive card grid; `list` stacks horizontal cards. */
371
353
  layout?: 'grid' | 'masonry' | 'list';
372
354
  /** Whether upload is allowed. */
373
355
  uploadEnabled?: boolean;
@@ -378,38 +360,10 @@ export declare interface NiceEventMediaProps {
378
360
  }
379
361
 
380
362
  /**
381
- * {@link NiceEventParticipants} — Participant list with roles, status, and QR codes.
382
- */
383
- export declare const NiceEventParticipants: default_2.ForwardRefExoticComponent<NiceEventParticipantsProps & default_2.RefAttributes<HTMLDivElement>>;
384
-
385
- /** Props for {@link NiceEventParticipants}. */
386
- export declare interface NiceEventParticipantsProps {
387
- /** Participants. */
388
- participants: EventParticipant[];
389
- /** Current user's participant ID (for self-highlight). */
390
- currentParticipantId?: string;
391
- /** Called when inviting a participant. */
392
- onInvite?: () => void;
393
- /** Called when removing a participant. */
394
- onRemove?: (participantId: string) => void;
395
- /** Called when changing a participant's role. */
396
- onRoleChange?: (participantId: string, role: ParticipantRole) => void;
397
- /** Called when checking in a participant. */
398
- onCheckIn?: (participantId: string) => void;
399
- /** Called when clicking on a participant. */
400
- onParticipantClick?: (participant: EventParticipant) => void;
401
- /** Whether to show QR codes for check-in. */
402
- showQR?: boolean;
403
- /** Whether to allow management actions. */
404
- editable?: boolean;
405
- /** Max participants. */
406
- maxParticipants?: number;
407
- className?: string;
408
- style?: default_2.CSSProperties;
409
- }
410
-
411
- /**
412
- * {@link NiceEventPlanning} — Event planning with dates, location, surveys, and billing.
363
+ * {@link NiceEventPlanning} — Composed-from-Nice* event planner: a toolbar with
364
+ * status + Save/Publish/Share/Export, tabbed sections (details, location,
365
+ * participants, surveys, budget, settings) and four display modes
366
+ * (`micro` → `full`). Suitable for embedding in a NiceViewRenderer.
413
367
  */
414
368
  export declare const NiceEventPlanning: default_2.ForwardRefExoticComponent<NiceEventPlanningProps & default_2.RefAttributes<HTMLDivElement>>;
415
369
 
@@ -417,10 +371,33 @@ export declare const NiceEventPlanning: default_2.ForwardRefExoticComponent<Nice
417
371
  export declare interface NiceEventPlanningProps {
418
372
  /** Event data. */
419
373
  event: EventModel;
374
+ /** Participants (enables the Participants tab + summary avatars). */
375
+ participants?: EventParticipant[];
420
376
  /** Surveys. */
421
377
  surveys?: EventSurvey[];
422
- /** Billing items. */
378
+ /** Billing items (Budget tab). */
423
379
  billing?: BillingItem[];
380
+ /**
381
+ * Display density / scope. `micro` renders only a summary card (no tabs);
382
+ * `compact` shows the core tabs; `normal` (default) and `full` show everything.
383
+ */
384
+ displayMode?: EventPlanningDisplayMode;
385
+ /** Explicit tab set / order — overrides the displayMode defaults. */
386
+ tabs?: EventPlanningTab[];
387
+ /** Controlled active tab. */
388
+ activeTab?: EventPlanningTab;
389
+ /** Active-tab change handler. */
390
+ onTabChange?: (tab: EventPlanningTab) => void;
391
+ /** Whether editing is allowed. */
392
+ editable?: boolean;
393
+ /** Toolbar — Save handler (button shown when provided). */
394
+ onSave?: (data: Partial<EventModel>) => void;
395
+ /** Toolbar — Publish handler. */
396
+ onPublish?: () => void;
397
+ /** Toolbar — Share handler. */
398
+ onShare?: () => void;
399
+ /** Toolbar — Export handler. */
400
+ onExport?: () => void;
424
401
  /** Called when updating event details. */
425
402
  onUpdateEvent?: (data: Partial<EventModel>) => void;
426
403
  /** Called when updating location. */
@@ -431,8 +408,6 @@ export declare interface NiceEventPlanningProps {
431
408
  onSurveyRespond?: (surveyId: string, answer: string | string[] | number) => void;
432
409
  /** Called when adding a billing item. */
433
410
  onAddBilling?: (item: Partial<BillingItem>) => void;
434
- /** Whether editing is allowed. */
435
- editable?: boolean;
436
411
  className?: string;
437
412
  style?: default_2.CSSProperties;
438
413
  }