@levo-so/studio 0.3.20 → 0.3.22

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 (69) hide show
  1. package/BillingStep-ioR7mSo5.js +249 -0
  2. package/BookingCard-DEkBXh7O.js +646 -0
  3. package/DateTimeWidget-B-dajfHj.js +253 -0
  4. package/{EntryCard-9yv0KJTB.js → EntryCard-CZfljZAY.js} +4 -4
  5. package/{KBChatWidget-D39Z3HIl.js → KBChatWidget-BXRRgelS.js} +1 -1
  6. package/{LoginCard-D9vEC_g0.js → LoginCard-BVjeN1J0.js} +3 -3
  7. package/{LoginForm-kI_b_7Tc.js → LoginForm-DQVwLQCx.js} +19 -19
  8. package/{LoginModal-C-9BhmoO.js → LoginModal-C6TdAh-0.js} +5 -6
  9. package/{MessageCard-Nsxr98n6.js → MessageCard-B5MbVDJ8.js} +2 -2
  10. package/{MessageFooter-K4Zd_eFO.js → MessageFooter-DrlKXE9a.js} +1 -2
  11. package/{PendingApprovalCard-CzoBgYNy.js → PendingApprovalCard-5iFAeE1s.js} +3 -3
  12. package/{PhoneWidget-BtMMfGLu.js → PhoneWidget-B4KHlFjT.js} +6 -7
  13. package/{Popover-Iis-qOn1.js → Popover-y8XkbYNh.js} +7 -7
  14. package/{PopupBody-BI-MJqmd-B3ltSYMP.js → PopupBody-DWM55Zh5-DuOPsCAn.js} +53 -55
  15. package/PopupDialog-DwAAJ8JS-9xm5jrXW.js +261 -0
  16. package/PopupRenderer-BVtV4b9I-BdPryfLY.js +208 -0
  17. package/{ProfileCard-Chg20HBa.js → ProfileCard-WgFT-T4U.js} +5 -5
  18. package/{RichTextWidget-C3Y-0pNy.js → RichTextWidget-DKYm1cSW.js} +120 -123
  19. package/{Spinner-D5spB_Mv.js → Spinner-LdYfm4S7.js} +1 -1
  20. package/{VerifyButton-BwTbzSwS.js → VerifyButton-CNq78zG4.js} +5 -7
  21. package/collection.d.ts +9 -1
  22. package/collection.js +1 -1
  23. package/dialog-CU5nHKc5.js +119 -0
  24. package/dist-IMRD6dob.js +3858 -0
  25. package/index.js +3280 -2848
  26. package/{inlineRteTheme-BOAno9MG.js → inlineRteTheme-DFg69bqP.js} +50 -37
  27. package/{kbChat-zXbn56Zb.js → kbChat-eFsau7hG.js} +2 -2
  28. package/package.json +42 -43
  29. package/{pillChrome-QDjBETmP.js → pillChrome-Dy3ApFI5.js} +5 -5
  30. package/price-BUDkN5Me.js +823 -0
  31. package/script.esm-uVCZU25S.js +62 -0
  32. package/studio.css +1 -1
  33. package/themeMapping-DH_NoXK8-H-EHXbBt.js +156 -0
  34. package/useCheckout-gscmzFLD.js +179 -0
  35. package/useLogin-BYVekOp9.js +237 -0
  36. package/AuthProvider-B5NfFwbG.js +0 -118
  37. package/BillingStep-BTDOMFHV.js +0 -181
  38. package/Button-DXLWW3dp.js +0 -504
  39. package/CollectionField-BZmxRB5D.js +0 -270
  40. package/CollectionInput-DyNbxIZ8.js +0 -147
  41. package/DateTimeWidget-Bt1UcCnx.js +0 -255
  42. package/Dialog-CPE8yUqK.js +0 -130
  43. package/ModalManager-CzH36UIk.js +0 -32
  44. package/PopupRenderer-D66Gx63H-ChI4WBer.js +0 -389
  45. package/RteThemeProvider-owl5oajj.js +0 -20
  46. package/ThemeProvider-CqPHzkW9.js +0 -116
  47. package/Tooltip-DHU1QD-n.js +0 -67
  48. package/authentication-BXQbxiPP.js +0 -36
  49. package/bookingCard-g0n3ksiC.js +0 -605
  50. package/createThemeExtension-C0PSYy0J.js +0 -15
  51. package/dialog-8LH_ihs4.js +0 -92
  52. package/dist-Dijjo-5m.js +0 -3794
  53. package/generateRadiusScale-RROt8ppa.js +0 -71
  54. package/inlineCollectionTheme-uhBXoF1F.js +0 -19
  55. package/popupState-JmpeKzgM-UECLsSbL.js +0 -100
  56. package/rteTheme.cssm-W4gTOijw.js +0 -4
  57. package/theme.cssm-Czj9sF4X.js +0 -4
  58. package/themeMapping-Bi9Rcr5G-C7UXWE6o.js +0 -61
  59. package/useCheckout-DFalmfEQ.js +0 -161
  60. package/useLogin-CfnGrLdO.js +0 -127
  61. package/usePopupRedirect-CAAdcpaW-DdME0F7f.js +0 -82
  62. /package/{Beams-WJN38XSv.js → Beams-KsU_ixpY.js} +0 -0
  63. /package/{Dots-DggLz5I7.js → Dots-C_ja_PPu.js} +0 -0
  64. /package/{Gradient-BSWJAu0a.js → Gradient-CDGFLaA-.js} +0 -0
  65. /package/{Grid-BFKl0MUt.js → Grid-C22rTkrs.js} +0 -0
  66. /package/{Waves-BPEgTYoO.js → Waves-Cl5rKcFJ.js} +0 -0
  67. /package/{card-5ooLmYSr.js → card-BIebVDA0.js} +0 -0
  68. /package/{cn-B6c1DjO_.js → cn-CzJDhklM.js} +0 -0
  69. /package/{fontSize-B-ba6pvx.js → fontSize-DowUyWe-.js} +0 -0
@@ -0,0 +1,646 @@
1
+ "use client";
2
+ import { D as e, n as t } from "./price-BUDkN5Me.js";
3
+ import { t as n } from "./useCheckout-gscmzFLD.js";
4
+ import { BillingStep as r } from "./BillingStep-ioR7mSo5.js";
5
+ import { c as i } from "react/compiler-runtime";
6
+ import { errorHandler as a, useLevo as o } from "@levo-so/react";
7
+ import { useEffect as s, useRef as c, useState as l } from "react";
8
+ import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
9
+ import { Calendar as p, CheckCircle2 as m, Clock as h, CreditCard as g, Download as _, Loader2 as v, Pencil as y, RefreshCw as b, ShieldCheck as x, Ticket as S, XCircle as C } from "lucide-react";
10
+ import w from "clsx";
11
+ import T from "dayjs";
12
+ //#region ../../libraries/react-collection/dist/lib/CollectionFormRenderer/booking/BookingCard.cssm.js
13
+ var E = "jsbo1i3", D = "jsbo1i8", O = "jsbo1i9", k = "jsbo1ia", A = "jsbo1ib", j = "jsbo1if", M = "jsbo1ig", ee = "jsbo1ih", te = {
14
+ cashfree: "Cashfree",
15
+ razorpay: "Razorpay",
16
+ stripe: "Stripe"
17
+ }, N = (e) => {
18
+ let t = i(24), { items: n, textSizeClass: r } = e, a = r === void 0 ? E : r, [o, u] = l(!1), p = c(null), m, h;
19
+ if (t[0] === o ? (m = t[1], h = t[2]) : (m = () => {
20
+ if (!o) return;
21
+ let e = (e) => {
22
+ p.current && !p.current.contains(e.target) && u(!1);
23
+ };
24
+ return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
25
+ }, h = [o], t[0] = o, t[1] = m, t[2] = h), s(m, h), n.length === 0) {
26
+ let e;
27
+ t[3] === a ? e = t[4] : (e = w(D, a), t[3] = a, t[4] = e);
28
+ let n;
29
+ return t[5] === e ? n = t[6] : (n = /* @__PURE__ */ d("span", {
30
+ className: e,
31
+ children: "-"
32
+ }), t[5] = e, t[6] = n), n;
33
+ }
34
+ let g = String(n[0] ?? "-"), _ = n.length - 1, v, y;
35
+ t[7] === Symbol.for("react.memo_cache_sentinel") ? (v = () => u(!0), y = () => u(!1), t[7] = v, t[8] = y) : (v = t[7], y = t[8]);
36
+ let b;
37
+ t[9] === Symbol.for("react.memo_cache_sentinel") ? (b = () => u(F), t[9] = b) : b = t[9];
38
+ let x;
39
+ t[10] === a ? x = t[11] : (x = w(A, a), t[10] = a, t[11] = x);
40
+ let S;
41
+ t[12] === _ ? S = t[13] : (S = _ > 0 && /* @__PURE__ */ f("span", {
42
+ className: "jsbo1ic",
43
+ children: [
44
+ "+",
45
+ _,
46
+ " more"
47
+ ]
48
+ }), t[12] = _, t[13] = S);
49
+ let C;
50
+ t[14] !== g || t[15] !== x || t[16] !== S ? (C = /* @__PURE__ */ f("button", {
51
+ type: "button",
52
+ onClick: b,
53
+ className: x,
54
+ children: [g, S]
55
+ }), t[14] = g, t[15] = x, t[16] = S, t[17] = C) : C = t[17];
56
+ let T;
57
+ t[18] !== n || t[19] !== o ? (T = o && /* @__PURE__ */ d("div", {
58
+ className: "jsbo1id",
59
+ children: /* @__PURE__ */ d("ul", {
60
+ className: "jsbo1ie",
61
+ children: n.map(I)
62
+ })
63
+ }), t[18] = n, t[19] = o, t[20] = T) : T = t[20];
64
+ let O;
65
+ return t[21] !== T || t[22] !== C ? (O = /* @__PURE__ */ f("div", {
66
+ ref: p,
67
+ className: k,
68
+ onMouseEnter: v,
69
+ onMouseLeave: y,
70
+ children: [C, T]
71
+ }), t[21] = T, t[22] = C, t[23] = O) : O = t[23], O;
72
+ }, P = ({ summary: i, billingDetails: s, onBillingEdit: c, onComplete: E, className: D, workspaceId: O, workspaceName: k }) => {
73
+ let A = o(), j = n(), [M, P] = l("summary"), [F, I] = l(null), [ne, L] = l(!1), [re, ie] = l(null), [ae, oe] = l("razorpay"), R = (e, t) => {
74
+ let n = t && t.trim() ? t : "INR", r = e / 100;
75
+ return new Intl.NumberFormat("en-IN", {
76
+ style: "currency",
77
+ currency: n,
78
+ minimumFractionDigits: 0
79
+ }).format(r);
80
+ }, z = (e) => e ? T(e).format("D MMM YYYY") : null, B = (e) => e ? T(e).format("h:mm A") : null, V = (e) => e.replace(/_/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (e) => e.toUpperCase()), H = (e) => e == null ? "-" : typeof e == "boolean" ? e ? "Yes" : "No" : Array.isArray(e) ? e.join(", ") : typeof e == "object" ? JSON.stringify(e) : String(e), U = () => {
81
+ try {
82
+ Object.keys(localStorage).forEach((e) => {
83
+ e.startsWith("levo_collection_cart_") && localStorage.removeItem(e);
84
+ }), window.dispatchEvent(new Event("levo_cart_updated"));
85
+ } catch (e) {
86
+ a(e);
87
+ }
88
+ }, W = Object.entries(i.form_data || {}).filter(([e, t]) => t != null && t !== ""), G = async () => {
89
+ P("processing"), I(null);
90
+ try {
91
+ let e = s || i.billing_details, n = e ? { billing_details: e } : {}, r = await A?.fetch?.url(`/v1/payment/booking/${i._id}/pay`)?.options(t(O))?.post(n).json(), a = r?.content?.meta;
92
+ if (!r?.status || !a?.key) {
93
+ I("Unable to initiate payment. Please try again."), P("failed");
94
+ return;
95
+ }
96
+ oe(a.provider || "razorpay");
97
+ let o = await j.open(a, {
98
+ amount: a.amount ?? 0,
99
+ merchantName: k ?? "",
100
+ description: X || "Booking Payment",
101
+ prefill: {
102
+ name: "",
103
+ email: "",
104
+ contact: ""
105
+ },
106
+ themeColor: "#FC751A"
107
+ });
108
+ o.status === "completed" ? await se(o.confirmation) : o.status === "closed" && (o.message ? (I(o.message), P("failed")) : P("summary"));
109
+ } catch (e) {
110
+ console.error("Initiate payment error:", e), a(e), I("Unable to initiate payment. Please check your connection and try again."), P("failed");
111
+ }
112
+ }, se = async (e) => {
113
+ try {
114
+ let n = await A?.fetch?.url(`/v1/payment/booking/${i._id}/confirm`)?.options(t(O))?.post(e).json();
115
+ n?.status && n?.content?.data ? (ie(n.content.data), P("confirmed"), U()) : (I("Payment received but confirmation failed. Please contact support."), P("failed"));
116
+ } catch (e) {
117
+ console.error("Confirm payment error:", e), a(e), I("Payment received but confirmation failed. Please contact support."), P("failed");
118
+ }
119
+ }, K = !i.total_amount || i.total_amount === 0, q = i.line_items || [], J = q[0], Y = q.length > 1, X = Y ? i.context_label || "Booking" : J?.instance_label || i.context_label || "Booking", Z = J?.cover_image?.location || null, Q = J?.starts_at || null, $ = J?.ends_at || null;
120
+ return /* @__PURE__ */ f(u, { children: [
121
+ /* @__PURE__ */ f("div", {
122
+ className: w(ee, D),
123
+ children: [
124
+ M === "summary" && /* @__PURE__ */ f("div", {
125
+ className: "jsbo1i4",
126
+ children: [Z && /* @__PURE__ */ f("div", {
127
+ className: "jsbo1ij",
128
+ children: [/* @__PURE__ */ d("img", {
129
+ src: Z,
130
+ alt: X,
131
+ className: "jsbo1ik"
132
+ }), /* @__PURE__ */ d("div", { className: "jsbo1il" })]
133
+ }), /* @__PURE__ */ f("div", {
134
+ className: w("jsbo1i4", "jsbo1ii"),
135
+ children: [
136
+ /* @__PURE__ */ f("div", {
137
+ className: "jsbo1im",
138
+ children: [/* @__PURE__ */ d("p", {
139
+ className: "jsbo1in",
140
+ children: "Booking Summary"
141
+ }), /* @__PURE__ */ d("h3", {
142
+ className: "jsbo1io",
143
+ children: X
144
+ })]
145
+ }),
146
+ !Y && (Q || $) && /* @__PURE__ */ f("div", {
147
+ className: "jsbo1ip",
148
+ children: [Q && /* @__PURE__ */ f("div", {
149
+ className: "jsbo1iq",
150
+ children: [/* @__PURE__ */ d(p, {
151
+ size: 16,
152
+ className: "jsbo1ir"
153
+ }), /* @__PURE__ */ d("span", { children: z(Q) })]
154
+ }), Q && /* @__PURE__ */ f("div", {
155
+ className: "jsbo1iq",
156
+ children: [/* @__PURE__ */ d(h, {
157
+ size: 16,
158
+ className: "jsbo1ir"
159
+ }), /* @__PURE__ */ d("span", { children: B(Q) })]
160
+ })]
161
+ }),
162
+ W.length > 0 && /* @__PURE__ */ f("div", {
163
+ className: "jsbo1it",
164
+ children: [/* @__PURE__ */ d("h4", {
165
+ className: "jsbo1iu",
166
+ children: "Your Details"
167
+ }), /* @__PURE__ */ d("div", {
168
+ className: "jsbo1iy",
169
+ children: /* @__PURE__ */ d("div", {
170
+ className: "jsbo1iz",
171
+ children: W.map(([e, t]) => /* @__PURE__ */ f("div", {
172
+ className: "jsbo1i10",
173
+ children: [/* @__PURE__ */ d("span", {
174
+ className: "jsbo1i11",
175
+ children: V(e)
176
+ }), Array.isArray(t) ? /* @__PURE__ */ d(N, {
177
+ items: t,
178
+ textSizeClass: "jsbo1i3"
179
+ }) : /* @__PURE__ */ d("span", {
180
+ className: "jsbo1i12",
181
+ children: H(t)
182
+ })]
183
+ }, e))
184
+ })
185
+ })]
186
+ }),
187
+ (() => {
188
+ let e = s || i.billing_details;
189
+ return e ? /* @__PURE__ */ f("div", {
190
+ className: "jsbo1it",
191
+ children: [/* @__PURE__ */ f("div", {
192
+ className: "jsbo1iv",
193
+ children: [/* @__PURE__ */ d("h4", {
194
+ className: "jsbo1iw",
195
+ children: "Billing Details"
196
+ }), c && /* @__PURE__ */ d("button", {
197
+ type: "button",
198
+ onClick: () => L(!0),
199
+ className: "jsbo1ix",
200
+ children: /* @__PURE__ */ d(y, { size: 14 })
201
+ })]
202
+ }), /* @__PURE__ */ d("div", {
203
+ className: "jsbo1iy",
204
+ children: /* @__PURE__ */ f("div", {
205
+ className: "jsbo1iz",
206
+ children: [
207
+ /* @__PURE__ */ f("div", {
208
+ className: "jsbo1i10",
209
+ children: [/* @__PURE__ */ d("span", {
210
+ className: "jsbo1i11",
211
+ children: "Name"
212
+ }), /* @__PURE__ */ d("span", {
213
+ className: "jsbo1i12",
214
+ children: e.name
215
+ })]
216
+ }),
217
+ e.tax_id && /* @__PURE__ */ f("div", {
218
+ className: "jsbo1i10",
219
+ children: [/* @__PURE__ */ d("span", {
220
+ className: "jsbo1i11",
221
+ children: "Tax ID"
222
+ }), /* @__PURE__ */ d("span", {
223
+ className: "jsbo1i12",
224
+ children: e.tax_id
225
+ })]
226
+ }),
227
+ /* @__PURE__ */ f("div", {
228
+ className: "jsbo1i10",
229
+ children: [/* @__PURE__ */ d("span", {
230
+ className: "jsbo1i11",
231
+ children: "Address"
232
+ }), /* @__PURE__ */ d("span", {
233
+ className: "jsbo1i12",
234
+ children: [
235
+ e.address.line1,
236
+ e.address.line2,
237
+ e.address.city,
238
+ e.address.state,
239
+ e.address.postal_code,
240
+ e.address.country
241
+ ].filter(Boolean).join(", ")
242
+ })]
243
+ })
244
+ ]
245
+ })
246
+ })]
247
+ }) : null;
248
+ })(),
249
+ /* @__PURE__ */ f("div", {
250
+ className: "jsbo1it",
251
+ children: [/* @__PURE__ */ d("h4", {
252
+ className: "jsbo1iu",
253
+ children: "Payment"
254
+ }), /* @__PURE__ */ f("div", {
255
+ className: "jsbo1i13",
256
+ children: [/* @__PURE__ */ f("div", {
257
+ className: "jsbo1i14",
258
+ children: [
259
+ q.map((e) => /* @__PURE__ */ f("div", {
260
+ className: "jsbo1i15",
261
+ children: [/* @__PURE__ */ f("span", {
262
+ className: "jsbo1i16",
263
+ children: [/* @__PURE__ */ d("span", {
264
+ className: "jsbo1i9",
265
+ children: e.instance_label
266
+ }), e.quantity > 1 && /* @__PURE__ */ f("span", {
267
+ className: "jsbo1i17",
268
+ children: ["×", e.quantity]
269
+ })]
270
+ }), /* @__PURE__ */ d("span", {
271
+ className: "jsbo1i18",
272
+ children: R(e.line_subtotal, i.currency)
273
+ })]
274
+ }, e.resource_instance)),
275
+ typeof i.discount == "number" && i.discount > 0 && /* @__PURE__ */ f("div", {
276
+ className: w("jsbo1i6", "jsbo1i3"),
277
+ children: [/* @__PURE__ */ d("span", {
278
+ className: "jsbo1i7",
279
+ children: "Discount"
280
+ }), /* @__PURE__ */ f("span", {
281
+ className: "jsbo1i19",
282
+ children: ["-", R(i.discount, i.currency)]
283
+ })]
284
+ }),
285
+ i.taxes && i.taxes.length > 0 && i.taxes.map((e) => /* @__PURE__ */ f("div", {
286
+ className: w("jsbo1i6", "jsbo1i3"),
287
+ children: [/* @__PURE__ */ d("span", {
288
+ className: "jsbo1i7",
289
+ children: e.label
290
+ }), /* @__PURE__ */ d("span", {
291
+ className: "jsbo1i8",
292
+ children: R(e.amount, i.currency)
293
+ })]
294
+ }, e.id))
295
+ ]
296
+ }), /* @__PURE__ */ f("div", {
297
+ className: "jsbo1i1a",
298
+ children: [/* @__PURE__ */ d("span", {
299
+ className: "jsbo1i1b",
300
+ children: "Total"
301
+ }), /* @__PURE__ */ d("span", {
302
+ className: "jsbo1i1c",
303
+ children: K ? "Free" : R(i.total_amount, i.currency)
304
+ })]
305
+ })]
306
+ })]
307
+ }),
308
+ /* @__PURE__ */ d(e, {
309
+ type: "button",
310
+ size: "lg",
311
+ onClick: K ? () => {
312
+ P("confirmed"), U();
313
+ } : G,
314
+ className: "jsbo1i1d",
315
+ children: /* @__PURE__ */ d("span", {
316
+ className: "jsbo1i1e",
317
+ children: K ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(m, { size: 20 }), /* @__PURE__ */ d("span", { children: "Confirm Booking" })] }) : /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(g, { size: 20 }), /* @__PURE__ */ f("span", { children: ["Pay ", R(i.total_amount, i.currency)] })] })
318
+ })
319
+ }),
320
+ !K && /* @__PURE__ */ f("div", {
321
+ className: "jsbo1i1f",
322
+ children: [/* @__PURE__ */ d(x, { size: 14 }), /* @__PURE__ */ d("span", { children: "Secure payment" })]
323
+ })
324
+ ]
325
+ })]
326
+ }),
327
+ M === "processing" && /* @__PURE__ */ f("div", {
328
+ className: "jsbo1i1g",
329
+ children: [
330
+ /* @__PURE__ */ f("div", {
331
+ className: "jsbo1i1h",
332
+ children: [/* @__PURE__ */ d("div", { className: "jsbo1i1i" }), /* @__PURE__ */ d("div", {
333
+ className: "jsbo1i1j",
334
+ children: /* @__PURE__ */ d(v, {
335
+ size: 32,
336
+ className: "jsbo1i1k"
337
+ })
338
+ })]
339
+ }),
340
+ /* @__PURE__ */ d("h3", {
341
+ className: "jsbo1i1l",
342
+ children: "Processing Payment"
343
+ }),
344
+ /* @__PURE__ */ d("p", {
345
+ className: "jsbo1i1m",
346
+ children: "Please wait while we confirm your payment..."
347
+ }),
348
+ /* @__PURE__ */ d("div", {
349
+ className: "jsbo1i1n",
350
+ children: /* @__PURE__ */ f("p", {
351
+ className: "jsbo1i1m",
352
+ children: [
353
+ "Amount:",
354
+ " ",
355
+ /* @__PURE__ */ d("span", {
356
+ className: "jsbo1i1o",
357
+ children: R(i.total_amount, i.currency)
358
+ })
359
+ ]
360
+ })
361
+ })
362
+ ]
363
+ }),
364
+ M === "failed" && /* @__PURE__ */ f("div", {
365
+ className: "jsbo1i4",
366
+ children: [/* @__PURE__ */ d("div", {
367
+ className: "jsbo1i1p",
368
+ children: /* @__PURE__ */ f("div", {
369
+ className: "jsbo1i5",
370
+ children: [
371
+ /* @__PURE__ */ d("div", {
372
+ className: "jsbo1i1q",
373
+ children: /* @__PURE__ */ d(C, { size: 32 })
374
+ }),
375
+ /* @__PURE__ */ d("h3", {
376
+ className: "jsbo1i1l",
377
+ children: "Payment Failed"
378
+ }),
379
+ /* @__PURE__ */ d("p", {
380
+ className: "jsbo1i1m",
381
+ children: F || "Something went wrong. Please try again."
382
+ })
383
+ ]
384
+ })
385
+ }), /* @__PURE__ */ f("div", {
386
+ className: w("jsbo1i4", "jsbo1ii"),
387
+ children: [
388
+ /* @__PURE__ */ d("div", {
389
+ className: "jsbo1i1r",
390
+ children: /* @__PURE__ */ d("h4", {
391
+ className: "jsbo1i1s",
392
+ children: X
393
+ })
394
+ }),
395
+ !Y && (Q || $) && /* @__PURE__ */ f("div", {
396
+ className: "jsbo1i1t",
397
+ children: [Q && /* @__PURE__ */ f("div", {
398
+ className: "jsbo1iq",
399
+ children: [/* @__PURE__ */ d(p, {
400
+ size: 16,
401
+ className: "jsbo1is"
402
+ }), /* @__PURE__ */ d("span", { children: z(Q) })]
403
+ }), Q && /* @__PURE__ */ f("div", {
404
+ className: "jsbo1iq",
405
+ children: [/* @__PURE__ */ d(h, {
406
+ size: 16,
407
+ className: "jsbo1is"
408
+ }), /* @__PURE__ */ d("span", { children: B(Q) })]
409
+ })]
410
+ }),
411
+ W.length > 0 && /* @__PURE__ */ d("div", {
412
+ className: "jsbo1i1u",
413
+ children: /* @__PURE__ */ f("div", {
414
+ className: "jsbo1i1v",
415
+ children: [W.slice(0, 3).map(([e, t]) => /* @__PURE__ */ f("div", {
416
+ className: "jsbo1i1w",
417
+ children: [/* @__PURE__ */ d("span", {
418
+ className: "jsbo1i7",
419
+ children: V(e)
420
+ }), Array.isArray(t) ? /* @__PURE__ */ d(N, {
421
+ items: t,
422
+ textSizeClass: "jsbo1i3"
423
+ }) : /* @__PURE__ */ d("span", {
424
+ className: "jsbo1i1x",
425
+ children: H(t)
426
+ })]
427
+ }, e)), W.length > 3 && /* @__PURE__ */ f("p", {
428
+ className: "jsbo1i1y",
429
+ children: [
430
+ "+",
431
+ W.length - 3,
432
+ " more"
433
+ ]
434
+ })]
435
+ })
436
+ }),
437
+ /* @__PURE__ */ d("div", {
438
+ className: "jsbo1i1z",
439
+ children: /* @__PURE__ */ f("div", {
440
+ className: "jsbo1i6",
441
+ children: [/* @__PURE__ */ d("span", {
442
+ className: "jsbo1i20",
443
+ children: "Amount to Pay"
444
+ }), /* @__PURE__ */ d("span", {
445
+ className: "jsbo1i1c",
446
+ children: R(i.total_amount, i.currency)
447
+ })]
448
+ })
449
+ }),
450
+ /* @__PURE__ */ d(e, {
451
+ type: "button",
452
+ size: "lg",
453
+ onClick: () => {
454
+ I(null), G();
455
+ },
456
+ className: "jsbo1i1d",
457
+ children: /* @__PURE__ */ f("span", {
458
+ className: "jsbo1i1e",
459
+ children: [/* @__PURE__ */ d(b, { size: 20 }), /* @__PURE__ */ d("span", { children: "Try Again" })]
460
+ })
461
+ }),
462
+ /* @__PURE__ */ f("div", {
463
+ className: "jsbo1i1f",
464
+ children: [/* @__PURE__ */ d(x, { size: 14 }), /* @__PURE__ */ f("span", { children: ["Secured by ", te[ae]] })]
465
+ }),
466
+ /* @__PURE__ */ d("p", {
467
+ className: "jsbo1i21",
468
+ children: "If the problem persists, please contact support"
469
+ })
470
+ ]
471
+ })]
472
+ }),
473
+ M === "confirmed" && /* @__PURE__ */ f("div", {
474
+ className: "jsbo1i4",
475
+ children: [/* @__PURE__ */ d("div", {
476
+ className: "jsbo1i22",
477
+ children: /* @__PURE__ */ f("div", {
478
+ className: "jsbo1i5",
479
+ children: [
480
+ /* @__PURE__ */ f("div", {
481
+ className: "jsbo1i23",
482
+ children: [/* @__PURE__ */ d("div", { className: "jsbo1i24" }), /* @__PURE__ */ d("div", {
483
+ className: "jsbo1i25",
484
+ children: /* @__PURE__ */ d(m, { size: 36 })
485
+ })]
486
+ }),
487
+ /* @__PURE__ */ d("h3", {
488
+ className: "jsbo1i26",
489
+ children: K ? "Booking Confirmed!" : "Payment Successful!"
490
+ }),
491
+ /* @__PURE__ */ d("p", {
492
+ className: "jsbo1i1m",
493
+ children: K ? "Your booking has been confirmed" : "Your payment has been processed successfully"
494
+ })
495
+ ]
496
+ })
497
+ }), /* @__PURE__ */ f("div", {
498
+ className: "jsbo1ii",
499
+ children: [
500
+ /* @__PURE__ */ f("div", {
501
+ className: "jsbo1i27",
502
+ children: [
503
+ /* @__PURE__ */ d("div", { className: "jsbo1i28" }),
504
+ /* @__PURE__ */ d("div", { className: "jsbo1i29" }),
505
+ /* @__PURE__ */ f("div", {
506
+ className: "jsbo1i2a",
507
+ children: [
508
+ /* @__PURE__ */ f("div", {
509
+ className: "jsbo1i2b",
510
+ children: [/* @__PURE__ */ d("div", {
511
+ className: "jsbo1i2c",
512
+ children: /* @__PURE__ */ d(S, { size: 20 })
513
+ }), /* @__PURE__ */ d("div", {
514
+ className: "jsbo1i2d",
515
+ children: /* @__PURE__ */ d("p", {
516
+ className: "jsbo1i2e",
517
+ children: X
518
+ })
519
+ })]
520
+ }),
521
+ i.qr_image?.location && /* @__PURE__ */ d("div", {
522
+ className: "jsbo1i2f",
523
+ children: /* @__PURE__ */ d("div", {
524
+ className: "jsbo1i2g",
525
+ children: /* @__PURE__ */ d("img", {
526
+ src: i.qr_image.location,
527
+ alt: "Booking QR Code",
528
+ className: "jsbo1i2h"
529
+ })
530
+ })
531
+ }),
532
+ /* @__PURE__ */ f("div", {
533
+ className: "jsbo1i2i",
534
+ children: [/* @__PURE__ */ d("span", {
535
+ className: "jsbo1i2j",
536
+ children: "Booking ID"
537
+ }), /* @__PURE__ */ d("span", {
538
+ className: "jsbo1i2k",
539
+ children: i._id
540
+ })]
541
+ }),
542
+ /* @__PURE__ */ d("div", { className: "jsbo1i2l" }),
543
+ /* @__PURE__ */ f("div", {
544
+ className: "jsbo1iz",
545
+ children: [!Y && Q && /* @__PURE__ */ f("div", {
546
+ className: "jsbo1i6",
547
+ children: [/* @__PURE__ */ f("div", {
548
+ className: "jsbo1iq",
549
+ children: [/* @__PURE__ */ d(p, { size: 16 }), /* @__PURE__ */ d("span", { children: "Date & Time" })]
550
+ }), /* @__PURE__ */ f("p", {
551
+ className: "jsbo1i2m",
552
+ children: [
553
+ z(Q),
554
+ ", ",
555
+ B(Q)
556
+ ]
557
+ })]
558
+ }), W.slice(0, 3).map(([e, t]) => /* @__PURE__ */ f("div", {
559
+ className: "jsbo1i6",
560
+ children: [/* @__PURE__ */ d("span", {
561
+ className: "jsbo1i11",
562
+ children: V(e)
563
+ }), Array.isArray(t) ? /* @__PURE__ */ d(N, {
564
+ items: t,
565
+ textSizeClass: "jsbo1i3"
566
+ }) : /* @__PURE__ */ d("span", {
567
+ className: "jsbo1i1x",
568
+ children: H(t)
569
+ })]
570
+ }, e))]
571
+ }),
572
+ /* @__PURE__ */ d("div", { className: "jsbo1i2l" }),
573
+ /* @__PURE__ */ f("div", {
574
+ className: "jsbo1i6",
575
+ children: [/* @__PURE__ */ d("span", {
576
+ className: "jsbo1i20",
577
+ children: K ? "Total" : "Amount Paid"
578
+ }), /* @__PURE__ */ d("span", {
579
+ className: "jsbo1i2n",
580
+ children: K ? "Free" : R(i.total_amount, i.currency)
581
+ })]
582
+ }),
583
+ (() => {
584
+ let e = re?.invoice?.location || i.invoice?.location;
585
+ return e ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { className: "jsbo1i2l" }), /* @__PURE__ */ f("a", {
586
+ href: e,
587
+ target: "_blank",
588
+ rel: "noopener noreferrer",
589
+ className: "jsbo1i2o",
590
+ children: [/* @__PURE__ */ d(_, { size: 16 }), "Download Invoice"]
591
+ })] }) : null;
592
+ })()
593
+ ]
594
+ })
595
+ ]
596
+ }),
597
+ E && /* @__PURE__ */ d("div", {
598
+ className: "jsbo1i2p",
599
+ children: /* @__PURE__ */ d(e, {
600
+ type: "button",
601
+ size: "lg",
602
+ onClick: E,
603
+ className: "jsbo1i1d",
604
+ children: "Done"
605
+ })
606
+ }),
607
+ /* @__PURE__ */ d("p", {
608
+ className: "jsbo1i2q",
609
+ children: "A confirmation has been sent to your email"
610
+ })
611
+ ]
612
+ })]
613
+ })
614
+ ]
615
+ }),
616
+ ne && c && /* @__PURE__ */ d("div", {
617
+ className: "jsbo1i2r",
618
+ children: /* @__PURE__ */ d("div", {
619
+ className: "jsbo1i2s",
620
+ children: /* @__PURE__ */ d(r, {
621
+ isEdit: !0,
622
+ prefillData: s || i.billing_details,
623
+ onSubmit: (e) => {
624
+ c(e), L(!1);
625
+ },
626
+ onClose: () => L(!1)
627
+ })
628
+ })
629
+ }),
630
+ j.element
631
+ ] });
632
+ };
633
+ function F(e) {
634
+ return !e;
635
+ }
636
+ function I(e, t) {
637
+ return /* @__PURE__ */ f("li", {
638
+ className: j,
639
+ children: [/* @__PURE__ */ d("span", { className: M }), /* @__PURE__ */ d("span", {
640
+ className: O,
641
+ children: String(e ?? "-")
642
+ })]
643
+ }, t);
644
+ }
645
+ //#endregion
646
+ export { P as BookingCard };