@eka-care/medassist-widget 0.1.84 → 0.1.85

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.
@@ -1,85 +1,85 @@
1
- import { c as k, d as m, A as E, y as L, u as e, i as h, C as q, T as B, q as z, _ as te, j as ae, m as re, k as ne, l as ie, n as le, o as se, p as oe, S as ce, r as de, s as me, B as N, t as he } from "./medassist-widget.js";
1
+ import { c as _, d as h, A as L, y as E, u as e, i as p, C as R, T as A, q as z, _ as re, j as ne, k as ie, l as le, m as se, n as oe, o as ce, S as G, p as de, r as me, B as v, s as he } from "./medassist-widget.js";
2
2
  import { C as pe } from "./medassist-widget-check-BaHLRs-2.js";
3
- import { M as P } from "./medassist-widget-map-pin-Bx-5lPdC.js";
3
+ import { M as K } from "./medassist-widget-map-pin-Bx-5lPdC.js";
4
4
  import { C as ue, a as fe } from "./medassist-widget-chevron-right-CKYbGWbY.js";
5
5
  const xe = [
6
6
  ["path", { d: "M5 12h14", key: "1ays0h" }],
7
7
  ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
8
- ], ge = k("arrow-right", xe);
9
- const ye = [
8
+ ], J = _("arrow-right", xe);
9
+ const ge = [
10
10
  ["path", { d: "M12 6v6l4 2", key: "mmk7yg" }],
11
11
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
12
- ], be = k("clock", ye);
13
- const ve = [
12
+ ], ye = _("clock", ge);
13
+ const be = [
14
14
  ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
15
15
  ["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
16
16
  ["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
17
- ], we = k("ellipsis", ve);
18
- const Ne = [
17
+ ], ve = _("ellipsis", be);
18
+ const we = [
19
19
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
20
20
  ["path", { d: "M10 14 21 3", key: "gplh6r" }],
21
21
  ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
22
- ], ke = k("external-link", Ne);
23
- const Ce = [
22
+ ], Ne = _("external-link", we);
23
+ const ke = [
24
24
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
25
25
  ["path", { d: "M12 16v-4", key: "1dtifu" }],
26
26
  ["path", { d: "M12 8h.01", key: "e9boi3" }]
27
- ], _e = k("info", Ce);
28
- const Me = [
27
+ ], Ce = _("info", ke);
28
+ const _e = [
29
29
  ["path", { d: "m5 8 6 6", key: "1wu5hv" }],
30
30
  ["path", { d: "m4 14 6-6 2-3", key: "1k1g8d" }],
31
31
  ["path", { d: "M2 5h12", key: "or177f" }],
32
32
  ["path", { d: "M7 2h1", key: "1t2jsx" }],
33
33
  ["path", { d: "m22 22-5-10-5 10", key: "don7ne" }],
34
34
  ["path", { d: "M14 18h6", key: "1m8k6r" }]
35
- ], Se = k("languages", Me);
36
- function $e({
35
+ ], Me = _("languages", _e);
36
+ function Se({
37
37
  value: l,
38
38
  onValueChange: a,
39
39
  placeholder: d = "Select an option",
40
40
  className: u,
41
- triggerClassName: S,
42
- contentClassName: C,
41
+ triggerClassName: $,
42
+ contentClassName: M,
43
43
  disabled: s = !1,
44
- options: b = [],
44
+ options: w = [],
45
45
  size: I = "default",
46
- icon: $
46
+ icon: B
47
47
  }) {
48
- const [n, y] = m(!1), f = E(null), x = E(null), g = b.find((o) => o.value === l);
49
- L(() => {
50
- const o = (p) => {
51
- n && p.key === "Escape" && (y(!1), x.current?.focus());
48
+ const [n, y] = h(!1), m = L(null), x = L(null), g = w.find((o) => o.value === l);
49
+ E(() => {
50
+ const o = (f) => {
51
+ n && f.key === "Escape" && (y(!1), x.current?.focus());
52
52
  };
53
53
  return document.addEventListener("keydown", o), () => {
54
54
  document.removeEventListener("keydown", o);
55
55
  };
56
56
  }, [n]);
57
- const v = (o) => {
57
+ const N = (o) => {
58
58
  a?.(o), y(!1), x.current?.focus();
59
- }, _ = () => {
59
+ }, b = () => {
60
60
  s || y(!n);
61
61
  };
62
- return /* @__PURE__ */ e("div", { className: h("relative w-full", u), children: [
62
+ return /* @__PURE__ */ e("div", { className: p("relative w-full", u), children: [
63
63
  /* @__PURE__ */ e(
64
64
  "button",
65
65
  {
66
66
  ref: x,
67
67
  type: "button",
68
- onClick: _,
68
+ onClick: b,
69
69
  disabled: s,
70
- className: h(
70
+ className: p(
71
71
  'border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*="text-"])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 overflow-hidden',
72
72
  I === "default" ? "min-h-9" : "min-h-8",
73
- S
73
+ $
74
74
  ),
75
75
  "aria-expanded": n,
76
76
  "aria-haspopup": "listbox",
77
77
  children: [
78
- $,
78
+ B,
79
79
  /* @__PURE__ */ e(
80
80
  "span",
81
81
  {
82
- className: h(
82
+ className: p(
83
83
  "flex-1 text-left min-w-0 overflow-hidden break-words line-clamp-2",
84
84
  !g && "text-muted-foreground"
85
85
  ),
@@ -87,9 +87,9 @@ function $e({
87
87
  }
88
88
  ),
89
89
  /* @__PURE__ */ e(
90
- q,
90
+ R,
91
91
  {
92
- className: h(
92
+ className: p(
93
93
  "size-4 opacity-50 pointer-events-none shrink-0 transition-transform duration-200",
94
94
  n && "rotate-180"
95
95
  )
@@ -101,35 +101,35 @@ function $e({
101
101
  n && /* @__PURE__ */ e(
102
102
  "div",
103
103
  {
104
- ref: f,
105
- className: h(
104
+ ref: m,
105
+ className: p(
106
106
  "bg-surface text-foreground animate-in fade-in-0 zoom-in-95 slide-in-from-top-2 relative z-50 max-h-[136px] min-w-[8rem] w-full overflow-x-hidden overflow-y-auto overscroll-contain rounded-md shadow-md mt-1",
107
- C
107
+ M
108
108
  ),
109
109
  role: "listbox",
110
- children: /* @__PURE__ */ e("div", { className: "p-1", children: b.length === 0 ? /* @__PURE__ */ e("div", { className: "px-3 py-2 text-sm text-muted-foreground text-center", children: "No options available" }) : b.map((o) => {
111
- const p = o.value === l;
110
+ children: /* @__PURE__ */ e("div", { className: "p-1", children: w.length === 0 ? /* @__PURE__ */ e("div", { className: "px-3 py-2 text-sm text-muted-foreground text-center", children: "No options available" }) : w.map((o) => {
111
+ const f = o.value === l;
112
112
  return /* @__PURE__ */ e(
113
113
  "div",
114
114
  {
115
- onClick: () => v(o.value),
116
- className: h(
115
+ onClick: () => N(o.value),
116
+ className: p(
117
117
  "relative flex w-full cursor-pointer items-center gap-1 rounded-sm py-2.5 px-3 text-sm outline-none select-none transition-colors duration-150",
118
118
  "hover:bg-accent hover:text-accent-foreground",
119
119
  "focus-visible:bg-accent focus-visible:text-accent-foreground",
120
120
  "active:bg-accent/80",
121
- p && "bg-accent/50 text-foreground",
121
+ f && "bg-accent/50 text-foreground",
122
122
  s && "pointer-events-none opacity-50 cursor-not-allowed"
123
123
  ),
124
124
  role: "option",
125
- "aria-selected": p,
125
+ "aria-selected": f,
126
126
  tabIndex: s ? -1 : 0,
127
- onKeyDown: (w) => {
128
- (w.key === "Enter" || w.key === " ") && (w.preventDefault(), s || v(o.value));
127
+ onKeyDown: (k) => {
128
+ (k.key === "Enter" || k.key === " ") && (k.preventDefault(), s || N(o.value));
129
129
  },
130
130
  children: [
131
131
  /* @__PURE__ */ e("span", { className: "flex-1 text-left min-w-0 break-words line-clamp-2", children: o.label }),
132
- p && /* @__PURE__ */ e("span", { className: "absolute right-3 flex size-4 items-center justify-center shrink-0 pointer-events-none", children: /* @__PURE__ */ e(pe, { className: "size-4 text-foreground" }) })
132
+ f && /* @__PURE__ */ e("span", { className: "absolute right-3 flex size-4 items-center justify-center shrink-0 pointer-events-none", children: /* @__PURE__ */ e(pe, { className: "size-4 text-foreground" }) })
133
133
  ]
134
134
  },
135
135
  o.value
@@ -139,93 +139,90 @@ function $e({
139
139
  )
140
140
  ] });
141
141
  }
142
- function Le({ doctor: l, doctorDetails: a, onSelect: d, disabled: u, isActive: S = !0 }) {
143
- const C = B(() => {
142
+ function ze({ doctor: l, doctorDetails: a, onSelect: d, disabled: u, isActive: $ = !0 }) {
143
+ const M = A(() => {
144
144
  if (a?.hospitals?.[0]?.hospital_id)
145
145
  return a?.hospitals?.[0]?.hospital_id;
146
- }, [a?.hospitals]), [s, b] = m(C), [I, $] = m(!1), [n, y] = m(null), [f, x] = m(null), [g, v] = m(0), [_, o] = m(!1), [p, w] = m(!1), [M, R] = m(!1), [T, F] = m(!1), [j, G] = m(!1), O = E(!1), H = E(null);
147
- L(() => {
148
- b(C);
149
- }, [C]);
150
- const r = l.availability ?? [], K = z(async () => {
151
- if (!M && (w(!0), !r.length && d && a)) {
152
- R(!0);
146
+ }, [a?.hospitals]), [s, w] = h(M), [I, B] = h(!1), [n, y] = h(null), [m, x] = h(null), [g, N] = h(0), [b, o] = h(!1), [f, k] = h(!1), [S, T] = h(!1), [j, F] = h(!1), [O, Q] = h(!1), V = L(!1), H = L(null);
147
+ E(() => {
148
+ w(M);
149
+ }, [M]);
150
+ const r = l.availability ?? [], U = z(async () => {
151
+ if (!S && (k(!0), !r.length && d && a)) {
152
+ T(!0);
153
153
  try {
154
154
  await d({ ...l, hospital_id: s });
155
155
  } finally {
156
- R(!1);
156
+ T(!1);
157
157
  }
158
158
  }
159
- }, [p, M, d, a, r.length, s]), J = z(
159
+ }, [f, S, d, a, r.length, s]), W = z(
160
160
  (t) => {
161
- a && (b(t), y(null), x(null), v(0), O.current = !1, d?.({ ...l, hospital_id: t }));
161
+ a && (w(t), y(null), x(null), N(0), V.current = !1, d?.({ ...l, hospital_id: t }));
162
162
  },
163
163
  [l, d, a]
164
164
  );
165
- L(() => {
166
- S || w(!1);
167
- }, [S]), L(() => {
168
- if (!p || !r.length || O.current) return;
169
- O.current = !0;
165
+ E(() => {
166
+ $ || k(!1);
167
+ }, [$]), E(() => {
168
+ if (!f || !r.length || V.current) return;
169
+ V.current = !0;
170
170
  const t = l.preferred_date || r[0]?.date;
171
171
  t && (y((c) => c ?? t), r.find((c) => c.date === t)?.slots?.length || d?.({ ...l, hospital_id: s, preferred_date: t }));
172
- }, [r, p]);
173
- const V = B(
172
+ }, [r, f]);
173
+ const q = A(
174
174
  () => r.find((t) => t.date === n)?.slots ?? [],
175
175
  [r, n]
176
176
  );
177
- te(() => {
177
+ re(() => {
178
178
  const t = H.current;
179
179
  t && (t.scrollTop = 0, F(t.scrollHeight > t.clientHeight + 2));
180
- }, [n, V.length]);
181
- const Q = z(() => {
180
+ }, [n, q.length]);
181
+ const X = z(() => {
182
182
  const t = H.current;
183
183
  t && F(t.scrollTop + t.clientHeight < t.scrollHeight - 4);
184
- }, []), U = () => {
184
+ }, []), Y = () => {
185
185
  H.current?.scrollBy({ top: 120, behavior: "smooth" });
186
- }, W = B(() => {
186
+ }, Z = A(() => {
187
187
  if (!r.length) return [];
188
188
  const t = Math.min(g + 3, r.length);
189
189
  return r.slice(g, t).map((i) => {
190
190
  if (i.date)
191
- return { ...i, ...ae(i.date) };
191
+ return { ...i, ...ne(i.date) };
192
192
  });
193
- }, [r, g]), X = g > 0, Y = g < Math.max(0, (r || []).length - 3), Z = z(
193
+ }, [r, g]), D = g > 0, ee = g < Math.max(0, (r || []).length - 3), te = z(
194
194
  async (t) => {
195
195
  y(t), x(null);
196
196
  const i = r.find((c) => c.date === t);
197
197
  if (!(i?.slots?.length || Array.isArray(i?.slots) && i?.slots.length === 0)) {
198
- $(!0);
198
+ B(!0);
199
199
  try {
200
200
  await d?.({ ...l, hospital_id: s, preferred_date: t });
201
201
  } catch {
202
202
  } finally {
203
- $(!1);
203
+ B(!1);
204
204
  }
205
205
  }
206
206
  },
207
207
  [l, s, d, r]
208
- ), A = B(() => {
209
- const t = r.find((i) => i.date === n);
210
- return re(l.cta, t?.cta);
211
- }, [r, n, l.cta]), D = () => {
212
- if (_) return;
213
- const t = A?.text, i = !!t;
214
- if (!i && (!f || !n)) return;
208
+ ), C = A(() => r.find((i) => i.date === n)?.cta ?? l.cta, [r, n, l.cta]), P = () => {
209
+ if (b) return;
210
+ const t = C?.text, i = !!t;
211
+ if (!i && (!m || !n)) return;
215
212
  o(!0);
216
- const c = n && f ? ` on ${n} at ${f}.` : "";
213
+ const c = n && m ? ` on ${n} at ${m}.` : "";
217
214
  d?.(
218
- { ...l, hospital_id: s, preferred_date: n ?? void 0, preferred_slot_time: f ?? void 0 },
215
+ { ...l, hospital_id: s, preferred_date: n ?? void 0, preferred_slot_time: m ?? void 0 },
219
216
  `${t || `I want to book an appointment with Dr. ${a?.name}`}${c}`,
220
- A?.tool_result,
217
+ C?.tool_result,
221
218
  !i
222
219
  );
223
220
  };
224
221
  return a ? /* @__PURE__ */ e(he, { className: "max-w-md h-full rounded-xl border border-black-200 dark:border-white-200 shadow-none p-0 bg-elicitationBg overflow-hidden", children: [
225
- /* @__PURE__ */ e(ne, { className: "flex flex-row items-center gap-3 bg-primary/[20%] rounded-t-xl p-2 border-b border-border-subtle overflow-hidden", children: [
226
- /* @__PURE__ */ e(ie, { className: "h-12 w-12 ring-2 ring-primary/20 flex-shrink-0", children: [
227
- a.profile_pic && /* @__PURE__ */ e(le, { src: a.profile_pic, alt: `${a.name} profile photo`, crossOrigin: "anonymous" }),
228
- /* @__PURE__ */ e(se, { className: "bg-secondary text-primary", children: oe(a.name) })
222
+ /* @__PURE__ */ e(ie, { className: "flex flex-row items-center gap-3 bg-primary/[20%] rounded-t-xl p-2 border-b border-border-subtle overflow-hidden", children: [
223
+ /* @__PURE__ */ e(le, { className: "h-12 w-12 ring-2 ring-primary/20 flex-shrink-0", children: [
224
+ a.profile_pic && /* @__PURE__ */ e(se, { src: a.profile_pic, alt: `${a.name} profile photo`, crossOrigin: "anonymous" }),
225
+ /* @__PURE__ */ e(oe, { className: "bg-secondary text-primary", children: ce(a.name) })
229
226
  ] }),
230
227
  /* @__PURE__ */ e("div", { className: "min-w-0", children: [
231
228
  /* @__PURE__ */ e("h3", { className: "font-bold text-slate-900 leading-tight", style: { fontSize: "0.95rem" }, children: [
@@ -238,7 +235,7 @@ function Le({ doctor: l, doctorDetails: a, onSelect: d, disabled: u, isActive: S
238
235
  rel: "noreferrer",
239
236
  "aria-label": "View profile",
240
237
  className: "inline-block align-middle ml-2 text-primary hover:text-primary/70 transition-colors",
241
- children: /* @__PURE__ */ e(ke, { className: "h-3.5 w-3.5 inline", "aria-hidden": !0 })
238
+ children: /* @__PURE__ */ e(Ne, { className: "h-3.5 w-3.5 inline", "aria-hidden": !0 })
242
239
  }
243
240
  )
244
241
  ] }),
@@ -249,7 +246,7 @@ function Le({ doctor: l, doctorDetails: a, onSelect: d, disabled: u, isActive: S
249
246
  title: `${a.specialty}${a.experience ? ` • ${a.experience}` : ""}`,
250
247
  children: [
251
248
  a.specialty,
252
- a.experience && /* @__PURE__ */ e(ce, { children: [
249
+ a.experience && /* @__PURE__ */ e(G, { children: [
253
250
  " • ",
254
251
  a.experience
255
252
  ] })
@@ -261,37 +258,37 @@ function Le({ doctor: l, doctorDetails: a, onSelect: d, disabled: u, isActive: S
261
258
  /* @__PURE__ */ e(de, { className: "px-3 py-2", children: [
262
259
  /* @__PURE__ */ e("div", { className: "grid gap-1 pb-2 border-b border-border-subtle", children: [
263
260
  a.timings && /* @__PURE__ */ e("div", { className: "flex items-start gap-2 min-w-0", children: [
264
- /* @__PURE__ */ e(be, { className: "h-3.5 w-3.5 text-primary mt-0.5 flex-shrink-0", "aria-hidden": !0 }),
261
+ /* @__PURE__ */ e(ye, { className: "h-3.5 w-3.5 text-primary mt-0.5 flex-shrink-0", "aria-hidden": !0 }),
265
262
  /* @__PURE__ */ e("span", { className: "text-text-secondary text-xs line-clamp-1 min-w-0", children: a.timings })
266
263
  ] }),
267
264
  a.languages && /* @__PURE__ */ e("div", { className: "flex items-center gap-2 min-w-0", children: [
268
- /* @__PURE__ */ e(Se, { className: "h-3.5 w-3.5 text-primary flex-shrink-0", "aria-hidden": !0 }),
265
+ /* @__PURE__ */ e(Me, { className: "h-3.5 w-3.5 text-primary flex-shrink-0", "aria-hidden": !0 }),
269
266
  /* @__PURE__ */ e("span", { className: "text-text-secondary text-xs line-clamp-1 min-w-0", children: a.languages })
270
267
  ] }),
271
268
  a.hospitals?.length > 1 && s ? /* @__PURE__ */ e(
272
- $e,
269
+ Se,
273
270
  {
274
271
  options: a.hospitals.map((t) => ({ value: t.hospital_id, label: t.name || "" })),
275
272
  placeholder: "Select Hospital",
276
273
  disabled: u,
277
- onValueChange: J,
274
+ onValueChange: W,
278
275
  value: s,
279
276
  triggerClassName: "h-8 text-xs px-3 rounded-lg border-border text-primary font-medium",
280
- icon: /* @__PURE__ */ e(P, { className: "h-3.5 w-3.5 text-primary flex-shrink-0", "aria-hidden": !0 })
277
+ icon: /* @__PURE__ */ e(K, { className: "h-3.5 w-3.5 text-primary flex-shrink-0", "aria-hidden": !0 })
281
278
  }
282
279
  ) : /* @__PURE__ */ e("div", { className: "flex items-center gap-1.5 min-w-0", children: [
283
- /* @__PURE__ */ e(P, { className: "h-3.5 w-3.5 text-primary flex-shrink-0", "aria-hidden": !0 }),
280
+ /* @__PURE__ */ e(K, { className: "h-3.5 w-3.5 text-primary flex-shrink-0", "aria-hidden": !0 }),
284
281
  /* @__PURE__ */ e("span", { className: "text-text-secondary text-xs line-clamp-1 min-w-0", children: a.hospitals?.[0]?.name || "" })
285
282
  ] }),
286
283
  a.info && /* @__PURE__ */ e("div", { className: "flex items-start gap-2 min-w-0", children: [
287
- /* @__PURE__ */ e(_e, { className: "h-3.5 w-3.5 text-primary flex-shrink-0", "aria-hidden": !0 }),
284
+ /* @__PURE__ */ e(Ce, { className: "h-3.5 w-3.5 text-primary flex-shrink-0", "aria-hidden": !0 }),
288
285
  /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: [
289
286
  /* @__PURE__ */ e(
290
287
  "div",
291
288
  {
292
- className: h(
289
+ className: p(
293
290
  "text-text-secondary text-xs leading-snug prose prose-sm max-w-none prose-strong:font-semibold prose-p:my-0 break-words overflow-hidden",
294
- !j && "line-clamp-1"
291
+ !O && "line-clamp-1"
295
292
  ),
296
293
  children: /* @__PURE__ */ e(me, { children: a.info })
297
294
  }
@@ -300,94 +297,94 @@ function Le({ doctor: l, doctorDetails: a, onSelect: d, disabled: u, isActive: S
300
297
  "button",
301
298
  {
302
299
  type: "button",
303
- onClick: () => G((t) => !t),
304
- "aria-expanded": j,
300
+ onClick: () => Q((t) => !t),
301
+ "aria-expanded": O,
305
302
  className: "mt-0.5 flex items-center gap-1 text-[11px] font-semibold text-primary hover:text-primary/80 transition-colors",
306
303
  children: [
307
- /* @__PURE__ */ e(we, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
308
- j ? "View less" : "View more"
304
+ /* @__PURE__ */ e(ve, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
305
+ O ? "View less" : "View more"
309
306
  ]
310
307
  }
311
308
  )
312
309
  ] })
313
310
  ] })
314
311
  ] }),
315
- p ? M ? /* @__PURE__ */ e("p", { className: "pt-3 text-sm text-text-secondary text-center", children: "Loading..." }) : r.length > 0 ? /* @__PURE__ */ e("div", { className: "pt-3", children: [
312
+ f ? S ? /* @__PURE__ */ e("p", { className: "pt-3 text-sm text-text-secondary text-center", children: "Loading..." }) : r.length > 0 ? /* @__PURE__ */ e("div", { className: "pt-3", children: [
316
313
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: [
317
314
  /* @__PURE__ */ e(
318
- N,
315
+ v,
319
316
  {
320
317
  type: "button",
321
318
  variant: "outline",
322
319
  size: "icon",
323
320
  onClick: () => {
324
- v((t) => Math.max(0, t - 3)), x(null);
321
+ N((t) => Math.max(0, t - 3)), x(null);
325
322
  },
326
- disabled: u || !X,
323
+ disabled: u || !D,
327
324
  "aria-label": "Previous 3 days",
328
325
  className: "h-8 w-8 flex-shrink-0 rounded-md border-primary/20 bg-surface text-primary hover:bg-surface-secondary disabled:opacity-50",
329
326
  children: /* @__PURE__ */ e(ue, { className: "h-4 w-4" })
330
327
  }
331
328
  ),
332
- /* @__PURE__ */ e("div", { className: "flex-1 grid grid-cols-3 gap-1 min-w-0", children: W.map((t, i) => {
329
+ /* @__PURE__ */ e("div", { className: "flex-1 grid grid-cols-3 gap-1 min-w-0", children: Z.map((t, i) => {
333
330
  if (!t || !t.date) return null;
334
- const c = n === t.date, ee = (t?.slots || []).length > 0;
331
+ const c = n === t.date, ae = (t?.slots || []).length > 0;
335
332
  return /* @__PURE__ */ e(
336
- N,
333
+ v,
337
334
  {
338
335
  type: "button",
339
336
  variant: "outline",
340
- onClick: () => t.date && Z(t.date),
337
+ onClick: () => t.date && te(t.date),
341
338
  disabled: u,
342
339
  "aria-current": c ? "date" : void 0,
343
- className: h(
340
+ className: p(
344
341
  "flex flex-col items-center justify-center h-12 rounded-lg border-2 p-2 gap-0.5 min-w-0 transition-all",
345
- c ? "border-primary border-2 ring-2 ring-primary/20 bg-primary/[20%] shadow-sm hover:text-accent-foreground" : ee ? "border-primary/30 bg-elicitationBg hover:bg-primary/10 hover:text-accent-foreground hover:border-primary/40" : "border-border bg-elicitationBg opacity-60 hover:bg-primary/10 hover:text-accent-foreground hover:border-primary/30"
342
+ c ? "border-primary border-2 ring-2 ring-primary/20 bg-primary/[20%] shadow-sm hover:text-accent-foreground" : ae ? "border-primary/30 bg-elicitationBg hover:bg-primary/10 hover:text-accent-foreground hover:border-primary/40" : "border-border bg-elicitationBg opacity-60 hover:bg-primary/10 hover:text-accent-foreground hover:border-primary/30"
346
343
  ),
347
344
  children: [
348
- /* @__PURE__ */ e("span", { className: h("text-[10px] tracking-wide w-full text-center font-medium"), children: t.weekday }),
349
- /* @__PURE__ */ e("span", { className: h("text-xs font-bold w-full text-center"), children: t.dayNum })
345
+ /* @__PURE__ */ e("span", { className: p("text-[10px] tracking-wide w-full text-center font-medium"), children: t.weekday }),
346
+ /* @__PURE__ */ e("span", { className: p("text-xs font-bold w-full text-center"), children: t.dayNum })
350
347
  ]
351
348
  },
352
349
  `${t.date}-${i}`
353
350
  );
354
351
  }) }),
355
352
  /* @__PURE__ */ e(
356
- N,
353
+ v,
357
354
  {
358
355
  type: "button",
359
356
  variant: "outline",
360
357
  size: "icon",
361
358
  onClick: () => {
362
- v((t) => Math.min(Math.max(0, r.length - 3), t + 3)), x(null);
359
+ N((t) => Math.min(Math.max(0, r.length - 3), t + 3)), x(null);
363
360
  },
364
- disabled: u || !Y,
361
+ disabled: u || !ee,
365
362
  "aria-label": "Next 3 days",
366
363
  className: "h-8 w-8 flex-shrink-0 rounded-md border-primary/20 bg-surface text-primary hover:bg-surface-secondary disabled:opacity-50",
367
364
  children: /* @__PURE__ */ e(fe, { className: "h-4 w-4" })
368
365
  }
369
366
  )
370
367
  ] }),
371
- n && /* @__PURE__ */ e("div", { className: "mt-2", children: V.length > 0 ? /* @__PURE__ */ e("div", { className: "relative", children: [
368
+ n && /* @__PURE__ */ e("div", { className: "mt-2", children: q.length > 0 ? /* @__PURE__ */ e("div", { className: "relative", children: [
372
369
  /* @__PURE__ */ e(
373
370
  "div",
374
371
  {
375
372
  ref: H,
376
- onScroll: Q,
373
+ onScroll: X,
377
374
  className: "grid grid-cols-3 gap-2 overflow-y-auto overscroll-contain",
378
375
  style: { maxHeight: "108px" },
379
- children: V.map((t, i) => {
376
+ children: q.map((t, i) => {
380
377
  if (!t) return null;
381
- const c = f === t;
378
+ const c = m === t;
382
379
  return /* @__PURE__ */ e(
383
- N,
380
+ v,
384
381
  {
385
382
  type: "button",
386
383
  variant: "outline",
387
384
  onClick: () => x(t),
388
385
  "aria-pressed": c,
389
386
  disabled: u,
390
- className: h(
387
+ className: p(
391
388
  "h-9 rounded-lg px-2 text-xs font-medium transition-all",
392
389
  c ? "border-primary bg-primary/20 text-primary shadow-sm hover:bg-primary/10" : "border-border bg-elicitationBg text-text-primary hover:bg-primary/10 hover:border-primary/30"
393
390
  ),
@@ -398,44 +395,60 @@ function Le({ doctor: l, doctorDetails: a, onSelect: d, disabled: u, isActive: S
398
395
  })
399
396
  }
400
397
  ),
401
- T && /* @__PURE__ */ e("div", { className: "absolute bottom-0 left-0 right-0 h-12 bg-gradient-to-t from-elicitationBg via-elicitationBg to-transparent pointer-events-none flex items-end justify-center pb-1", children: /* @__PURE__ */ e(
398
+ j && /* @__PURE__ */ e("div", { className: "absolute bottom-0 left-0 right-0 h-12 bg-gradient-to-t from-elicitationBg via-elicitationBg to-transparent pointer-events-none flex items-end justify-center pb-1", children: /* @__PURE__ */ e(
402
399
  "button",
403
400
  {
404
401
  type: "button",
405
- onClick: U,
402
+ onClick: Y,
406
403
  className: "pointer-events-auto flex items-center gap-1 text-xs font-semibold text-primary hover:text-primary/80 transition-colors",
407
404
  children: [
408
- /* @__PURE__ */ e(q, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
405
+ /* @__PURE__ */ e(R, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
409
406
  "More slots"
410
407
  ]
411
408
  }
412
409
  ) })
413
410
  ] }) : I ? /* @__PURE__ */ e("p", { className: "text-sm text-text-secondary px-1", children: "Fetching slots..." }) : /* @__PURE__ */ e("p", { className: "text-sm text-text-secondary px-1", children: "No slots available." }) }),
414
411
  /* @__PURE__ */ e(
415
- N,
412
+ v,
416
413
  {
417
414
  type: "button",
418
- onClick: D,
419
- disabled: u || _ || !A?.text && !f,
420
- "aria-disabled": !f || _,
421
- className: `w-full h-10 gap-2 bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-60 shadow-sm font-semibold ${T ? "" : " mt-2"}`,
415
+ onClick: P,
416
+ disabled: u || b || !C?.text && !m,
417
+ "aria-disabled": !m || b,
418
+ className: `w-full h-10 gap-2 bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-60 shadow-sm font-semibold ${j ? "" : " mt-2"}`,
422
419
  children: [
423
- A?.title || "Book appointment",
424
- /* @__PURE__ */ e(ge, { className: "h-4 w-4", "aria-hidden": !0 })
420
+ C?.title || "Book appointment",
421
+ /* @__PURE__ */ e(J, { className: "h-4 w-4", "aria-hidden": !0 })
425
422
  ]
426
423
  }
427
424
  )
428
- ] }) : /* @__PURE__ */ e("p", { className: "pt-3 text-sm text-text-secondary text-center", children: "No slots available." }) : /* @__PURE__ */ e("div", { className: "pt-3", children: /* @__PURE__ */ e(
429
- N,
425
+ ] }) : /* @__PURE__ */ e(G, { children: [
426
+ /* @__PURE__ */ e("p", { className: "pt-3 text-sm text-text-secondary text-center", children: "No slots available." }),
427
+ /* @__PURE__ */ e(
428
+ v,
429
+ {
430
+ type: "button",
431
+ onClick: P,
432
+ disabled: u || b || !C?.text && !m,
433
+ "aria-disabled": !m || b,
434
+ className: `w-full h-10 gap-2 bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-60 shadow-sm font-semibold ${j ? "" : " mt-2"}`,
435
+ children: [
436
+ C?.title || "Book appointment",
437
+ /* @__PURE__ */ e(J, { className: "h-4 w-4", "aria-hidden": !0 })
438
+ ]
439
+ }
440
+ )
441
+ ] }) : /* @__PURE__ */ e("div", { className: "pt-3", children: /* @__PURE__ */ e(
442
+ v,
430
443
  {
431
444
  type: "button",
432
445
  variant: "outline",
433
- onClick: K,
434
- disabled: u || M,
446
+ onClick: U,
447
+ disabled: u || S,
435
448
  className: "w-full h-8 gap-1.5 text-xs border-primary/40 text-primary hover:bg-primary/10 disabled:opacity-60 font-medium rounded-lg",
436
449
  children: [
437
- M ? "Loading..." : "Show available slots",
438
- /* @__PURE__ */ e(q, { className: "h-3.5 w-3.5", "aria-hidden": !0 })
450
+ S ? "Loading..." : "Show available slots",
451
+ /* @__PURE__ */ e(R, { className: "h-3.5 w-3.5", "aria-hidden": !0 })
439
452
  ]
440
453
  }
441
454
  ) })
@@ -443,5 +456,5 @@ function Le({ doctor: l, doctorDetails: a, onSelect: d, disabled: u, isActive: S
443
456
  ] }) : null;
444
457
  }
445
458
  export {
446
- Le as DoctorCard
459
+ ze as DoctorCard
447
460
  };
@@ -1,4 +1,4 @@
1
- import { c as m, A as u, u as e, t as h, r as f, S as p, B as g } from "./medassist-widget.js";
1
+ import { c as m, A as u, u as e, s as h, p as f, S as p, B as g } from "./medassist-widget.js";
2
2
  const x = [
3
3
  [
4
4
  "path",