@levo-so/studio 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{BillingStep-D4P_J_PJ.js → BillingStep-mq3o5Hrf.js} +1 -1
- package/{Button-CmwbMGFV.js → Button-DIDhszPV.js} +69 -69
- package/{DateTimeWidget-CG9ylSgA.js → DateTimeWidget-DHUmirf1.js} +3 -3
- package/{EntryCard-FxB1uCis.js → EntryCard-DiMic9hv.js} +3 -3
- package/{KBChatWidget-_kcueoxi.js → KBChatWidget-hquzCtvm.js} +1 -1
- package/{LoginCard-D8ZVZjbR.js → LoginCard-Cs9X8LC8.js} +3 -3
- package/{LoginForm-Cg5F4guy.js → LoginForm-CLUpD3qG.js} +2 -2
- package/{LoginModal-Cn6Nsuz3.js → LoginModal-D9jhZlJr.js} +3 -3
- package/{MessageCard-Bx6pC8wW.js → MessageCard-CJltLT2a.js} +2 -2
- package/{MessageFooter-CsY4uBIJ.js → MessageFooter-CrhrI-su.js} +1 -1
- package/{ModalManager-BIKunQ8D.js → ModalManager-7Nhr8gTs.js} +1 -1
- package/{PendingApprovalCard-0ORO4y9v.js → PendingApprovalCard-wW8Ko-w8.js} +3 -3
- package/{PhoneWidget-CZr1PZ4G.js → PhoneWidget-BQEfbyV4.js} +3 -3
- package/{PopupRenderer-Bncp54gB-BOJj-taW.js → PopupRenderer-Bncp54gB-CQloeJYR.js} +1 -1
- package/{ProfileCard-C2lXYYkC.js → ProfileCard-BhnTmQaE.js} +4 -4
- package/{RichTextWidget-Dcq-NsEi.js → RichTextWidget-CStx2PMn.js} +3 -3
- package/Spinner-HCqR1eGW.js +7 -0
- package/{StripePaymentModal-DfFlmYsp.js → StripePaymentModal-Cw-AlxTS.js} +17 -17
- package/{VerifyButton-6BIXAEGp.js → VerifyButton-kdxRhJWI.js} +1 -1
- package/{bookingCard-CZ3Jj9sL.js → bookingCard-BSRCH57N.js} +201 -201
- package/cn-BL52QQS4.js +6 -0
- package/{dialog-CznAfWcE.js → dialog-RrTP-MGm.js} +32 -32
- package/{dist-B91ZHPA-.js → dist-D3lGqLBP.js} +5 -5
- package/index.js +1359 -1359
- package/{kbChat-BpJkUcpv.js → kbChat-g2bupQqp.js} +2 -2
- package/package.json +6 -6
- package/Spinner-wdUA5kVe.js +0 -7
- /package/{Beams-CDt4Mt3M.js → Beams-DVEhileN.js} +0 -0
- /package/{CollectionField-D25BVweU.js → CollectionField-CD6ok1A3.js} +0 -0
- /package/{CollectionInput-CG-Pu_51.js → CollectionInput-DyNbxIZ8.js} +0 -0
- /package/{Dots-DadBreAs.js → Dots-vp0H1Md3.js} +0 -0
- /package/{Gradient-CPoU73FR.js → Gradient-_5G8Qm5s.js} +0 -0
- /package/{Grid-CAXyHMvM.js → Grid-D694XUrO.js} +0 -0
- /package/{Popover-Dt4--ulK.js → Popover-V2O1gz6N.js} +0 -0
- /package/{Tooltip-DreKXbTO.js → Tooltip-DTnCNEcE.js} +0 -0
- /package/{Waves-DPbfUhRX.js → Waves-DeNoq6Bo.js} +0 -0
- /package/{authentication-BSNkm1-l.js → authentication-TdyaDNTn.js} +0 -0
- /package/{card-DFSlAwCq.js → card-Cb4m0p4i.js} +0 -0
- /package/{pillChrome-B4uuWJhY.js → pillChrome-Cx8qlbsn.js} +0 -0
- /package/{useLogin-mEuzGlb2.js → useLogin-BhysESLW.js} +0 -0
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as e } from "./Button-
|
|
2
|
+
import { t as e } from "./Button-DIDhszPV.js";
|
|
3
3
|
import { n as t } from "./AuthProvider-CFQqiIf1.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
4
|
+
import { t as n } from "./cn-BL52QQS4.js";
|
|
5
|
+
import { n as r, t as i } from "./StripePaymentModal-Cw-AlxTS.js";
|
|
6
|
+
import { BillingStep as a } from "./BillingStep-mq3o5Hrf.js";
|
|
7
|
+
import { errorHandler as o, useLevo as s } from "@levo-so/react";
|
|
8
|
+
import { useEffect as c, useRef as l, useState as u } from "react";
|
|
9
|
+
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
10
10
|
import { Calendar as m, CheckCircle2 as h, Clock as g, CreditCard as ee, Download as te, Loader2 as ne, Pencil as re, RefreshCw as ie, ShieldCheck as _, Ticket as ae, XCircle as oe } from "lucide-react";
|
|
11
11
|
import v from "dayjs";
|
|
12
12
|
import { useRazorpay as se } from "react-razorpay";
|
|
13
13
|
//#region src/components/bookingCard/BookingCard.tsx
|
|
14
14
|
var y = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
15
|
-
let [
|
|
16
|
-
if (
|
|
17
|
-
if (!
|
|
15
|
+
let [r, i] = u(!1), a = l(null);
|
|
16
|
+
if (c(() => {
|
|
17
|
+
if (!r) return;
|
|
18
18
|
let e = (e) => {
|
|
19
|
-
|
|
19
|
+
a.current && !a.current.contains(e.target) && i(!1);
|
|
20
20
|
};
|
|
21
21
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
22
|
-
}, [
|
|
23
|
-
className:
|
|
22
|
+
}, [r]), e.length === 0) return /* @__PURE__ */ f("span", {
|
|
23
|
+
className: n("text-gray-900", t),
|
|
24
24
|
children: "-"
|
|
25
25
|
});
|
|
26
|
-
let
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
-
ref:
|
|
26
|
+
let o = String(e[0] ?? "-"), s = e.length - 1;
|
|
27
|
+
return /* @__PURE__ */ p("div", {
|
|
28
|
+
ref: a,
|
|
29
29
|
className: "relative inline-block",
|
|
30
|
-
onMouseEnter: () =>
|
|
31
|
-
onMouseLeave: () =>
|
|
32
|
-
children: [/* @__PURE__ */
|
|
30
|
+
onMouseEnter: () => i(!0),
|
|
31
|
+
onMouseLeave: () => i(!1),
|
|
32
|
+
children: [/* @__PURE__ */ p("button", {
|
|
33
33
|
type: "button",
|
|
34
|
-
onClick: () =>
|
|
35
|
-
className:
|
|
36
|
-
children: [
|
|
34
|
+
onClick: () => i((e) => !e),
|
|
35
|
+
className: n("cursor-pointer text-right font-medium text-gray-900 underline decoration-gray-300 decoration-dotted underline-offset-2 hover:decoration-gray-500", t),
|
|
36
|
+
children: [o, s > 0 && /* @__PURE__ */ p("span", {
|
|
37
37
|
className: "ml-1 font-normal text-gray-500",
|
|
38
38
|
children: [
|
|
39
39
|
"+",
|
|
40
|
-
|
|
40
|
+
s,
|
|
41
41
|
" more"
|
|
42
42
|
]
|
|
43
43
|
})]
|
|
44
|
-
}),
|
|
44
|
+
}), r && /* @__PURE__ */ f("div", {
|
|
45
45
|
className: "absolute right-0 z-20 mt-1.5 min-w-[200px] max-w-[280px] rounded-md border border-gray-200 bg-white p-2.5 shadow-lg",
|
|
46
|
-
children: /* @__PURE__ */
|
|
46
|
+
children: /* @__PURE__ */ f("ul", {
|
|
47
47
|
className: "space-y-1.5 text-left",
|
|
48
|
-
children: e.map((e, t) => /* @__PURE__ */
|
|
48
|
+
children: e.map((e, t) => /* @__PURE__ */ p("li", {
|
|
49
49
|
className: "flex items-start gap-2 text-gray-700 text-xs leading-snug",
|
|
50
|
-
children: [/* @__PURE__ */
|
|
50
|
+
children: [/* @__PURE__ */ f("span", { className: "mt-1.5 size-1 shrink-0 rounded-full bg-orange-400" }), /* @__PURE__ */ f("span", {
|
|
51
51
|
className: "break-words",
|
|
52
52
|
children: String(e ?? "-")
|
|
53
53
|
})]
|
|
@@ -55,8 +55,8 @@ var y = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
55
55
|
})
|
|
56
56
|
})]
|
|
57
57
|
});
|
|
58
|
-
}, b = ({ summary:
|
|
59
|
-
let C =
|
|
58
|
+
}, b = ({ summary: c, billingDetails: b, onBillingEdit: x, onComplete: S, className: ce }) => {
|
|
59
|
+
let C = s(), { workspace: w } = t(), { Razorpay: le } = se(), { stripePromise: ue, config: T, isOpen: E, openStripeCheckout: de, closeStripeCheckout: D, setOnComplete: fe } = r(), [O, k] = u("summary"), [A, j] = u(null), [pe, M] = u(!1), [me, N] = u(null), [he, ge] = u("razorpay"), P = l(!1), F = l(null), I = l(null), L = (e, t) => {
|
|
60
60
|
let n = t && t.trim() ? t : "INR", r = e / 100;
|
|
61
61
|
return new Intl.NumberFormat("en-IN", {
|
|
62
62
|
style: "currency",
|
|
@@ -69,20 +69,20 @@ var y = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
69
69
|
e.startsWith("levo_collection_cart_") && localStorage.removeItem(e);
|
|
70
70
|
}), window.dispatchEvent(new Event("levo_cart_updated"));
|
|
71
71
|
} catch (e) {
|
|
72
|
-
|
|
72
|
+
o(e);
|
|
73
73
|
}
|
|
74
|
-
}, U = Object.entries(
|
|
74
|
+
}, U = Object.entries(c.form_data || {}).filter(([e, t]) => t != null && t !== ""), W = () => {
|
|
75
75
|
if (!I.current) return;
|
|
76
76
|
let e = I.current;
|
|
77
|
-
C?.fetch?.url(`/v1/payment/booking/${
|
|
77
|
+
C?.fetch?.url(`/v1/payment/booking/${c._id}/confirm`)?.options({ headers: { Origin: w?.id || "" } })?.post({ session_id: e })?.json().then((e) => {
|
|
78
78
|
e?.content?.data ? (N(e.content.data), k("confirmed"), H()) : (j("Payment received but confirmation failed. Please contact support."), k("failed")), D(), I.current = null;
|
|
79
79
|
}).catch((e) => {
|
|
80
|
-
console.error("Failed to confirm booking after Stripe payment:", e),
|
|
80
|
+
console.error("Failed to confirm booking after Stripe payment:", e), o(e), j("Payment received but confirmation failed. Please contact support."), D(), I.current = null, k("failed");
|
|
81
81
|
});
|
|
82
82
|
}, G = async () => {
|
|
83
83
|
k("processing"), j(null);
|
|
84
84
|
try {
|
|
85
|
-
let e = b ||
|
|
85
|
+
let e = b || c.billing_details, t = e ? { billing_details: e } : {}, n = await C?.fetch?.url(`/v1/payment/booking/${c._id}/pay`)?.options({ headers: { Origin: w?.id || "" } })?.post(t).json();
|
|
86
86
|
if (n?.status && n?.content?.meta?.key) {
|
|
87
87
|
let e = n.content.meta;
|
|
88
88
|
ge(e.provider || "razorpay"), e.provider === "stripe" && e.client_secret ? (I.current = e.session_id || null, fe(W), await de({
|
|
@@ -95,7 +95,7 @@ var y = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
95
95
|
})) : _e(e);
|
|
96
96
|
} else j("Unable to initiate payment. Please try again."), k("failed");
|
|
97
97
|
} catch (e) {
|
|
98
|
-
console.error("Initiate payment error:", e),
|
|
98
|
+
console.error("Initiate payment error:", e), o(e), j("Unable to initiate payment. Please check your connection and try again."), k("failed");
|
|
99
99
|
}
|
|
100
100
|
}, _e = (e) => {
|
|
101
101
|
P.current = !1, F.current = null;
|
|
@@ -124,66 +124,66 @@ var y = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
124
124
|
}), n.open();
|
|
125
125
|
}, ve = async (e) => {
|
|
126
126
|
try {
|
|
127
|
-
let t = await C?.fetch?.url(`/v1/payment/booking/${
|
|
127
|
+
let t = await C?.fetch?.url(`/v1/payment/booking/${c._id}/confirm`)?.options({ headers: { Origin: w?.id || "" } })?.post(e).json();
|
|
128
128
|
t?.status && t?.content?.data ? (N(t.content.data), k("confirmed"), H()) : (j("Payment received but confirmation failed. Please contact support."), k("failed"));
|
|
129
129
|
} catch (e) {
|
|
130
|
-
console.error("Confirm payment error:", e),
|
|
130
|
+
console.error("Confirm payment error:", e), o(e), j("Payment received but confirmation failed. Please contact support."), k("failed");
|
|
131
131
|
}
|
|
132
|
-
}, K = !
|
|
133
|
-
return /* @__PURE__ */
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
-
className:
|
|
132
|
+
}, K = !c.total_amount || c.total_amount === 0, q = c.line_items || [], J = q[0], Y = q.length > 1, X = Y ? c.context_label || "Booking" : J?.instance_label || c.context_label || "Booking", Z = J?.cover_image?.location || null, Q = J?.starts_at || null, $ = J?.ends_at || null;
|
|
133
|
+
return /* @__PURE__ */ p(d, { children: [
|
|
134
|
+
/* @__PURE__ */ p("div", {
|
|
135
|
+
className: n("overflow-hidden rounded-xl border border-gray-200 bg-white shadow-sm", ce),
|
|
136
136
|
children: [
|
|
137
|
-
O === "summary" && /* @__PURE__ */
|
|
137
|
+
O === "summary" && /* @__PURE__ */ p("div", {
|
|
138
138
|
className: "flex flex-col",
|
|
139
|
-
children: [Z && /* @__PURE__ */
|
|
139
|
+
children: [Z && /* @__PURE__ */ p("div", {
|
|
140
140
|
className: "relative h-44 w-full overflow-hidden bg-gray-100",
|
|
141
|
-
children: [/* @__PURE__ */
|
|
141
|
+
children: [/* @__PURE__ */ f("img", {
|
|
142
142
|
src: Z,
|
|
143
143
|
alt: X,
|
|
144
144
|
className: "h-full w-full object-cover"
|
|
145
|
-
}), /* @__PURE__ */
|
|
146
|
-
}), /* @__PURE__ */
|
|
145
|
+
}), /* @__PURE__ */ f("div", { className: "absolute inset-0 bg-gradient-to-t from-black/30 to-transparent" })]
|
|
146
|
+
}), /* @__PURE__ */ p("div", {
|
|
147
147
|
className: "flex flex-col px-6 py-5 sm:px-8",
|
|
148
148
|
children: [
|
|
149
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ p("div", {
|
|
150
150
|
className: "mx-auto mb-5 w-full max-w-lg text-center",
|
|
151
|
-
children: [/* @__PURE__ */
|
|
151
|
+
children: [/* @__PURE__ */ f("p", {
|
|
152
152
|
className: "mb-1 font-medium text-gray-500 text-xs uppercase tracking-wider",
|
|
153
153
|
children: "Booking Summary"
|
|
154
|
-
}), /* @__PURE__ */
|
|
154
|
+
}), /* @__PURE__ */ f("h3", {
|
|
155
155
|
className: "font-semibold text-gray-900 text-xl leading-tight",
|
|
156
156
|
children: X
|
|
157
157
|
})]
|
|
158
158
|
}),
|
|
159
|
-
!Y && (Q || $) && /* @__PURE__ */
|
|
159
|
+
!Y && (Q || $) && /* @__PURE__ */ p("div", {
|
|
160
160
|
className: "mx-auto mb-5 flex w-full max-w-lg flex-wrap justify-center gap-4 rounded-lg bg-orange-50 px-4 py-3",
|
|
161
|
-
children: [Q && /* @__PURE__ */
|
|
161
|
+
children: [Q && /* @__PURE__ */ p("div", {
|
|
162
162
|
className: "flex items-center gap-2 text-gray-700 text-sm",
|
|
163
|
-
children: [/* @__PURE__ */
|
|
164
|
-
}), Q && /* @__PURE__ */
|
|
163
|
+
children: [/* @__PURE__ */ f(m, { className: "size-4 text-orange-500" }), /* @__PURE__ */ f("span", { children: R(Q) })]
|
|
164
|
+
}), Q && /* @__PURE__ */ p("div", {
|
|
165
165
|
className: "flex items-center gap-2 text-gray-700 text-sm",
|
|
166
|
-
children: [/* @__PURE__ */
|
|
166
|
+
children: [/* @__PURE__ */ f(g, { className: "size-4 text-orange-500" }), /* @__PURE__ */ f("span", { children: z(Q) })]
|
|
167
167
|
})]
|
|
168
168
|
}),
|
|
169
|
-
U.length > 0 && /* @__PURE__ */
|
|
169
|
+
U.length > 0 && /* @__PURE__ */ p("div", {
|
|
170
170
|
className: "mx-auto mb-5 w-full max-w-lg",
|
|
171
|
-
children: [/* @__PURE__ */
|
|
171
|
+
children: [/* @__PURE__ */ f("h4", {
|
|
172
172
|
className: "mb-3 text-center font-medium text-gray-500 text-xs uppercase tracking-wider",
|
|
173
173
|
children: "Your Details"
|
|
174
|
-
}), /* @__PURE__ */
|
|
174
|
+
}), /* @__PURE__ */ f("div", {
|
|
175
175
|
className: "rounded-lg border border-gray-100 bg-gray-50/50 p-4",
|
|
176
|
-
children: /* @__PURE__ */
|
|
176
|
+
children: /* @__PURE__ */ f("div", {
|
|
177
177
|
className: "space-y-2.5",
|
|
178
|
-
children: U.map(([e, t]) => /* @__PURE__ */
|
|
178
|
+
children: U.map(([e, t]) => /* @__PURE__ */ p("div", {
|
|
179
179
|
className: "flex items-start justify-between gap-3",
|
|
180
|
-
children: [/* @__PURE__ */
|
|
180
|
+
children: [/* @__PURE__ */ f("span", {
|
|
181
181
|
className: "text-gray-500 text-sm",
|
|
182
182
|
children: B(e)
|
|
183
|
-
}), Array.isArray(t) ? /* @__PURE__ */
|
|
183
|
+
}), Array.isArray(t) ? /* @__PURE__ */ f(y, {
|
|
184
184
|
items: t,
|
|
185
185
|
textSizeClass: "text-sm"
|
|
186
|
-
}) : /* @__PURE__ */
|
|
186
|
+
}) : /* @__PURE__ */ f("span", {
|
|
187
187
|
className: "text-right font-medium text-gray-900 text-sm",
|
|
188
188
|
children: V(t)
|
|
189
189
|
})]
|
|
@@ -192,51 +192,51 @@ var y = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
192
192
|
})]
|
|
193
193
|
}),
|
|
194
194
|
(() => {
|
|
195
|
-
let e = b ||
|
|
196
|
-
return e ? /* @__PURE__ */
|
|
195
|
+
let e = b || c.billing_details;
|
|
196
|
+
return e ? /* @__PURE__ */ p("div", {
|
|
197
197
|
className: "mx-auto mb-5 w-full max-w-lg",
|
|
198
|
-
children: [/* @__PURE__ */
|
|
198
|
+
children: [/* @__PURE__ */ p("div", {
|
|
199
199
|
className: "mb-3 flex items-center justify-center gap-2",
|
|
200
|
-
children: [/* @__PURE__ */
|
|
200
|
+
children: [/* @__PURE__ */ f("h4", {
|
|
201
201
|
className: "text-center font-medium text-gray-500 text-xs uppercase tracking-wider",
|
|
202
202
|
children: "Billing Details"
|
|
203
|
-
}), x && /* @__PURE__ */
|
|
203
|
+
}), x && /* @__PURE__ */ f("button", {
|
|
204
204
|
type: "button",
|
|
205
205
|
onClick: () => M(!0),
|
|
206
206
|
className: "text-orange-500 hover:text-orange-600",
|
|
207
|
-
children: /* @__PURE__ */
|
|
207
|
+
children: /* @__PURE__ */ f(re, { className: "size-3.5" })
|
|
208
208
|
})]
|
|
209
|
-
}), /* @__PURE__ */
|
|
209
|
+
}), /* @__PURE__ */ f("div", {
|
|
210
210
|
className: "rounded-lg border border-gray-100 bg-gray-50/50 p-4",
|
|
211
|
-
children: /* @__PURE__ */
|
|
211
|
+
children: /* @__PURE__ */ p("div", {
|
|
212
212
|
className: "space-y-2.5",
|
|
213
213
|
children: [
|
|
214
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ p("div", {
|
|
215
215
|
className: "flex items-start justify-between gap-3",
|
|
216
|
-
children: [/* @__PURE__ */
|
|
216
|
+
children: [/* @__PURE__ */ f("span", {
|
|
217
217
|
className: "text-gray-500 text-sm",
|
|
218
218
|
children: "Name"
|
|
219
|
-
}), /* @__PURE__ */
|
|
219
|
+
}), /* @__PURE__ */ f("span", {
|
|
220
220
|
className: "text-right font-medium text-gray-900 text-sm",
|
|
221
221
|
children: e.name
|
|
222
222
|
})]
|
|
223
223
|
}),
|
|
224
|
-
e.tax_id && /* @__PURE__ */
|
|
224
|
+
e.tax_id && /* @__PURE__ */ p("div", {
|
|
225
225
|
className: "flex items-start justify-between gap-3",
|
|
226
|
-
children: [/* @__PURE__ */
|
|
226
|
+
children: [/* @__PURE__ */ f("span", {
|
|
227
227
|
className: "text-gray-500 text-sm",
|
|
228
228
|
children: "Tax ID"
|
|
229
|
-
}), /* @__PURE__ */
|
|
229
|
+
}), /* @__PURE__ */ f("span", {
|
|
230
230
|
className: "text-right font-medium text-gray-900 text-sm",
|
|
231
231
|
children: e.tax_id
|
|
232
232
|
})]
|
|
233
233
|
}),
|
|
234
|
-
/* @__PURE__ */
|
|
234
|
+
/* @__PURE__ */ p("div", {
|
|
235
235
|
className: "flex items-start justify-between gap-3",
|
|
236
|
-
children: [/* @__PURE__ */
|
|
236
|
+
children: [/* @__PURE__ */ f("span", {
|
|
237
237
|
className: "text-gray-500 text-sm",
|
|
238
238
|
children: "Address"
|
|
239
|
-
}), /* @__PURE__ */
|
|
239
|
+
}), /* @__PURE__ */ f("span", {
|
|
240
240
|
className: "text-right font-medium text-gray-900 text-sm",
|
|
241
241
|
children: [
|
|
242
242
|
e.address.line1,
|
|
@@ -253,175 +253,175 @@ var y = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
253
253
|
})]
|
|
254
254
|
}) : null;
|
|
255
255
|
})(),
|
|
256
|
-
/* @__PURE__ */
|
|
256
|
+
/* @__PURE__ */ p("div", {
|
|
257
257
|
className: "mx-auto mb-5 w-full max-w-lg",
|
|
258
|
-
children: [/* @__PURE__ */
|
|
258
|
+
children: [/* @__PURE__ */ f("h4", {
|
|
259
259
|
className: "mb-3 text-center font-medium text-gray-500 text-xs uppercase tracking-wider",
|
|
260
260
|
children: "Payment"
|
|
261
|
-
}), /* @__PURE__ */
|
|
261
|
+
}), /* @__PURE__ */ p("div", {
|
|
262
262
|
className: "rounded-lg border border-gray-200 bg-white p-4",
|
|
263
|
-
children: [/* @__PURE__ */
|
|
263
|
+
children: [/* @__PURE__ */ p("div", {
|
|
264
264
|
className: "space-y-2",
|
|
265
265
|
children: [
|
|
266
|
-
q.map((e) => /* @__PURE__ */
|
|
266
|
+
q.map((e) => /* @__PURE__ */ p("div", {
|
|
267
267
|
className: "flex items-start justify-between gap-3 text-sm",
|
|
268
|
-
children: [/* @__PURE__ */
|
|
268
|
+
children: [/* @__PURE__ */ p("span", {
|
|
269
269
|
className: "min-w-0 flex-1 text-gray-600",
|
|
270
|
-
children: [/* @__PURE__ */
|
|
270
|
+
children: [/* @__PURE__ */ f("span", {
|
|
271
271
|
className: "break-words",
|
|
272
272
|
children: e.instance_label
|
|
273
|
-
}), e.quantity > 1 && /* @__PURE__ */
|
|
273
|
+
}), e.quantity > 1 && /* @__PURE__ */ p("span", {
|
|
274
274
|
className: "ml-1 text-gray-400",
|
|
275
275
|
children: ["×", e.quantity]
|
|
276
276
|
})]
|
|
277
|
-
}), /* @__PURE__ */
|
|
277
|
+
}), /* @__PURE__ */ f("span", {
|
|
278
278
|
className: "shrink-0 text-gray-900",
|
|
279
|
-
children: L(e.line_subtotal,
|
|
279
|
+
children: L(e.line_subtotal, c.currency)
|
|
280
280
|
})]
|
|
281
281
|
}, e.resource_instance)),
|
|
282
|
-
typeof
|
|
282
|
+
typeof c.discount == "number" && c.discount > 0 && /* @__PURE__ */ p("div", {
|
|
283
283
|
className: "flex items-center justify-between text-sm",
|
|
284
|
-
children: [/* @__PURE__ */
|
|
284
|
+
children: [/* @__PURE__ */ f("span", {
|
|
285
285
|
className: "text-gray-600",
|
|
286
286
|
children: "Discount"
|
|
287
|
-
}), /* @__PURE__ */
|
|
287
|
+
}), /* @__PURE__ */ p("span", {
|
|
288
288
|
className: "text-green-600",
|
|
289
|
-
children: ["-", L(
|
|
289
|
+
children: ["-", L(c.discount, c.currency)]
|
|
290
290
|
})]
|
|
291
291
|
}),
|
|
292
|
-
|
|
292
|
+
c.taxes && c.taxes.length > 0 && c.taxes.map((e) => /* @__PURE__ */ p("div", {
|
|
293
293
|
className: "flex items-center justify-between text-sm",
|
|
294
|
-
children: [/* @__PURE__ */
|
|
294
|
+
children: [/* @__PURE__ */ f("span", {
|
|
295
295
|
className: "text-gray-600",
|
|
296
296
|
children: e.label
|
|
297
|
-
}), /* @__PURE__ */
|
|
297
|
+
}), /* @__PURE__ */ f("span", {
|
|
298
298
|
className: "text-gray-900",
|
|
299
|
-
children: L(e.amount,
|
|
299
|
+
children: L(e.amount, c.currency)
|
|
300
300
|
})]
|
|
301
301
|
}, e.id))
|
|
302
302
|
]
|
|
303
|
-
}), /* @__PURE__ */
|
|
303
|
+
}), /* @__PURE__ */ p("div", {
|
|
304
304
|
className: "mt-3 flex items-center justify-between border-gray-100 border-t pt-3",
|
|
305
|
-
children: [/* @__PURE__ */
|
|
305
|
+
children: [/* @__PURE__ */ f("span", {
|
|
306
306
|
className: "font-medium text-gray-900",
|
|
307
307
|
children: "Total"
|
|
308
|
-
}), /* @__PURE__ */
|
|
308
|
+
}), /* @__PURE__ */ f("span", {
|
|
309
309
|
className: "font-bold text-gray-900 text-xl",
|
|
310
|
-
children: K ? "Free" : L(
|
|
310
|
+
children: K ? "Free" : L(c.total_amount, c.currency)
|
|
311
311
|
})]
|
|
312
312
|
})]
|
|
313
313
|
})]
|
|
314
314
|
}),
|
|
315
|
-
/* @__PURE__ */
|
|
315
|
+
/* @__PURE__ */ f(e, {
|
|
316
316
|
elementKey: "booking-pay-btn",
|
|
317
317
|
onClick: K ? () => {
|
|
318
318
|
k("confirmed"), H();
|
|
319
319
|
} : G,
|
|
320
320
|
className: "mx-auto w-full max-w-lg rounded-lg px-4 py-3.5 font-semibold",
|
|
321
|
-
children: /* @__PURE__ */
|
|
321
|
+
children: /* @__PURE__ */ f("span", {
|
|
322
322
|
className: "flex items-center justify-center gap-2",
|
|
323
|
-
children: K ? /* @__PURE__ */
|
|
323
|
+
children: K ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(h, { className: "size-5" }), /* @__PURE__ */ f("span", { children: "Confirm Booking" })] }) : /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(ee, { className: "size-5" }), /* @__PURE__ */ p("span", { children: ["Pay ", L(c.total_amount, c.currency)] })] })
|
|
324
324
|
})
|
|
325
325
|
}),
|
|
326
|
-
!K && /* @__PURE__ */
|
|
326
|
+
!K && /* @__PURE__ */ p("div", {
|
|
327
327
|
className: "mx-auto mt-4 flex w-full max-w-lg items-center justify-center gap-1.5 text-gray-400 text-xs",
|
|
328
|
-
children: [/* @__PURE__ */
|
|
328
|
+
children: [/* @__PURE__ */ f(_, { className: "size-3.5" }), /* @__PURE__ */ f("span", { children: "Secure payment" })]
|
|
329
329
|
})
|
|
330
330
|
]
|
|
331
331
|
})]
|
|
332
332
|
}),
|
|
333
|
-
O === "processing" && /* @__PURE__ */
|
|
333
|
+
O === "processing" && /* @__PURE__ */ p("div", {
|
|
334
334
|
className: "flex flex-col items-center justify-center px-6 py-16",
|
|
335
335
|
children: [
|
|
336
|
-
/* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ p("div", {
|
|
337
337
|
className: "relative mb-6",
|
|
338
|
-
children: [/* @__PURE__ */
|
|
338
|
+
children: [/* @__PURE__ */ f("div", { className: "absolute inset-0 animate-ping rounded-full bg-orange-200 opacity-75" }), /* @__PURE__ */ f("div", {
|
|
339
339
|
className: "relative flex size-16 items-center justify-center rounded-full bg-orange-100",
|
|
340
|
-
children: /* @__PURE__ */
|
|
340
|
+
children: /* @__PURE__ */ f(ne, { className: "size-8 animate-spin text-orange-500" })
|
|
341
341
|
})]
|
|
342
342
|
}),
|
|
343
|
-
/* @__PURE__ */
|
|
343
|
+
/* @__PURE__ */ f("h3", {
|
|
344
344
|
className: "mb-1 font-semibold text-gray-900 text-lg",
|
|
345
345
|
children: "Processing Payment"
|
|
346
346
|
}),
|
|
347
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ f("p", {
|
|
348
348
|
className: "text-center text-gray-500 text-sm",
|
|
349
349
|
children: "Please wait while we confirm your payment..."
|
|
350
350
|
}),
|
|
351
|
-
/* @__PURE__ */
|
|
351
|
+
/* @__PURE__ */ f("div", {
|
|
352
352
|
className: "mt-6 rounded-lg bg-gray-50 px-6 py-3",
|
|
353
|
-
children: /* @__PURE__ */
|
|
353
|
+
children: /* @__PURE__ */ p("p", {
|
|
354
354
|
className: "text-center text-gray-600 text-sm",
|
|
355
355
|
children: [
|
|
356
356
|
"Amount:",
|
|
357
357
|
" ",
|
|
358
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ f("span", {
|
|
359
359
|
className: "font-semibold text-gray-900",
|
|
360
|
-
children: L(
|
|
360
|
+
children: L(c.total_amount, c.currency)
|
|
361
361
|
})
|
|
362
362
|
]
|
|
363
363
|
})
|
|
364
364
|
})
|
|
365
365
|
]
|
|
366
366
|
}),
|
|
367
|
-
O === "failed" && /* @__PURE__ */
|
|
367
|
+
O === "failed" && /* @__PURE__ */ p("div", {
|
|
368
368
|
className: "flex flex-col",
|
|
369
|
-
children: [/* @__PURE__ */
|
|
369
|
+
children: [/* @__PURE__ */ f("div", {
|
|
370
370
|
className: "bg-gradient-to-br from-red-50 to-orange-50 px-6 py-6",
|
|
371
|
-
children: /* @__PURE__ */
|
|
371
|
+
children: /* @__PURE__ */ p("div", {
|
|
372
372
|
className: "flex flex-col items-center",
|
|
373
373
|
children: [
|
|
374
|
-
/* @__PURE__ */
|
|
374
|
+
/* @__PURE__ */ f("div", {
|
|
375
375
|
className: "mb-3 flex size-14 items-center justify-center rounded-full bg-red-100",
|
|
376
|
-
children: /* @__PURE__ */
|
|
376
|
+
children: /* @__PURE__ */ f(oe, { className: "size-8 text-red-500" })
|
|
377
377
|
}),
|
|
378
|
-
/* @__PURE__ */
|
|
378
|
+
/* @__PURE__ */ f("h3", {
|
|
379
379
|
className: "mb-1 font-semibold text-gray-900 text-lg",
|
|
380
380
|
children: "Payment Failed"
|
|
381
381
|
}),
|
|
382
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ f("p", {
|
|
383
383
|
className: "text-center text-gray-600 text-sm",
|
|
384
384
|
children: A || "Something went wrong. Please try again."
|
|
385
385
|
})
|
|
386
386
|
]
|
|
387
387
|
})
|
|
388
|
-
}), /* @__PURE__ */
|
|
388
|
+
}), /* @__PURE__ */ p("div", {
|
|
389
389
|
className: "flex flex-col px-6 py-5 sm:px-8",
|
|
390
390
|
children: [
|
|
391
|
-
/* @__PURE__ */
|
|
391
|
+
/* @__PURE__ */ f("div", {
|
|
392
392
|
className: "mx-auto mb-4 w-full max-w-lg text-center",
|
|
393
|
-
children: /* @__PURE__ */
|
|
393
|
+
children: /* @__PURE__ */ f("h4", {
|
|
394
394
|
className: "font-semibold text-base text-gray-900",
|
|
395
395
|
children: X
|
|
396
396
|
})
|
|
397
397
|
}),
|
|
398
|
-
!Y && (Q || $) && /* @__PURE__ */
|
|
398
|
+
!Y && (Q || $) && /* @__PURE__ */ p("div", {
|
|
399
399
|
className: "mx-auto mb-4 flex w-full max-w-lg flex-wrap justify-center gap-4 rounded-lg bg-gray-50 px-4 py-2.5",
|
|
400
|
-
children: [Q && /* @__PURE__ */
|
|
400
|
+
children: [Q && /* @__PURE__ */ p("div", {
|
|
401
401
|
className: "flex items-center gap-2 text-gray-600 text-sm",
|
|
402
|
-
children: [/* @__PURE__ */
|
|
403
|
-
}), Q && /* @__PURE__ */
|
|
402
|
+
children: [/* @__PURE__ */ f(m, { className: "size-4 text-gray-400" }), /* @__PURE__ */ f("span", { children: R(Q) })]
|
|
403
|
+
}), Q && /* @__PURE__ */ p("div", {
|
|
404
404
|
className: "flex items-center gap-2 text-gray-600 text-sm",
|
|
405
|
-
children: [/* @__PURE__ */
|
|
405
|
+
children: [/* @__PURE__ */ f(g, { className: "size-4 text-gray-400" }), /* @__PURE__ */ f("span", { children: z(Q) })]
|
|
406
406
|
})]
|
|
407
407
|
}),
|
|
408
|
-
U.length > 0 && /* @__PURE__ */
|
|
408
|
+
U.length > 0 && /* @__PURE__ */ f("div", {
|
|
409
409
|
className: "mx-auto mb-4 w-full max-w-lg rounded-lg border border-gray-100 bg-gray-50/50 p-3",
|
|
410
|
-
children: /* @__PURE__ */
|
|
410
|
+
children: /* @__PURE__ */ p("div", {
|
|
411
411
|
className: "space-y-1.5",
|
|
412
|
-
children: [U.slice(0, 3).map(([e, t]) => /* @__PURE__ */
|
|
412
|
+
children: [U.slice(0, 3).map(([e, t]) => /* @__PURE__ */ p("div", {
|
|
413
413
|
className: "flex items-center justify-between gap-3 text-sm",
|
|
414
|
-
children: [/* @__PURE__ */
|
|
414
|
+
children: [/* @__PURE__ */ f("span", {
|
|
415
415
|
className: "text-gray-500",
|
|
416
416
|
children: B(e)
|
|
417
|
-
}), Array.isArray(t) ? /* @__PURE__ */
|
|
417
|
+
}), Array.isArray(t) ? /* @__PURE__ */ f(y, {
|
|
418
418
|
items: t,
|
|
419
419
|
textSizeClass: "text-sm"
|
|
420
|
-
}) : /* @__PURE__ */
|
|
420
|
+
}) : /* @__PURE__ */ f("span", {
|
|
421
421
|
className: "max-w-[50%] truncate font-medium text-gray-900",
|
|
422
422
|
children: V(t)
|
|
423
423
|
})]
|
|
424
|
-
}, e)), U.length > 3 && /* @__PURE__ */
|
|
424
|
+
}, e)), U.length > 3 && /* @__PURE__ */ p("p", {
|
|
425
425
|
className: "pt-1 text-center text-gray-400 text-xs",
|
|
426
426
|
children: [
|
|
427
427
|
"+",
|
|
@@ -431,119 +431,119 @@ var y = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
431
431
|
})]
|
|
432
432
|
})
|
|
433
433
|
}),
|
|
434
|
-
/* @__PURE__ */
|
|
434
|
+
/* @__PURE__ */ f("div", {
|
|
435
435
|
className: "mx-auto mb-5 w-full max-w-lg rounded-lg border border-gray-200 bg-white p-4",
|
|
436
|
-
children: /* @__PURE__ */
|
|
436
|
+
children: /* @__PURE__ */ p("div", {
|
|
437
437
|
className: "flex items-center justify-between",
|
|
438
|
-
children: [/* @__PURE__ */
|
|
438
|
+
children: [/* @__PURE__ */ f("span", {
|
|
439
439
|
className: "font-medium text-gray-700",
|
|
440
440
|
children: "Amount to Pay"
|
|
441
|
-
}), /* @__PURE__ */
|
|
441
|
+
}), /* @__PURE__ */ f("span", {
|
|
442
442
|
className: "font-bold text-gray-900 text-xl",
|
|
443
|
-
children: L(
|
|
443
|
+
children: L(c.total_amount, c.currency)
|
|
444
444
|
})]
|
|
445
445
|
})
|
|
446
446
|
}),
|
|
447
|
-
/* @__PURE__ */
|
|
447
|
+
/* @__PURE__ */ f(e, {
|
|
448
448
|
elementKey: "booking-retry-btn",
|
|
449
449
|
onClick: () => {
|
|
450
450
|
j(null), G();
|
|
451
451
|
},
|
|
452
452
|
className: "mx-auto w-full max-w-lg rounded-lg px-4 py-3.5 font-semibold",
|
|
453
|
-
children: /* @__PURE__ */
|
|
453
|
+
children: /* @__PURE__ */ p("span", {
|
|
454
454
|
className: "flex items-center justify-center gap-2",
|
|
455
|
-
children: [/* @__PURE__ */
|
|
455
|
+
children: [/* @__PURE__ */ f(ie, { className: "size-5" }), /* @__PURE__ */ f("span", { children: "Try Again" })]
|
|
456
456
|
})
|
|
457
457
|
}),
|
|
458
|
-
/* @__PURE__ */
|
|
458
|
+
/* @__PURE__ */ p("div", {
|
|
459
459
|
className: "mx-auto mt-4 flex w-full max-w-lg items-center justify-center gap-1.5 text-gray-400 text-xs",
|
|
460
|
-
children: [/* @__PURE__ */
|
|
460
|
+
children: [/* @__PURE__ */ f(_, { className: "size-3.5" }), /* @__PURE__ */ p("span", { children: ["Secured by ", he === "stripe" ? "Stripe" : "Razorpay"] })]
|
|
461
461
|
}),
|
|
462
|
-
/* @__PURE__ */
|
|
462
|
+
/* @__PURE__ */ f("p", {
|
|
463
463
|
className: "mx-auto mt-3 w-full max-w-lg text-center text-gray-400 text-xs",
|
|
464
464
|
children: "If the problem persists, please contact support"
|
|
465
465
|
})
|
|
466
466
|
]
|
|
467
467
|
})]
|
|
468
468
|
}),
|
|
469
|
-
O === "confirmed" && /* @__PURE__ */
|
|
469
|
+
O === "confirmed" && /* @__PURE__ */ p("div", {
|
|
470
470
|
className: "flex flex-col",
|
|
471
|
-
children: [/* @__PURE__ */
|
|
471
|
+
children: [/* @__PURE__ */ f("div", {
|
|
472
472
|
className: "bg-gradient-to-br from-green-50 to-emerald-50 px-6 py-8",
|
|
473
|
-
children: /* @__PURE__ */
|
|
473
|
+
children: /* @__PURE__ */ p("div", {
|
|
474
474
|
className: "flex flex-col items-center",
|
|
475
475
|
children: [
|
|
476
|
-
/* @__PURE__ */
|
|
476
|
+
/* @__PURE__ */ p("div", {
|
|
477
477
|
className: "relative mb-4",
|
|
478
|
-
children: [/* @__PURE__ */
|
|
478
|
+
children: [/* @__PURE__ */ f("div", { className: "absolute -inset-2 animate-pulse rounded-full bg-green-200/50" }), /* @__PURE__ */ f("div", {
|
|
479
479
|
className: "relative flex size-16 items-center justify-center rounded-full bg-green-100 ring-4 ring-green-50",
|
|
480
|
-
children: /* @__PURE__ */
|
|
480
|
+
children: /* @__PURE__ */ f(h, { className: "size-9 text-green-600" })
|
|
481
481
|
})]
|
|
482
482
|
}),
|
|
483
|
-
/* @__PURE__ */
|
|
483
|
+
/* @__PURE__ */ f("h3", {
|
|
484
484
|
className: "mb-1 font-bold text-gray-900 text-xl",
|
|
485
485
|
children: K ? "Booking Confirmed!" : "Payment Successful!"
|
|
486
486
|
}),
|
|
487
|
-
/* @__PURE__ */
|
|
487
|
+
/* @__PURE__ */ f("p", {
|
|
488
488
|
className: "text-center text-gray-600 text-sm",
|
|
489
489
|
children: K ? "Your booking has been confirmed" : "Your payment has been processed successfully"
|
|
490
490
|
})
|
|
491
491
|
]
|
|
492
492
|
})
|
|
493
|
-
}), /* @__PURE__ */
|
|
493
|
+
}), /* @__PURE__ */ p("div", {
|
|
494
494
|
className: "px-6 py-5 sm:px-8",
|
|
495
495
|
children: [
|
|
496
|
-
/* @__PURE__ */
|
|
496
|
+
/* @__PURE__ */ p("div", {
|
|
497
497
|
className: "relative mx-auto max-w-lg overflow-hidden rounded-xl border border-gray-200 bg-white",
|
|
498
498
|
children: [
|
|
499
|
-
/* @__PURE__ */
|
|
500
|
-
/* @__PURE__ */
|
|
501
|
-
/* @__PURE__ */
|
|
499
|
+
/* @__PURE__ */ f("div", { className: "absolute top-1/2 -left-3 size-6 -translate-y-1/2 rounded-full bg-gray-100" }),
|
|
500
|
+
/* @__PURE__ */ f("div", { className: "absolute top-1/2 -right-3 size-6 -translate-y-1/2 rounded-full bg-gray-100" }),
|
|
501
|
+
/* @__PURE__ */ p("div", {
|
|
502
502
|
className: "px-5 py-4",
|
|
503
503
|
children: [
|
|
504
|
-
/* @__PURE__ */
|
|
504
|
+
/* @__PURE__ */ p("div", {
|
|
505
505
|
className: "mb-4 flex items-start gap-3",
|
|
506
|
-
children: [/* @__PURE__ */
|
|
506
|
+
children: [/* @__PURE__ */ f("div", {
|
|
507
507
|
className: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-orange-100",
|
|
508
|
-
children: /* @__PURE__ */
|
|
509
|
-
}), /* @__PURE__ */
|
|
508
|
+
children: /* @__PURE__ */ f(ae, { className: "size-5 text-orange-600" })
|
|
509
|
+
}), /* @__PURE__ */ f("div", {
|
|
510
510
|
className: "min-w-0 flex-1",
|
|
511
|
-
children: /* @__PURE__ */
|
|
511
|
+
children: /* @__PURE__ */ f("p", {
|
|
512
512
|
className: "font-semibold text-gray-900 leading-tight",
|
|
513
513
|
children: X
|
|
514
514
|
})
|
|
515
515
|
})]
|
|
516
516
|
}),
|
|
517
|
-
|
|
517
|
+
c.qr_image?.location && /* @__PURE__ */ f("div", {
|
|
518
518
|
className: "mb-4 flex flex-col items-center",
|
|
519
|
-
children: /* @__PURE__ */
|
|
519
|
+
children: /* @__PURE__ */ f("div", {
|
|
520
520
|
className: "rounded-lg border border-gray-200 bg-white p-2",
|
|
521
|
-
children: /* @__PURE__ */
|
|
522
|
-
src:
|
|
521
|
+
children: /* @__PURE__ */ f("img", {
|
|
522
|
+
src: c.qr_image.location,
|
|
523
523
|
alt: "Booking QR Code",
|
|
524
524
|
className: "size-24"
|
|
525
525
|
})
|
|
526
526
|
})
|
|
527
527
|
}),
|
|
528
|
-
/* @__PURE__ */
|
|
528
|
+
/* @__PURE__ */ p("div", {
|
|
529
529
|
className: "mb-4 flex items-center justify-between rounded-lg bg-gray-50 px-3 py-2.5",
|
|
530
|
-
children: [/* @__PURE__ */
|
|
530
|
+
children: [/* @__PURE__ */ f("span", {
|
|
531
531
|
className: "font-medium text-gray-500 text-xs uppercase tracking-wide",
|
|
532
532
|
children: "Booking ID"
|
|
533
|
-
}), /* @__PURE__ */
|
|
533
|
+
}), /* @__PURE__ */ f("span", {
|
|
534
534
|
className: "font-mono font-semibold text-gray-900 text-sm",
|
|
535
|
-
children:
|
|
535
|
+
children: c._id
|
|
536
536
|
})]
|
|
537
537
|
}),
|
|
538
|
-
/* @__PURE__ */
|
|
539
|
-
/* @__PURE__ */
|
|
538
|
+
/* @__PURE__ */ f("div", { className: "my-4 border-gray-200 border-t border-dashed" }),
|
|
539
|
+
/* @__PURE__ */ p("div", {
|
|
540
540
|
className: "space-y-2.5",
|
|
541
|
-
children: [!Y && Q && /* @__PURE__ */
|
|
541
|
+
children: [!Y && Q && /* @__PURE__ */ p("div", {
|
|
542
542
|
className: "flex items-center justify-between",
|
|
543
|
-
children: [/* @__PURE__ */
|
|
543
|
+
children: [/* @__PURE__ */ p("div", {
|
|
544
544
|
className: "flex items-center gap-2 text-gray-500 text-sm",
|
|
545
|
-
children: [/* @__PURE__ */
|
|
546
|
-
}), /* @__PURE__ */
|
|
545
|
+
children: [/* @__PURE__ */ f(m, { className: "size-4" }), /* @__PURE__ */ f("span", { children: "Date & Time" })]
|
|
546
|
+
}), /* @__PURE__ */ p("p", {
|
|
547
547
|
className: "font-medium text-gray-900 text-sm",
|
|
548
548
|
children: [
|
|
549
549
|
R(Q),
|
|
@@ -551,55 +551,55 @@ var y = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
551
551
|
z(Q)
|
|
552
552
|
]
|
|
553
553
|
})]
|
|
554
|
-
}), U.slice(0, 3).map(([e, t]) => /* @__PURE__ */
|
|
554
|
+
}), U.slice(0, 3).map(([e, t]) => /* @__PURE__ */ p("div", {
|
|
555
555
|
className: "flex items-center justify-between",
|
|
556
|
-
children: [/* @__PURE__ */
|
|
556
|
+
children: [/* @__PURE__ */ f("span", {
|
|
557
557
|
className: "text-gray-500 text-sm",
|
|
558
558
|
children: B(e)
|
|
559
|
-
}), Array.isArray(t) ? /* @__PURE__ */
|
|
559
|
+
}), Array.isArray(t) ? /* @__PURE__ */ f(y, {
|
|
560
560
|
items: t,
|
|
561
561
|
textSizeClass: "text-sm"
|
|
562
|
-
}) : /* @__PURE__ */
|
|
562
|
+
}) : /* @__PURE__ */ f("span", {
|
|
563
563
|
className: "max-w-[50%] truncate font-medium text-gray-900 text-sm",
|
|
564
564
|
children: V(t)
|
|
565
565
|
})]
|
|
566
566
|
}, e))]
|
|
567
567
|
}),
|
|
568
|
-
/* @__PURE__ */
|
|
569
|
-
/* @__PURE__ */
|
|
568
|
+
/* @__PURE__ */ f("div", { className: "my-4 border-gray-200 border-t border-dashed" }),
|
|
569
|
+
/* @__PURE__ */ p("div", {
|
|
570
570
|
className: "flex items-center justify-between",
|
|
571
|
-
children: [/* @__PURE__ */
|
|
571
|
+
children: [/* @__PURE__ */ f("span", {
|
|
572
572
|
className: "font-medium text-gray-700",
|
|
573
573
|
children: K ? "Total" : "Amount Paid"
|
|
574
|
-
}), /* @__PURE__ */
|
|
574
|
+
}), /* @__PURE__ */ f("span", {
|
|
575
575
|
className: "font-bold text-gray-900 text-lg",
|
|
576
|
-
children: K ? "Free" : L(
|
|
576
|
+
children: K ? "Free" : L(c.total_amount, c.currency)
|
|
577
577
|
})]
|
|
578
578
|
}),
|
|
579
579
|
(() => {
|
|
580
|
-
let e = me?.invoice?.location ||
|
|
581
|
-
return e ? /* @__PURE__ */
|
|
580
|
+
let e = me?.invoice?.location || c.invoice?.location;
|
|
581
|
+
return e ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("div", { className: "my-4 border-gray-200 border-t border-dashed" }), /* @__PURE__ */ p("a", {
|
|
582
582
|
href: e,
|
|
583
583
|
target: "_blank",
|
|
584
584
|
rel: "noopener noreferrer",
|
|
585
585
|
className: "flex w-full items-center justify-center gap-2 rounded-lg border border-gray-200 bg-gray-50 px-4 py-2.5 font-medium text-gray-700 text-sm transition-colors hover:bg-gray-100",
|
|
586
|
-
children: [/* @__PURE__ */
|
|
586
|
+
children: [/* @__PURE__ */ f(te, { className: "size-4" }), "Download Invoice"]
|
|
587
587
|
})] }) : null;
|
|
588
588
|
})()
|
|
589
589
|
]
|
|
590
590
|
})
|
|
591
591
|
]
|
|
592
592
|
}),
|
|
593
|
-
S && /* @__PURE__ */
|
|
593
|
+
S && /* @__PURE__ */ f("div", {
|
|
594
594
|
className: "mx-auto mt-5 max-w-lg",
|
|
595
|
-
children: /* @__PURE__ */
|
|
595
|
+
children: /* @__PURE__ */ f(e, {
|
|
596
596
|
elementKey: "booking-done-btn",
|
|
597
597
|
onClick: S,
|
|
598
598
|
className: "flex w-full items-center justify-center gap-2 rounded-lg bg-gray-900 px-4 py-3.5 font-semibold text-white transition-colors hover:bg-gray-800",
|
|
599
599
|
children: "Done"
|
|
600
600
|
})
|
|
601
601
|
}),
|
|
602
|
-
/* @__PURE__ */
|
|
602
|
+
/* @__PURE__ */ f("p", {
|
|
603
603
|
className: "mt-4 text-center text-gray-400 text-xs",
|
|
604
604
|
children: "A confirmation has been sent to your email"
|
|
605
605
|
})
|
|
@@ -608,13 +608,13 @@ var y = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
608
608
|
})
|
|
609
609
|
]
|
|
610
610
|
}),
|
|
611
|
-
pe && x && /* @__PURE__ */
|
|
611
|
+
pe && x && /* @__PURE__ */ f("div", {
|
|
612
612
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
|
|
613
|
-
children: /* @__PURE__ */
|
|
613
|
+
children: /* @__PURE__ */ f("div", {
|
|
614
614
|
className: "max-h-[90vh] w-full max-w-lg overflow-auto rounded-xl bg-white shadow-xl",
|
|
615
|
-
children: /* @__PURE__ */
|
|
615
|
+
children: /* @__PURE__ */ f(a, {
|
|
616
616
|
isEdit: !0,
|
|
617
|
-
prefillData: b ||
|
|
617
|
+
prefillData: b || c.billing_details,
|
|
618
618
|
onSubmit: (e) => {
|
|
619
619
|
x(e), M(!1);
|
|
620
620
|
},
|
|
@@ -622,7 +622,7 @@ var y = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
622
622
|
})
|
|
623
623
|
})
|
|
624
624
|
}),
|
|
625
|
-
E && T && /* @__PURE__ */
|
|
625
|
+
E && T && /* @__PURE__ */ f(i, {
|
|
626
626
|
isOpen: E,
|
|
627
627
|
onClose: () => {
|
|
628
628
|
D(), k("summary");
|