@alfadocs/ui-kit 1.136.0 → 1.138.0

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.
Files changed (131) hide show
  1. package/dist/_chunks/{appointment-card-BT1cMZIX.js → appointment-card-CaxFXtSn.js} +196 -184
  2. package/dist/_chunks/appointment-details-panel.history-DrIMDQYf.js +314 -0
  3. package/dist/_chunks/appointment-details-panel.identity-C20Y9xNC.js +223 -0
  4. package/dist/_chunks/{appointment-timeline-Dy4YQJ17.js → appointment-timeline-BEwgbYyG.js} +113 -110
  5. package/dist/_chunks/{appointment-tray-B3gSHL1j.js → appointment-tray-DPpeR9JT.js} +8 -8
  6. package/dist/_chunks/calendar-appointment-editor-dialog-SxSkOTnO.js +5519 -0
  7. package/dist/_chunks/calendar-editor-discard-host-DjUhoFr2.js +1336 -0
  8. package/dist/_chunks/calendar-editor-guard-9fShhNIA.js +31 -0
  9. package/dist/_chunks/calendar-waiting-list-panel-331vzAdl.js +981 -0
  10. package/dist/_chunks/calendar-workspace.model-B8yPwuBv.js +1557 -0
  11. package/dist/_chunks/calendar.sheets-aodjllWd.js +4585 -0
  12. package/dist/_chunks/color-picker-CC8ZfntU.js +582 -0
  13. package/dist/_chunks/{document-preview-DWlejd8A.js → document-preview-CirR3C_m.js} +2 -2
  14. package/dist/_chunks/{fiscal-code-input-BBvU7sAo.js → fiscal-code-input-DZlpaMGg.js} +2 -2
  15. package/dist/_chunks/{iban-input-DuTwKok5.js → iban-input-CdSLRzQN.js} +2 -2
  16. package/dist/_chunks/list-todo-KWvUhmT_.js +33 -0
  17. package/dist/_chunks/{notes-panel-BvjAo4RQ.js → notes-panel-DsEKNtsw.js} +2 -2
  18. package/dist/_chunks/palettes-CKVXYTzo.js +172 -0
  19. package/dist/_chunks/{patient-account-settings-Bmfeclpd.js → patient-account-settings-Cs9y-pVA.js} +3 -3
  20. package/dist/_chunks/{patient-check-in-resume-CYZ-SvsF.js → patient-check-in-resume-4qi_klQV.js} +5 -5
  21. package/dist/_chunks/{patient-details-9eh9cNy7.js → patient-details-Dv7EiTCo.js} +2 -2
  22. package/dist/_chunks/{patient-field-row-B782eT0C.js → patient-field-row-DuHWGlLz.js} +2 -2
  23. package/dist/_chunks/patient-picker-BZJuOgMw.js +173 -0
  24. package/dist/_chunks/{patient-summary-card-K9zaMl1O.js → patient-summary-card-D-cDzOim.js} +2 -2
  25. package/dist/_chunks/{portal-details-DCIiGkHA.js → portal-details-BGc_FLQk.js} +3 -3
  26. package/dist/_chunks/{portal-documents-DVKj6Sco.js → portal-documents-BSI1U5lI.js} +3 -3
  27. package/dist/_chunks/{portal-parts-Br8wuala.js → portal-parts-C99CreYO.js} +2 -2
  28. package/dist/_chunks/{privacy-mask-C19dJFMk.js → privacy-mask-C2ZLKrMh.js} +5 -5
  29. package/dist/_chunks/{rich-text-editor-DjHL1b3E.js → rich-text-editor-C48omVjq.js} +2 -2
  30. package/dist/_chunks/task-editor-wKbFbGqW.js +1093 -0
  31. package/dist/_chunks/use-appointment-details-read-jGkJalX8.js +1966 -0
  32. package/dist/agent-catalog.json +2 -2
  33. package/dist/appointment-editor-panel/index.js +100 -0
  34. package/dist/booking-tools-data/index.js +82 -0
  35. package/dist/browser-support.js +1 -1
  36. package/dist/calendar-action-buttons/index.js +178 -0
  37. package/dist/components/appointment-card/appointment-card.d.ts +5 -2
  38. package/dist/components/appointment-card/index.js +2 -2
  39. package/dist/components/appointment-details-panel/index.js +6 -5
  40. package/dist/components/appointment-timeline/appointment-timeline.d.ts +6 -0
  41. package/dist/components/appointment-timeline/index.js +1 -1
  42. package/dist/components/color-picker/index.js +5 -4
  43. package/dist/components/document-preview/index.js +1 -1
  44. package/dist/components/fiscal-code-input/index.js +1 -1
  45. package/dist/components/iban-input/index.js +1 -1
  46. package/dist/components/notes-panel/index.js +1 -1
  47. package/dist/components/patient-details/index.js +1 -1
  48. package/dist/components/patient-summary-card/index.js +1 -1
  49. package/dist/components/rich-text-editor/index.js +1 -1
  50. package/dist/components/task-editor/index.js +1 -1
  51. package/dist/core.css +1 -1
  52. package/dist/find-free-slots-panel/index.js +58 -0
  53. package/dist/host-legacy.css +16 -0
  54. package/dist/i18n/locales/ar.d.ts +0 -1
  55. package/dist/i18n/locales/ar.js +0 -1
  56. package/dist/i18n/locales/de.d.ts +0 -1
  57. package/dist/i18n/locales/de.js +0 -1
  58. package/dist/i18n/locales/el.d.ts +0 -1
  59. package/dist/i18n/locales/el.js +0 -1
  60. package/dist/i18n/locales/en.d.ts +0 -1
  61. package/dist/i18n/locales/en.js +0 -1
  62. package/dist/i18n/locales/es.d.ts +0 -1
  63. package/dist/i18n/locales/es.js +0 -1
  64. package/dist/i18n/locales/fr.d.ts +0 -1
  65. package/dist/i18n/locales/fr.js +0 -1
  66. package/dist/i18n/locales/hi.d.ts +0 -1
  67. package/dist/i18n/locales/hi.js +0 -1
  68. package/dist/i18n/locales/it.d.ts +0 -1
  69. package/dist/i18n/locales/it.js +0 -1
  70. package/dist/i18n/locales/ja.d.ts +0 -1
  71. package/dist/i18n/locales/ja.js +0 -1
  72. package/dist/i18n/locales/nl.d.ts +0 -1
  73. package/dist/i18n/locales/nl.js +0 -1
  74. package/dist/i18n/locales/pl.d.ts +0 -1
  75. package/dist/i18n/locales/pl.js +0 -1
  76. package/dist/i18n/locales/pt.d.ts +0 -1
  77. package/dist/i18n/locales/pt.js +0 -1
  78. package/dist/i18n/locales/ro.d.ts +0 -1
  79. package/dist/i18n/locales/ro.js +0 -1
  80. package/dist/i18n/locales/ru.d.ts +0 -1
  81. package/dist/i18n/locales/ru.js +0 -1
  82. package/dist/i18n/locales/sq.d.ts +0 -1
  83. package/dist/i18n/locales/sq.js +0 -1
  84. package/dist/i18n/locales/sv.d.ts +0 -1
  85. package/dist/i18n/locales/sv.js +0 -1
  86. package/dist/i18n/locales/tr.d.ts +0 -1
  87. package/dist/i18n/locales/tr.js +0 -1
  88. package/dist/i18n/locales/zh.d.ts +0 -1
  89. package/dist/i18n/locales/zh.js +0 -1
  90. package/dist/index.js +1328 -1322
  91. package/dist/locales/ar.json +0 -1
  92. package/dist/locales/de.json +0 -1
  93. package/dist/locales/el.json +0 -1
  94. package/dist/locales/en.json +0 -1
  95. package/dist/locales/es.json +0 -1
  96. package/dist/locales/fr.json +0 -1
  97. package/dist/locales/hi.json +0 -1
  98. package/dist/locales/it.json +0 -1
  99. package/dist/locales/ja.json +0 -1
  100. package/dist/locales/nl.json +0 -1
  101. package/dist/locales/pl.json +0 -1
  102. package/dist/locales/pt.json +0 -1
  103. package/dist/locales/ro.json +0 -1
  104. package/dist/locales/ru.json +0 -1
  105. package/dist/locales/sq.json +0 -1
  106. package/dist/locales/sv.json +0 -1
  107. package/dist/locales/tr.json +0 -1
  108. package/dist/locales/zh.json +0 -1
  109. package/dist/online-bookings-panel/index.js +69 -0
  110. package/dist/patterns/calendar/booking-tools/appointment-editor-panel.d.ts +46 -0
  111. package/dist/patterns/calendar/booking-tools/booking-tools-data.d.ts +48 -0
  112. package/dist/patterns/calendar/booking-tools/calendar-action-buttons.d.ts +55 -0
  113. package/dist/patterns/calendar/booking-tools/find-free-slots-panel.d.ts +35 -0
  114. package/dist/patterns/calendar/booking-tools/online-bookings-panel.d.ts +61 -0
  115. package/dist/patterns/calendar/booking-tools/waiting-list-panel.d.ts +58 -0
  116. package/dist/patterns/calendar/calendar-editor-discard-host.d.ts +20 -0
  117. package/dist/patterns/calendar/calendar-print-sheet.d.ts +16 -0
  118. package/dist/patterns/calendar/calendar-workspace.model.d.ts +7 -0
  119. package/dist/patterns/calendar/calendar.model.d.ts +9 -0
  120. package/dist/patterns/calendar/calendar.sheets.d.ts +59 -17
  121. package/dist/patterns/calendar/index.js +24 -20
  122. package/dist/patterns/patient-account-settings/index.js +1 -1
  123. package/dist/patterns/patient-check-in/index.js +1 -1
  124. package/dist/patterns/patient-portal/index.js +2 -2
  125. package/dist/tokens.css +1 -1
  126. package/dist/waiting-list-panel/index.js +158 -0
  127. package/package.json +27 -2
  128. package/dist/_chunks/calendar-appointment-editor-dialog-CB4cQOtc.js +0 -13773
  129. package/dist/_chunks/color-picker-AcaWuKah.js +0 -745
  130. package/dist/_chunks/task-editor-BfXSn6U1.js +0 -1257
  131. package/dist/_chunks/use-appointment-details-read-7J0j1FP7.js +0 -2476
@@ -0,0 +1,981 @@
1
+ import { jsxs as r, jsx as e, Fragment as We } from "react/jsx-runtime";
2
+ import { forwardRef as Te, useRef as X, useId as ce, useState as oe, useMemo as he } from "react";
3
+ import { useTranslation as ve } from "react-i18next";
4
+ import { c as Le } from "./index-D2ZczOXr.js";
5
+ import { A as U } from "./alert-C4WKViaS.js";
6
+ import { A as De } from "./avatar-Dp5apm1d.js";
7
+ import { B as Pe } from "./badge-BUk4RjTS.js";
8
+ import { B as S } from "./button-DohK_Ak_.js";
9
+ import { I as me } from "./icon-button-S8_weU3g.js";
10
+ import { B as Ee } from "./button-group-DuQuuulC.js";
11
+ import { C as pe } from "./card-n6W6LW-N.js";
12
+ import { D as de } from "./date-picker-BmVBVpVu.js";
13
+ import { D as Y } from "./dropdown-menu-DBWaW4pq.js";
14
+ import { E as Ve } from "./empty-state-DwJ5YNzz.js";
15
+ import { F as A } from "./form-field-CyHfOVKF.js";
16
+ import { P as Be } from "./panel-header-CbtlTe85.js";
17
+ import { P as Oe } from "./panel-subview-DCyvn-49.js";
18
+ import { S as Me } from "./scroll-area-CY5SLYNw.js";
19
+ import { S as ge } from "./select-CIXKyUMw.js";
20
+ import { C as Ge, S as W } from "./skeleton-tTWJpvAq.js";
21
+ import { T as Ke } from "./text-area-COMVJ1yE.js";
22
+ import { T as be } from "./tooltip-uEBdD1-5.js";
23
+ import { V as xe } from "./visually-hidden-BHxEUGyT.js";
24
+ import { a as ke } from "./whatsapp-button-XbozeDl_.js";
25
+ import { a as $e, b as Fe, W as Ye, w as je } from "./calendar.sheets-aodjllWd.js";
26
+ import { u as Re } from "./calendar-editor-guard-9fShhNIA.js";
27
+ import { E as le, f as He, g as Qe, w as qe, d as Je, N as Ue, e as Xe, i as Ze, j as ea, p as aa, k as sa } from "./calendar-workspace.model-B8yPwuBv.js";
28
+ import { F as ta } from "./funnel-DpPV3Qkd.js";
29
+ import { P as ia } from "./plus-DzMQ_c6b.js";
30
+ import { H as Ne } from "./hourglass-BEAzW1wE.js";
31
+ import { L as na } from "./lock-ClAFG1gy.js";
32
+ import { p as ra } from "./privacy-mask-text-B8YfzB7L.js";
33
+ import { E as ye } from "./eye-off-C_4xkbRP.js";
34
+ import { C as Ce } from "./calendar-days-BGWklvE-.js";
35
+ import { f as oa, a as Ae } from "./appointment-details-panel.identity-C20Y9xNC.js";
36
+ import { C as da } from "./chevron-right-I9AeSxH2.js";
37
+ import { P as la } from "./phone-FceYcIFQ.js";
38
+ import { S as Se } from "./stethoscope-sZXGC43m.js";
39
+ import { C as ca } from "./list-todo-KWvUhmT_.js";
40
+ import { U as ma } from "./user-plus-BtcOLgNU.js";
41
+ import { c as pa } from "./createLucideIcon-DhHxpK9K.js";
42
+ import { C as ua } from "./calendar-clock-hbObjfGY.js";
43
+ import { E as fa } from "./ellipsis-dRo9ouSU.js";
44
+ import { P as ha } from "./pencil-B1sKKyuT.js";
45
+ import { T as ga } from "./trash-2-uumy3fy1.js";
46
+ /**
47
+ * @license lucide-react v1.22.0 - ISC
48
+ *
49
+ * This source code is licensed under the ISC license.
50
+ * See the LICENSE file in the root directory of this source tree.
51
+ */
52
+ const va = [
53
+ [
54
+ "path",
55
+ {
56
+ d: "M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z",
57
+ key: "1dfntj"
58
+ }
59
+ ],
60
+ ["path", { d: "M15 3v5a1 1 0 0 0 1 1h5", key: "6s6qgf" }]
61
+ ], ba = pa("sticky-note", va), s = (t) => `calendarWorkspace.waitingList.${t}`, D = "ds:sm:[min-block-size:var(--accessible-target-floor,0px)]", Z = `${D} ds:[min-inline-size:var(--accessible-target-floor,auto)]`, Na = {
62
+ linked: "groupLinked",
63
+ patient: "groupPatient",
64
+ memo: "groupMemo"
65
+ }, wa = {
66
+ all: "chipAll",
67
+ noAppointment: "chipNoAppointment",
68
+ scheduledOver30: "chipScheduledOver30",
69
+ waitingOver30: "chipWaitingOver30"
70
+ }, xa = {
71
+ linked: /* @__PURE__ */ e(ua, { "aria-hidden": "true" }),
72
+ patient: /* @__PURE__ */ e(Ne, { "aria-hidden": "true" }),
73
+ memo: /* @__PURE__ */ e(ba, { "aria-hidden": "true" })
74
+ }, j = Le(
75
+ "type-body-sm ds:flex ds:min-w-0 ds:items-center ds:gap-[var(--spacing-xs)] ds:text-start ds:[&>svg]:size-3.5 ds:[&>svg]:shrink-0",
76
+ {
77
+ variants: {
78
+ tone: {
79
+ muted: "ds:text-[color:var(--muted-foreground)]",
80
+ /* Absent data is not a warning: muted and italic, never amber. */
81
+ absent: "ds:text-[color:var(--muted-foreground)] ds:italic ds:[&>span]:pe-[var(--spacing-2xs)]",
82
+ body: "ds:text-[color:var(--foreground)]"
83
+ }
84
+ },
85
+ defaultVariants: { tone: "muted" }
86
+ }
87
+ ), Ie = Le("type-body-sm ds:min-w-0 ds:truncate ds:text-start", {
88
+ variants: {
89
+ tone: {
90
+ name: "ds:font-[var(--font-weight-semibold)] ds:text-[color:var(--foreground)]",
91
+ /* A patient IS on the row; the record did not load. Said plainly. */
92
+ notLoaded: "ds:font-[var(--font-weight-medium)] ds:italic ds:text-[color:var(--muted-foreground)]"
93
+ }
94
+ },
95
+ defaultVariants: { tone: "name" }
96
+ }), ue = "ds:ps-[calc(var(--spacing-xl)+var(--spacing-sm))] ds:@max-[288px]/waitcard:ps-0", ka = [
97
+ j({ tone: "body" }),
98
+ "ds:w-full ds:cursor-pointer ds:rounded-[var(--radius-sm)] ds:border-0 ds:bg-transparent ds:p-0",
99
+ "ds:min-h-[var(--spacing-lg)]",
100
+ D,
101
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
102
+ "ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
103
+ "ds:forced-colors:focus-visible:outline-[CanvasText]",
104
+ "ds:[&>svg]:text-[color:var(--muted-foreground)] ds:hover:[&>svg]:text-[color:var(--foreground)]"
105
+ ].join(" "), ya = "ds:size-2 ds:shrink-0 ds:rounded-[var(--radius-full)] ds:border ds:border-[color:var(--border)] ds:bg-[var(--calendar-event-accent,var(--muted-foreground))]", Ca = "ds:flex ds:size-8 ds:shrink-0 ds:items-center ds:justify-center ds:rounded-[var(--radius-full)] ds:bg-[var(--muted)] ds:text-[color:var(--muted-foreground)]";
106
+ function ze(t, c, d = {}) {
107
+ try {
108
+ const l = Ae(c), u = d.nowIso !== void 0 && Ae(d.nowIso).getFullYear() !== l.getFullYear();
109
+ return new Intl.DateTimeFormat(t, {
110
+ weekday: d.weekday ? "short" : void 0,
111
+ day: "numeric",
112
+ month: "short",
113
+ year: u ? "numeric" : void 0
114
+ }).format(l);
115
+ } catch {
116
+ return "";
117
+ }
118
+ }
119
+ function Aa({
120
+ number: t,
121
+ label: c,
122
+ onOpen: d,
123
+ ...l
124
+ }) {
125
+ const u = t.replace(/\D/g, "");
126
+ return u === "" ? (
127
+ /* `aria-disabled`, never the native attribute: a natively disabled
128
+ button leaves the tab order, so its reason reaches nobody. */
129
+ /* @__PURE__ */ e(
130
+ me,
131
+ {
132
+ ...l,
133
+ size: "sm",
134
+ className: Z,
135
+ icon: /* @__PURE__ */ e(ke, { "aria-hidden": "true" }),
136
+ "aria-label": c,
137
+ tooltip: c,
138
+ "aria-disabled": "true",
139
+ "data-action": "open-whatsapp"
140
+ }
141
+ )
142
+ ) : /* @__PURE__ */ e(be, { label: c, children: /* @__PURE__ */ e(
143
+ S,
144
+ {
145
+ ...l,
146
+ asChild: !0,
147
+ size: "sm",
148
+ className: `ds:w-8 ds:p-0 ds:[&>span]:shrink-0 ${Z}`,
149
+ startIcon: /* @__PURE__ */ e(ke, { "aria-hidden": "true" }),
150
+ "data-action": "open-whatsapp",
151
+ children: /* @__PURE__ */ e(
152
+ "a",
153
+ {
154
+ href: `https://wa.me/${u}`,
155
+ target: "_blank",
156
+ rel: "noopener noreferrer",
157
+ "aria-label": c,
158
+ onClick: d
159
+ }
160
+ )
161
+ }
162
+ ) });
163
+ }
164
+ function Sa({
165
+ entryId: t,
166
+ label: c,
167
+ editLabel: d,
168
+ editBlockedReason: l,
169
+ removeLabel: u,
170
+ onEdit: E,
171
+ onRemove: p,
172
+ ...V
173
+ }) {
174
+ const k = X(null), h = X(null);
175
+ return /* @__PURE__ */ r(Y.Root, { children: [
176
+ /* @__PURE__ */ e(Y.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
177
+ me,
178
+ {
179
+ ...V,
180
+ ref: k,
181
+ size: "sm",
182
+ className: Z,
183
+ icon: /* @__PURE__ */ e(fa, {}),
184
+ "aria-label": c,
185
+ tooltip: c,
186
+ "data-entry-edit": t
187
+ }
188
+ ) }),
189
+ /* @__PURE__ */ r(
190
+ Y.Content,
191
+ {
192
+ align: "end",
193
+ onCloseAutoFocus: (I) => {
194
+ var n;
195
+ const B = h.current;
196
+ h.current = null, B !== null && (I.preventDefault(), B === "edit" ? ((n = k.current) == null || n.focus(), E()) : p());
197
+ },
198
+ children: [
199
+ d === void 0 ? null : /* @__PURE__ */ r(We, { children: [
200
+ /* @__PURE__ */ e(
201
+ Y.Item,
202
+ {
203
+ startIcon: /* @__PURE__ */ e(ha, { "aria-hidden": "true" }),
204
+ "aria-disabled": l ? "true" : void 0,
205
+ className: l ? "ds:cursor-not-allowed ds:text-[color:var(--muted-foreground)]" : void 0,
206
+ description: l,
207
+ "data-action": "edit-waiting-entry",
208
+ onSelect: (I) => {
209
+ if (l) {
210
+ I.preventDefault();
211
+ return;
212
+ }
213
+ h.current = "edit";
214
+ },
215
+ children: d
216
+ }
217
+ ),
218
+ /* @__PURE__ */ e(Y.Separator, {})
219
+ ] }),
220
+ /* @__PURE__ */ e(
221
+ Y.Item,
222
+ {
223
+ startIcon: /* @__PURE__ */ e(ga, { "aria-hidden": "true" }),
224
+ className: "ds:text-[color:var(--destructive)]",
225
+ "data-action": "remove-waiting-entry",
226
+ onSelect: () => {
227
+ h.current = "remove";
228
+ },
229
+ children: u
230
+ }
231
+ )
232
+ ]
233
+ }
234
+ )
235
+ ] });
236
+ }
237
+ const _e = Te(
238
+ ({
239
+ view: t,
240
+ locale: c,
241
+ privacy: d = !1,
242
+ readOnly: l = !1,
243
+ onPlace: u,
244
+ onFindSlots: E,
245
+ onEdit: p,
246
+ onRemove: V,
247
+ onWhatsAppClick: k,
248
+ onOpenPatient: h,
249
+ onOpenAppointment: I
250
+ }, B) => {
251
+ var J, ne;
252
+ const { t: n } = ve("ui"), O = Re(), M = ce(), P = ce(), { entry: m, appointment: o } = t, G = ea(m), g = G === "linked", K = G === "memo", i = t.patient ?? t.appointmentPatient, z = n("calendarWorkspace.details.patientNotLoaded"), T = n("calendarWorkspace.privacy.hidden"), H = o ? String(o.event.title ?? "").trim() : "", L = d ? t.patientAssigned || g ? ra(o == null ? void 0 : o.event.privacyModeTitle) : T : null, ee = (i == null ? void 0 : i.name) ?? (t.patientAssigned ? z : g ? H || n(s("appointmentNotLoaded")) : m.description ?? n(s("noDescription"))), y = t.patientRef.assigned ? t.patientRef : t.appointmentPatientRef, $ = L ?? (y.assigned ? aa(y, m.description, z) : ee), f = !i && (t.patientAssigned || g && H === ""), C = (x) => n(s("actionForRow"), { action: n(s(x)), who: $ }), F = d ? "" : sa(t), ae = F !== "" ? C("whatsappEnabled") : n(
253
+ d ? "calendarWorkspace.privacy.hidden" : je(y)
254
+ ), v = d ? T : g ? n(s("editLinkedDisabled")) : void 0, se = t.operatorTitle ?? (o != null && o.operatorId ? (J = O.operators.find((x) => x.id === o.operatorId)) == null ? void 0 : J.title : void 0), R = d || (ne = t.patient) == null ? void 0 : ne.phone, te = K || g ? void 0 : m.description, Q = !l && p !== void 0, N = d, q = g ? "reschedule" : "schedule", w = K, fe = o != null && o.event.backgroundColor ? {
255
+ "--calendar-event-accent": o.event.backgroundColor
256
+ } : void 0, ie = (x) => x ? { "aria-disabled": "true", "aria-describedby": P } : {}, _ = (x, a, b) => x ? /* @__PURE__ */ e(be, { label: a, children: b }) : b;
257
+ return /* @__PURE__ */ e(
258
+ pe,
259
+ {
260
+ ref: B,
261
+ variant: "elevated",
262
+ "aria-labelledby": M,
263
+ "data-waiting-card": "",
264
+ className: "ds:@container/waitcard",
265
+ children: /* @__PURE__ */ r(pe.Body, { className: "ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
266
+ /* @__PURE__ */ r("div", { className: "ds:flex ds:min-w-0 ds:items-start ds:gap-[var(--spacing-sm)]", children: [
267
+ i && !d ? /* @__PURE__ */ e(De, { name: i.name, src: t.avatarSrc, size: "sm" }) : /* @__PURE__ */ e("span", { "aria-hidden": "true", className: Ca, children: d && (t.patientAssigned || g) ? /* @__PURE__ */ e(ye, { size: 16 }) : /* @__PURE__ */ e(Ne, { size: 16 }) }),
268
+ /* @__PURE__ */ r("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col", children: [
269
+ L !== null ? /* @__PURE__ */ r("span", { id: M, className: Ie(), children: [
270
+ /* @__PURE__ */ r(xe, { children: [
271
+ n("appointmentPeek.hiddenName"),
272
+ ":",
273
+ " "
274
+ ] }),
275
+ L
276
+ ] }) : i && h ? /* @__PURE__ */ e("span", { id: M, className: "ds:flex ds:min-w-0", children: /* @__PURE__ */ e(
277
+ S,
278
+ {
279
+ size: "sm",
280
+ intent: "link",
281
+ className: "ds:min-w-0 ds:max-w-full ds:[&>span]:truncate",
282
+ onClick: () => h(i),
283
+ children: i.name
284
+ }
285
+ ) }) : /* @__PURE__ */ e(
286
+ "span",
287
+ {
288
+ id: M,
289
+ className: Ie({
290
+ tone: f ? "notLoaded" : "name"
291
+ }),
292
+ children: ee
293
+ }
294
+ ),
295
+ /* @__PURE__ */ e("span", { className: "type-meta ds:truncate ds:text-start ds:text-[color:var(--muted-foreground)]", children: n(s("since"), {
296
+ date: ze(c, O.waitingSinceIso(m), {
297
+ nowIso: O.nowIso
298
+ })
299
+ }) })
300
+ ] }),
301
+ /* @__PURE__ */ r(
302
+ Ee,
303
+ {
304
+ size: "sm",
305
+ label: n(s("actionForRow"), {
306
+ action: n(s("rowActions")),
307
+ who: $
308
+ }),
309
+ className: "ds:shrink-0",
310
+ children: [
311
+ /* @__PURE__ */ e(
312
+ Aa,
313
+ {
314
+ number: F,
315
+ label: ae,
316
+ onOpen: k && (() => k(m))
317
+ }
318
+ ),
319
+ l ? null : /* @__PURE__ */ e(
320
+ Sa,
321
+ {
322
+ entryId: m.id,
323
+ label: C("moreActions"),
324
+ editLabel: p ? n(s("edit")) : void 0,
325
+ editBlockedReason: v,
326
+ removeLabel: n(s("remove")),
327
+ onEdit: () => p == null ? void 0 : p(m),
328
+ onRemove: () => V(m)
329
+ }
330
+ )
331
+ ]
332
+ }
333
+ )
334
+ ] }),
335
+ /* @__PURE__ */ r(
336
+ "div",
337
+ {
338
+ className: `ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-xs)] ${ue}`,
339
+ children: [
340
+ g && o ? /* @__PURE__ */ r(
341
+ "button",
342
+ {
343
+ type: "button",
344
+ className: ka,
345
+ "data-action": "open-linked-appointment",
346
+ "aria-label": n(s("actionForRow"), {
347
+ action: n(s("openAppointment")),
348
+ who: $
349
+ }),
350
+ onClick: () => I(String(o.event.id)),
351
+ children: [
352
+ /* @__PURE__ */ e(Ce, { "aria-hidden": "true" }),
353
+ /* @__PURE__ */ e("span", { className: "ds:min-w-0 ds:truncate", children: [
354
+ ze(c, o.event.start, {
355
+ weekday: !0,
356
+ nowIso: O.nowIso
357
+ }),
358
+ oa(
359
+ c,
360
+ o.event.start,
361
+ o.event.end
362
+ ),
363
+ d ? void 0 : t.appointmentName
364
+ ].filter(Boolean).join(" · ") }),
365
+ /* @__PURE__ */ e(
366
+ "span",
367
+ {
368
+ "aria-hidden": "true",
369
+ className: ya,
370
+ style: fe
371
+ }
372
+ ),
373
+ /* @__PURE__ */ e(
374
+ da,
375
+ {
376
+ "aria-hidden": "true",
377
+ className: "ds:ms-auto ds:rtl:rotate-180"
378
+ }
379
+ )
380
+ ]
381
+ }
382
+ ) : g ? /* @__PURE__ */ r("span", { className: j({ tone: "absent" }), children: [
383
+ /* @__PURE__ */ e(Ce, { "aria-hidden": "true" }),
384
+ /* @__PURE__ */ e("span", { className: "ds:min-w-0 ds:truncate", children: n(s("appointmentNotLoaded")) })
385
+ ] }) : null,
386
+ R ? /* @__PURE__ */ r("span", { className: j(), children: [
387
+ /* @__PURE__ */ e(la, { "aria-hidden": "true" }),
388
+ /* @__PURE__ */ e(
389
+ "a",
390
+ {
391
+ href: `tel:${R.replace(/\s/g, "")}`,
392
+ dir: "ltr",
393
+ className: "ds:min-w-0 ds:truncate ds:text-[color:inherit] ds:underline-offset-4 ds:hover:underline ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[color:var(--ring)] ds:forced-colors:focus-visible:outline-[CanvasText]",
394
+ children: R
395
+ }
396
+ )
397
+ ] }) : null,
398
+ K ? null : /* @__PURE__ */ r(
399
+ "span",
400
+ {
401
+ className: j({
402
+ tone: se ? "muted" : "absent"
403
+ }),
404
+ children: [
405
+ /* @__PURE__ */ e(Se, { "aria-hidden": "true" }),
406
+ /* @__PURE__ */ e("span", { className: "ds:min-w-0 ds:truncate", children: se ?? n(s("noOperator")) })
407
+ ]
408
+ }
409
+ ),
410
+ te ? d ? /* @__PURE__ */ r("span", { "data-privacy": "hidden", className: j(), children: [
411
+ /* @__PURE__ */ e(ye, { "aria-hidden": "true" }),
412
+ /* @__PURE__ */ e("span", { className: "ds:min-w-0 ds:truncate", children: T })
413
+ ] }) : /* @__PURE__ */ e("span", { className: j({ tone: "body" }), children: /* @__PURE__ */ e("span", { className: "ds:min-w-0 ds:truncate", children: te }) }) : null
414
+ ]
415
+ }
416
+ ),
417
+ /* @__PURE__ */ r(
418
+ "div",
419
+ {
420
+ className: `ds:flex ds:min-w-0 ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)] ${ue}`,
421
+ children: [
422
+ _(
423
+ w,
424
+ n(s("assignPatientFirst")),
425
+ /* @__PURE__ */ e(
426
+ S,
427
+ {
428
+ size: "sm",
429
+ intent: "primary",
430
+ className: D,
431
+ "aria-label": C(q),
432
+ "data-action": "place-waiting-entry",
433
+ ...ie(w),
434
+ onClick: () => {
435
+ w || u(m);
436
+ },
437
+ children: n(s(q))
438
+ }
439
+ )
440
+ ),
441
+ E ? _(
442
+ w,
443
+ n(s("assignPatientFirst")),
444
+ /* @__PURE__ */ e(
445
+ S,
446
+ {
447
+ size: "sm",
448
+ intent: "outline",
449
+ className: D,
450
+ startIcon: /* @__PURE__ */ e(ca, { "aria-hidden": "true" }),
451
+ "aria-label": C("findSlot"),
452
+ "data-action": "find-slots-for-waiting",
453
+ ...ie(w),
454
+ onClick: () => {
455
+ w || E(m);
456
+ },
457
+ children: n(s("findSlot"))
458
+ }
459
+ )
460
+ ) : null,
461
+ Q && K ? _(
462
+ N,
463
+ T,
464
+ /* @__PURE__ */ e(
465
+ S,
466
+ {
467
+ size: "sm",
468
+ intent: "outline",
469
+ className: D,
470
+ startIcon: /* @__PURE__ */ e(ma, { "aria-hidden": "true" }),
471
+ "aria-label": C("assignPatient"),
472
+ "data-action": "assign-patient",
473
+ "aria-disabled": N ? "true" : void 0,
474
+ onClick: () => {
475
+ N || p == null || p(m);
476
+ },
477
+ children: n(s("assignPatient"))
478
+ }
479
+ )
480
+ ) : null,
481
+ Q && !g && !m.operatorId ? _(
482
+ N,
483
+ T,
484
+ /* @__PURE__ */ e(
485
+ S,
486
+ {
487
+ size: "sm",
488
+ intent: "outline",
489
+ className: D,
490
+ startIcon: /* @__PURE__ */ e(Se, { "aria-hidden": "true" }),
491
+ "aria-label": C("assignOperator"),
492
+ "data-action": "assign-operator",
493
+ "aria-disabled": N ? "true" : void 0,
494
+ onClick: () => {
495
+ N || p == null || p(m);
496
+ },
497
+ children: n(s("assignOperator"))
498
+ }
499
+ )
500
+ ) : null,
501
+ w ? /* @__PURE__ */ e(xe, { id: P, children: n(s("assignPatientFirst")) }) : null
502
+ ]
503
+ }
504
+ )
505
+ ] })
506
+ }
507
+ );
508
+ }
509
+ );
510
+ _e.displayName = "WaitingEntryCard";
511
+ function Ia() {
512
+ return /* @__PURE__ */ e(
513
+ "div",
514
+ {
515
+ "aria-hidden": "true",
516
+ "data-waiting-loading": "",
517
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
518
+ children: [0, 1, 2].map((t) => /* @__PURE__ */ e(pe, { variant: "elevated", children: /* @__PURE__ */ r(pe.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
519
+ /* @__PURE__ */ r("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
520
+ /* @__PURE__ */ e(W, { variant: "circular", size: "sm", stagger: t * 2 }),
521
+ /* @__PURE__ */ r("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
522
+ /* @__PURE__ */ e(
523
+ W,
524
+ {
525
+ variant: "text",
526
+ size: "sm",
527
+ stagger: t * 2,
528
+ width: t === 1 ? "45%" : "60%"
529
+ }
530
+ ),
531
+ /* @__PURE__ */ e(
532
+ W,
533
+ {
534
+ variant: "text",
535
+ size: "sm",
536
+ stagger: t * 2 + 1,
537
+ width: "35%"
538
+ }
539
+ )
540
+ ] }),
541
+ /* @__PURE__ */ e(
542
+ W,
543
+ {
544
+ variant: "rounded",
545
+ stagger: t * 2 + 1,
546
+ width: "calc(var(--spacing-xl) * 2)",
547
+ height: "var(--spacing-xl)"
548
+ }
549
+ )
550
+ ] }),
551
+ /* @__PURE__ */ e("div", { className: ue, children: /* @__PURE__ */ e(
552
+ W,
553
+ {
554
+ variant: "text",
555
+ size: "sm",
556
+ stagger: t * 2 + 1,
557
+ width: t === 2 ? "50%" : "75%"
558
+ }
559
+ ) }),
560
+ /* @__PURE__ */ r(
561
+ "div",
562
+ {
563
+ className: `ds:flex ds:gap-[var(--spacing-xs)] ${ue}`,
564
+ children: [
565
+ /* @__PURE__ */ e(
566
+ W,
567
+ {
568
+ variant: "rounded",
569
+ stagger: t * 2 + 2,
570
+ width: "calc(var(--spacing-xl) * 2)",
571
+ height: "var(--spacing-xl)"
572
+ }
573
+ ),
574
+ /* @__PURE__ */ e(
575
+ W,
576
+ {
577
+ variant: "rounded",
578
+ stagger: t * 2 + 2,
579
+ width: "calc(var(--spacing-xl) * 3)",
580
+ height: "var(--spacing-xl)"
581
+ }
582
+ )
583
+ ]
584
+ }
585
+ )
586
+ ] }) }, t))
587
+ }
588
+ );
589
+ }
590
+ const za = Te(
591
+ ({
592
+ entries: t,
593
+ rows: c,
594
+ locale: d,
595
+ status: l = "ready",
596
+ onRetry: u,
597
+ onPlaceWaiting: E,
598
+ onFindSlotsForWaiting: p,
599
+ onRemoveWaiting: V,
600
+ onOpenEntryForm: k,
601
+ entryForm: h,
602
+ onSaveEntry: I,
603
+ onCreatePatient: B,
604
+ onCancelEntry: n,
605
+ onOpenPatient: O,
606
+ onOpenAppointment: M,
607
+ readOnly: P = !1,
608
+ privacy: m = !1,
609
+ onFilterUsed: o,
610
+ onAdvancedFilterToggled: G,
611
+ onWhatsAppClick: g
612
+ }, K) => {
613
+ const { t: i } = ve("ui"), z = Re(), T = X(null), H = ce(), [L, ee] = oe("all"), [y, $] = oe(!1), [f, C] = oe(
614
+ le
615
+ ), [F, ae] = oe(
616
+ le
617
+ ), v = (a) => C((b) => ({ ...b, ...a })), se = (a) => {
618
+ a !== L && (o == null || o(a)), ee(a), $(!1), C(le), ae(le);
619
+ }, R = he(
620
+ () => He(t, c, L, F, z),
621
+ [t, c, L, F, z]
622
+ ), te = he(() => Qe(R), [R]), Q = he(
623
+ () => qe(t, z),
624
+ [t, z]
625
+ ), N = Je(F), q = l === "loading" && t.length === 0, w = X(!1);
626
+ q && (w.current = !0);
627
+ const fe = w.current ? Ge : "", ie = I !== void 0 && n !== void 0, _ = X(void 0);
628
+ h && (_.current = h.entry);
629
+ const J = [
630
+ { value: "yes", label: i(s("filterYes")) },
631
+ { value: "no", label: i(s("filterNo")) }
632
+ ], ne = /* @__PURE__ */ r(
633
+ "form",
634
+ {
635
+ id: H,
636
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
637
+ onSubmit: (a) => {
638
+ a.preventDefault(), ae(f), o == null || o("advanced_search");
639
+ },
640
+ children: [
641
+ /* @__PURE__ */ e(A, { label: i(s("filterPatient")), children: /* @__PURE__ */ e(
642
+ $e,
643
+ {
644
+ size: "sm",
645
+ value: f.patientId,
646
+ onValueChange: (a) => v({ patientId: a })
647
+ }
648
+ ) }),
649
+ /* @__PURE__ */ e(A, { label: i(s("filterPatientAssigned")), children: /* @__PURE__ */ e(
650
+ ge,
651
+ {
652
+ size: "sm",
653
+ options: J,
654
+ value: f.patientAssigned,
655
+ placeholder: i(s("filterAny")),
656
+ clearable: !0,
657
+ onValueChange: (a) => v({ patientAssigned: a })
658
+ }
659
+ ) }),
660
+ /* @__PURE__ */ e(A, { label: i(s("filterOperator")), children: /* @__PURE__ */ e(
661
+ ge,
662
+ {
663
+ size: "sm",
664
+ options: [
665
+ { value: Ue, label: i("calendarWorkspace.editor.unassigned") },
666
+ ...Fe(z).map((a) => ({
667
+ value: a.id,
668
+ label: a.title
669
+ }))
670
+ ],
671
+ value: f.operatorId,
672
+ placeholder: i(s("filterAny")),
673
+ clearable: !0,
674
+ onValueChange: (a) => v({ operatorId: a })
675
+ }
676
+ ) }),
677
+ /* @__PURE__ */ e(A, { label: i(s("filterAppointmentScheduled")), children: /* @__PURE__ */ e(
678
+ ge,
679
+ {
680
+ size: "sm",
681
+ options: J,
682
+ value: f.appointmentScheduled,
683
+ placeholder: i(s("filterAny")),
684
+ clearable: !0,
685
+ onValueChange: (a) => v({ appointmentScheduled: a })
686
+ }
687
+ ) }),
688
+ /* @__PURE__ */ e(A, { label: i(s("filterAppointmentFrom")), children: /* @__PURE__ */ e(
689
+ de,
690
+ {
691
+ size: "sm",
692
+ value: f.appointmentFrom,
693
+ onChange: (a) => v({ appointmentFrom: a })
694
+ }
695
+ ) }),
696
+ /* @__PURE__ */ e(A, { label: i(s("filterAppointmentTo")), children: /* @__PURE__ */ e(
697
+ de,
698
+ {
699
+ size: "sm",
700
+ value: f.appointmentTo,
701
+ minDate: f.appointmentFrom,
702
+ onChange: (a) => v({ appointmentTo: a })
703
+ }
704
+ ) }),
705
+ /* @__PURE__ */ e(A, { label: i(s("filterWaitingFrom")), children: /* @__PURE__ */ e(
706
+ de,
707
+ {
708
+ size: "sm",
709
+ value: f.waitingFrom,
710
+ onChange: (a) => v({ waitingFrom: a })
711
+ }
712
+ ) }),
713
+ /* @__PURE__ */ e(A, { label: i(s("filterWaitingTo")), children: /* @__PURE__ */ e(
714
+ de,
715
+ {
716
+ size: "sm",
717
+ value: f.waitingTo,
718
+ minDate: f.waitingFrom,
719
+ onChange: (a) => v({ waitingTo: a })
720
+ }
721
+ ) }),
722
+ /* @__PURE__ */ e(A, { label: i(s("filterDescription")), children: /* @__PURE__ */ e(
723
+ Ke,
724
+ {
725
+ value: f.description,
726
+ placeholder: i(s("filterDescription")),
727
+ onChange: (a) => v({ description: a.target.value }),
728
+ minRows: 1,
729
+ autoResize: !0
730
+ }
731
+ ) }),
732
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(S, { size: "sm", intent: "primary", type: "submit", children: i(s("filterSubmit")) }) })
733
+ ]
734
+ }
735
+ ), x = i(
736
+ s(y ? "hideAdvanced" : "showAdvanced")
737
+ );
738
+ return /* @__PURE__ */ e(
739
+ "div",
740
+ {
741
+ ref: K,
742
+ "data-component": "calendar-waiting-list",
743
+ "data-status": l,
744
+ className: "ds:flex ds:h-full ds:min-h-0 ds:flex-col",
745
+ children: /* @__PURE__ */ r(Oe.Host, { children: [
746
+ /* @__PURE__ */ e(
747
+ Be,
748
+ {
749
+ ref: T,
750
+ tabIndex: -1,
751
+ title: i(s("tool")),
752
+ icon: /* @__PURE__ */ e(Ne, { "aria-hidden": "true" }),
753
+ sticky: !0,
754
+ divider: !0,
755
+ actions: P || !k ? void 0 : /* @__PURE__ */ e(
756
+ me,
757
+ {
758
+ size: "sm",
759
+ intent: "ghost",
760
+ className: Z,
761
+ icon: /* @__PURE__ */ e(ia, { "aria-hidden": "true" }),
762
+ "aria-label": i(s("addEntry")),
763
+ tooltip: i(s("addEntry")),
764
+ "data-entry-add": "",
765
+ onClick: () => k()
766
+ }
767
+ ),
768
+ filters: /* @__PURE__ */ r("div", { className: "ds:flex ds:w-full ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
769
+ /* @__PURE__ */ r("div", { className: "ds:flex ds:min-w-0 ds:items-start ds:gap-[var(--spacing-xs)]", children: [
770
+ /* @__PURE__ */ e(
771
+ "div",
772
+ {
773
+ role: "group",
774
+ "aria-label": i(s("quickView")),
775
+ className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
776
+ children: Xe.map((a) => {
777
+ const b = L === a, re = i(
778
+ `calendarWorkspace.backlog.${Ze[a]}`
779
+ );
780
+ return /* @__PURE__ */ e(be, { label: re, children: /* @__PURE__ */ r(
781
+ S,
782
+ {
783
+ size: "sm",
784
+ intent: b ? "primary" : "outline",
785
+ className: D,
786
+ "aria-pressed": b,
787
+ "aria-label": i(s("chipCount"), {
788
+ view: re,
789
+ n: Q[a]
790
+ }),
791
+ "data-quick-view": a,
792
+ onClick: () => se(a),
793
+ children: [
794
+ i(s(wa[a])),
795
+ /* @__PURE__ */ e("span", { className: "ds:ms-[var(--spacing-xs)] ds:font-[var(--font-weight-bold)]", children: Q[a] })
796
+ ]
797
+ }
798
+ ) }, a);
799
+ })
800
+ }
801
+ ),
802
+ /* @__PURE__ */ r("span", { className: "ds:relative ds:shrink-0", children: [
803
+ /* @__PURE__ */ e(
804
+ me,
805
+ {
806
+ size: "sm",
807
+ intent: "ghost",
808
+ className: Z,
809
+ icon: /* @__PURE__ */ e(ta, { "aria-hidden": "true" }),
810
+ "aria-label": x,
811
+ tooltip: x,
812
+ "aria-expanded": y,
813
+ "aria-controls": y ? H : void 0,
814
+ onClick: () => {
815
+ G == null || G(
816
+ y ? "hide" : "show"
817
+ ), $((a) => !a);
818
+ }
819
+ }
820
+ ),
821
+ N > 0 ? /* @__PURE__ */ e(
822
+ Pe,
823
+ {
824
+ size: "sm",
825
+ variant: "brand",
826
+ "aria-label": i(s("filtersApplied"), {
827
+ n: N
828
+ }),
829
+ className: "ds:pointer-events-none ds:absolute ds:-top-1 ds:-end-1",
830
+ children: N
831
+ }
832
+ ) : null
833
+ ] })
834
+ ] }),
835
+ y ? ne : null
836
+ ] })
837
+ }
838
+ ),
839
+ /* @__PURE__ */ e(Me, { orientation: "vertical", className: "ds:min-h-0 ds:flex-1", children: /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)]", children: [
840
+ P ? (
841
+ /* Names the missing permission ONCE, at the top: without it
842
+ the queue reads as a list whose actions simply went away. */
843
+ /* @__PURE__ */ r(
844
+ U,
845
+ {
846
+ variant: "info",
847
+ announce: "off",
848
+ icon: /* @__PURE__ */ e(na, { "aria-hidden": "true" }),
849
+ children: [
850
+ /* @__PURE__ */ e(U.Title, { as: "p", children: i("calendarWorkspace.details.readOnlyTitle") }),
851
+ /* @__PURE__ */ e(U.Description, { children: i("calendarWorkspace.inc1.readOnly.waitingLockedBody") })
852
+ ]
853
+ }
854
+ )
855
+ ) : null,
856
+ l === "loading" ? /* @__PURE__ */ e("p", { role: "status", className: "ds:sr-only", children: i("common.loading") }) : l === "error" ? /* @__PURE__ */ r(U, { variant: "error", children: [
857
+ /* @__PURE__ */ e(U.Description, { children: i("emptyState.error.description") }),
858
+ u ? /* @__PURE__ */ e(
859
+ S,
860
+ {
861
+ size: "sm",
862
+ intent: "outline",
863
+ onClick: () => u(),
864
+ children: i("emptyState.error.cta")
865
+ }
866
+ ) : null
867
+ ] }) : null,
868
+ q ? /* @__PURE__ */ e(Ia, {}) : R.length === 0 ? l === "ready" ? /* @__PURE__ */ e(
869
+ Ve,
870
+ {
871
+ variant: "first-use",
872
+ size: "sm",
873
+ title: i(s("emptyTitle")),
874
+ description: i(s("emptyDescription"))
875
+ }
876
+ ) : null : /* @__PURE__ */ e(
877
+ "div",
878
+ {
879
+ "aria-busy": l === "loading",
880
+ "data-waiting-groups": "",
881
+ className: `ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ${fe}`.trim(),
882
+ children: te.map((a) => /* @__PURE__ */ e(
883
+ Ta,
884
+ {
885
+ kind: a.kind,
886
+ count: a.rows.length,
887
+ children: a.rows.map((b) => /* @__PURE__ */ e(
888
+ "li",
889
+ {
890
+ "data-waiting-entry": b.entry.id,
891
+ "data-kind": a.kind,
892
+ className: "ds:min-w-0",
893
+ children: /* @__PURE__ */ e(
894
+ _e,
895
+ {
896
+ view: b,
897
+ locale: d,
898
+ privacy: m,
899
+ readOnly: P,
900
+ onPlace: E,
901
+ onFindSlots: p,
902
+ onEdit: k,
903
+ onRemove: (re) => {
904
+ var we;
905
+ V(re), (we = T.current) == null || we.focus();
906
+ },
907
+ onWhatsAppClick: g,
908
+ onOpenPatient: O,
909
+ onOpenAppointment: M
910
+ }
911
+ )
912
+ },
913
+ b.entry.id
914
+ ))
915
+ },
916
+ a.kind
917
+ ))
918
+ }
919
+ )
920
+ ] }) }),
921
+ ie ? /* @__PURE__ */ e(
922
+ Ye,
923
+ {
924
+ open: h != null,
925
+ entry: h ? h.entry : _.current,
926
+ onSave: I,
927
+ onCancel: n,
928
+ onCreatePatient: B,
929
+ onRemove: (a) => {
930
+ V(a), n == null || n();
931
+ },
932
+ readOnly: P
933
+ }
934
+ ) : null
935
+ ] })
936
+ }
937
+ );
938
+ }
939
+ );
940
+ za.displayName = "WaitingListPanel";
941
+ function Ta({
942
+ kind: t,
943
+ count: c,
944
+ children: d
945
+ }) {
946
+ const { t: l } = ve("ui"), u = ce();
947
+ return /* @__PURE__ */ r(
948
+ "section",
949
+ {
950
+ "aria-labelledby": u,
951
+ "data-waiting-group": t,
952
+ className: "ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-sm)]",
953
+ children: [
954
+ /* @__PURE__ */ r(
955
+ "h3",
956
+ {
957
+ id: u,
958
+ className: "type-eyebrow ds:m-0 ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:text-start ds:text-[color:var(--muted-foreground)] ds:[&>svg]:size-3.5 ds:[&>svg]:shrink-0",
959
+ children: [
960
+ xa[t],
961
+ l(s(Na[t])),
962
+ /* @__PURE__ */ e(Pe, { size: "sm", variant: "neutral", "aria-label": String(c), children: c })
963
+ ]
964
+ }
965
+ ),
966
+ /* @__PURE__ */ e(
967
+ "ul",
968
+ {
969
+ role: "list",
970
+ className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0",
971
+ children: d
972
+ }
973
+ )
974
+ ]
975
+ }
976
+ );
977
+ }
978
+ export {
979
+ za as W
980
+ };
981
+ //# sourceMappingURL=calendar-waiting-list-panel-331vzAdl.js.map