@eka-care/medassist-widget 0.1.83-2 → 0.1.84

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