@levo-so/studio 0.3.19 → 0.3.20
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-Cskl5Sbc.js → BillingStep-BTDOMFHV.js} +1 -1
- package/{Button-D6OAkNtW.js → Button-DXLWW3dp.js} +1 -1
- package/{EntryCard-NCSYl-4A.js → EntryCard-9yv0KJTB.js} +1 -1
- package/{LoginCard-BC05UxFH.js → LoginCard-D9vEC_g0.js} +1 -1
- package/{PendingApprovalCard-B7sm8CZ_.js → PendingApprovalCard-CzoBgYNy.js} +1 -1
- package/{PhoneWidget-BkzFjfKW.js → PhoneWidget-BtMMfGLu.js} +5 -5
- package/{PopupBody-BI-MJqmd-C9i44N2h.js → PopupBody-BI-MJqmd-B3ltSYMP.js} +1 -1
- package/{PopupRenderer-D66Gx63H-dYKKhHdA.js → PopupRenderer-D66Gx63H-ChI4WBer.js} +1 -1
- package/{ProfileCard-DM1Jspj_.js → ProfileCard-Chg20HBa.js} +1 -1
- package/{bookingCard-CY0SAnVm.js → bookingCard-g0n3ksiC.js} +232 -264
- package/collection.js +1 -1
- package/{dist-Dq-z9c3T.js → dist-Dijjo-5m.js} +1066 -951
- package/index.d.ts +46 -55
- package/index.js +2368 -2413
- package/package.json +5 -4
- package/useCheckout-DFalmfEQ.js +161 -0
- package/StripePaymentModal-C3bQ0jQi.js +0 -56
|
@@ -1,53 +1,56 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as e } from "./Button-
|
|
2
|
+
import { t as e } from "./Button-DXLWW3dp.js";
|
|
3
3
|
import { n as t } from "./AuthProvider-B5NfFwbG.js";
|
|
4
4
|
import { t as n } from "./cn-B6c1DjO_.js";
|
|
5
|
-
import {
|
|
6
|
-
import { BillingStep as
|
|
7
|
-
import { errorHandler as
|
|
8
|
-
import { useEffect as
|
|
9
|
-
import { Fragment as
|
|
10
|
-
import { Calendar as
|
|
11
|
-
import
|
|
12
|
-
import { useRazorpay as se } from "react-razorpay";
|
|
5
|
+
import { t as r } from "./useCheckout-DFalmfEQ.js";
|
|
6
|
+
import { BillingStep as i } from "./BillingStep-BTDOMFHV.js";
|
|
7
|
+
import { errorHandler as a, useLevo as o } from "@levo-so/react";
|
|
8
|
+
import { useEffect as s, useRef as c, useState as l } from "react";
|
|
9
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
10
|
+
import { Calendar as p, CheckCircle2 as m, Clock as h, CreditCard as ee, Download as te, Loader2 as ne, Pencil as re, RefreshCw as g, ShieldCheck as _, Ticket as v, XCircle as ie } from "lucide-react";
|
|
11
|
+
import y from "dayjs";
|
|
13
12
|
//#region src/components/bookingCard/BookingCard.tsx
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
var b = {
|
|
14
|
+
cashfree: "Cashfree",
|
|
15
|
+
razorpay: "Razorpay",
|
|
16
|
+
stripe: "Stripe"
|
|
17
|
+
}, x = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
18
|
+
let [r, i] = l(!1), a = c(null);
|
|
19
|
+
if (s(() => {
|
|
17
20
|
if (!r) return;
|
|
18
21
|
let e = (e) => {
|
|
19
22
|
a.current && !a.current.contains(e.target) && i(!1);
|
|
20
23
|
};
|
|
21
24
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
22
|
-
}, [r]), e.length === 0) return /* @__PURE__ */
|
|
25
|
+
}, [r]), e.length === 0) return /* @__PURE__ */ d("span", {
|
|
23
26
|
className: n("text-gray-900", t),
|
|
24
27
|
children: "-"
|
|
25
28
|
});
|
|
26
|
-
let o = String(e[0] ?? "-"),
|
|
27
|
-
return /* @__PURE__ */
|
|
29
|
+
let o = String(e[0] ?? "-"), u = e.length - 1;
|
|
30
|
+
return /* @__PURE__ */ f("div", {
|
|
28
31
|
ref: a,
|
|
29
32
|
className: "relative inline-block",
|
|
30
33
|
onMouseEnter: () => i(!0),
|
|
31
34
|
onMouseLeave: () => i(!1),
|
|
32
|
-
children: [/* @__PURE__ */
|
|
35
|
+
children: [/* @__PURE__ */ f("button", {
|
|
33
36
|
type: "button",
|
|
34
37
|
onClick: () => i((e) => !e),
|
|
35
38
|
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,
|
|
39
|
+
children: [o, u > 0 && /* @__PURE__ */ f("span", {
|
|
37
40
|
className: "ml-1 font-normal text-gray-500",
|
|
38
41
|
children: [
|
|
39
42
|
"+",
|
|
40
|
-
|
|
43
|
+
u,
|
|
41
44
|
" more"
|
|
42
45
|
]
|
|
43
46
|
})]
|
|
44
|
-
}), r && /* @__PURE__ */
|
|
47
|
+
}), r && /* @__PURE__ */ d("div", {
|
|
45
48
|
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__ */
|
|
49
|
+
children: /* @__PURE__ */ d("ul", {
|
|
47
50
|
className: "space-y-1.5 text-left",
|
|
48
|
-
children: e.map((e, t) => /* @__PURE__ */
|
|
51
|
+
children: e.map((e, t) => /* @__PURE__ */ f("li", {
|
|
49
52
|
className: "flex items-start gap-2 text-gray-700 text-xs leading-snug",
|
|
50
|
-
children: [/* @__PURE__ */
|
|
53
|
+
children: [/* @__PURE__ */ d("span", { className: "mt-1.5 size-1 shrink-0 rounded-full bg-orange-400" }), /* @__PURE__ */ d("span", {
|
|
51
54
|
className: "break-words",
|
|
52
55
|
children: String(e ?? "-")
|
|
53
56
|
})]
|
|
@@ -55,188 +58,161 @@ var y = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
55
58
|
})
|
|
56
59
|
})]
|
|
57
60
|
});
|
|
58
|
-
},
|
|
59
|
-
let
|
|
61
|
+
}, S = ({ summary: s, billingDetails: c, onBillingEdit: S, onComplete: C, className: w }) => {
|
|
62
|
+
let T = o(), { workspace: E } = t(), D = r(), [O, k] = l("summary"), [A, j] = l(null), [M, N] = l(!1), [P, F] = l(null), [I, L] = l("razorpay"), R = (e, t) => {
|
|
60
63
|
let n = t && t.trim() ? t : "INR", r = e / 100;
|
|
61
64
|
return new Intl.NumberFormat("en-IN", {
|
|
62
65
|
style: "currency",
|
|
63
66
|
currency: n,
|
|
64
67
|
minimumFractionDigits: 0
|
|
65
68
|
}).format(r);
|
|
66
|
-
},
|
|
69
|
+
}, z = (e) => e ? y(e).format("D MMM YYYY") : null, B = (e) => e ? y(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 = () => {
|
|
67
70
|
try {
|
|
68
71
|
Object.keys(localStorage).forEach((e) => {
|
|
69
72
|
e.startsWith("levo_collection_cart_") && localStorage.removeItem(e);
|
|
70
73
|
}), window.dispatchEvent(new Event("levo_cart_updated"));
|
|
71
74
|
} catch (e) {
|
|
72
|
-
|
|
75
|
+
a(e);
|
|
73
76
|
}
|
|
74
|
-
},
|
|
75
|
-
if (!I.current) return;
|
|
76
|
-
let e = I.current;
|
|
77
|
-
C?.fetch?.url(`/v1/payment/booking/${c._id}/confirm`)?.options({ headers: { Origin: w?.id || "" } })?.post({ session_id: e })?.json().then((e) => {
|
|
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
|
-
}).catch((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
|
-
});
|
|
82
|
-
}, G = async () => {
|
|
77
|
+
}, W = Object.entries(s.form_data || {}).filter(([e, t]) => t != null && t !== ""), G = async () => {
|
|
83
78
|
k("processing"), j(null);
|
|
84
79
|
try {
|
|
85
|
-
let e =
|
|
86
|
-
if (n?.status
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
80
|
+
let e = c || s.billing_details, t = e ? { billing_details: e } : {}, n = await T?.fetch?.url(`/v1/payment/booking/${s._id}/pay`)?.options({ headers: { Origin: E?.id || "" } })?.post(t).json(), r = n?.content?.meta;
|
|
81
|
+
if (!n?.status || !r?.key) {
|
|
82
|
+
j("Unable to initiate payment. Please try again."), k("failed");
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
L(r.provider || "razorpay");
|
|
86
|
+
let i = await D.open(r, {
|
|
87
|
+
amount: r.amount ?? 0,
|
|
88
|
+
merchantName: E?.name ?? "",
|
|
89
|
+
description: X || "Booking Payment",
|
|
90
|
+
prefill: {
|
|
91
|
+
name: "",
|
|
92
|
+
email: "",
|
|
93
|
+
contact: ""
|
|
94
|
+
},
|
|
95
|
+
themeColor: "#FC751A"
|
|
96
|
+
});
|
|
97
|
+
i.status === "completed" ? await ae(i.confirmation) : i.status === "closed" && (i.message ? (j(i.message), k("failed")) : k("summary"));
|
|
97
98
|
} catch (e) {
|
|
98
|
-
console.error("Initiate payment error:", e),
|
|
99
|
+
console.error("Initiate payment error:", e), a(e), j("Unable to initiate payment. Please check your connection and try again."), k("failed");
|
|
99
100
|
}
|
|
100
|
-
},
|
|
101
|
-
P.current = !1, F.current = null;
|
|
102
|
-
let t = {
|
|
103
|
-
key: e.key,
|
|
104
|
-
amount: e.amount,
|
|
105
|
-
currency: e.currency,
|
|
106
|
-
order_id: e.order_id,
|
|
107
|
-
name: w?.name ?? "",
|
|
108
|
-
description: X || "Booking Payment",
|
|
109
|
-
handler: (e) => {
|
|
110
|
-
ve({
|
|
111
|
-
order_id: e.razorpay_order_id,
|
|
112
|
-
payment_id: e.razorpay_payment_id,
|
|
113
|
-
signature: e.razorpay_signature
|
|
114
|
-
});
|
|
115
|
-
},
|
|
116
|
-
theme: { color: "#FC751A" }
|
|
117
|
-
};
|
|
118
|
-
t.modal = { ondismiss: () => {
|
|
119
|
-
P.current ? (j(F.current || "Payment failed. Please try again."), k("failed")) : k("summary");
|
|
120
|
-
} };
|
|
121
|
-
let n = new le(t);
|
|
122
|
-
n.on("payment.failed", () => {
|
|
123
|
-
P.current = !0, F.current = "Payment was declined. Please try a different payment method.";
|
|
124
|
-
}), n.open();
|
|
125
|
-
}, ve = async (e) => {
|
|
101
|
+
}, ae = async (e) => {
|
|
126
102
|
try {
|
|
127
|
-
let t = await
|
|
128
|
-
t?.status && t?.content?.data ? (
|
|
103
|
+
let t = await T?.fetch?.url(`/v1/payment/booking/${s._id}/confirm`)?.options({ headers: { Origin: E?.id || "" } })?.post(e).json();
|
|
104
|
+
t?.status && t?.content?.data ? (F(t.content.data), k("confirmed"), U()) : (j("Payment received but confirmation failed. Please contact support."), k("failed"));
|
|
129
105
|
} catch (e) {
|
|
130
|
-
console.error("Confirm payment error:", e),
|
|
106
|
+
console.error("Confirm payment error:", e), a(e), j("Payment received but confirmation failed. Please contact support."), k("failed");
|
|
131
107
|
}
|
|
132
|
-
}, K = !
|
|
133
|
-
return /* @__PURE__ */
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
-
className: n("overflow-hidden rounded-xl border border-gray-200 bg-white shadow-sm",
|
|
108
|
+
}, K = !s.total_amount || s.total_amount === 0, q = s.line_items || [], J = q[0], Y = q.length > 1, X = Y ? s.context_label || "Booking" : J?.instance_label || s.context_label || "Booking", Z = J?.cover_image?.location || null, Q = J?.starts_at || null, $ = J?.ends_at || null;
|
|
109
|
+
return /* @__PURE__ */ f(u, { children: [
|
|
110
|
+
/* @__PURE__ */ f("div", {
|
|
111
|
+
className: n("overflow-hidden rounded-xl border border-gray-200 bg-white shadow-sm", w),
|
|
136
112
|
children: [
|
|
137
|
-
O === "summary" && /* @__PURE__ */
|
|
113
|
+
O === "summary" && /* @__PURE__ */ f("div", {
|
|
138
114
|
className: "flex flex-col",
|
|
139
|
-
children: [Z && /* @__PURE__ */
|
|
115
|
+
children: [Z && /* @__PURE__ */ f("div", {
|
|
140
116
|
className: "relative h-44 w-full overflow-hidden bg-gray-100",
|
|
141
|
-
children: [/* @__PURE__ */
|
|
117
|
+
children: [/* @__PURE__ */ d("img", {
|
|
142
118
|
src: Z,
|
|
143
119
|
alt: X,
|
|
144
120
|
className: "h-full w-full object-cover"
|
|
145
|
-
}), /* @__PURE__ */
|
|
146
|
-
}), /* @__PURE__ */
|
|
121
|
+
}), /* @__PURE__ */ d("div", { className: "absolute inset-0 bg-gradient-to-t from-black/30 to-transparent" })]
|
|
122
|
+
}), /* @__PURE__ */ f("div", {
|
|
147
123
|
className: "flex flex-col px-6 py-5 sm:px-8",
|
|
148
124
|
children: [
|
|
149
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ f("div", {
|
|
150
126
|
className: "mx-auto mb-5 w-full max-w-lg text-center",
|
|
151
|
-
children: [/* @__PURE__ */
|
|
127
|
+
children: [/* @__PURE__ */ d("p", {
|
|
152
128
|
className: "mb-1 font-medium text-gray-500 text-xs uppercase tracking-wider",
|
|
153
129
|
children: "Booking Summary"
|
|
154
|
-
}), /* @__PURE__ */
|
|
130
|
+
}), /* @__PURE__ */ d("h3", {
|
|
155
131
|
className: "font-semibold text-gray-900 text-xl leading-tight",
|
|
156
132
|
children: X
|
|
157
133
|
})]
|
|
158
134
|
}),
|
|
159
|
-
!Y && (Q || $) && /* @__PURE__ */
|
|
135
|
+
!Y && (Q || $) && /* @__PURE__ */ f("div", {
|
|
160
136
|
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__ */
|
|
137
|
+
children: [Q && /* @__PURE__ */ f("div", {
|
|
162
138
|
className: "flex items-center gap-2 text-gray-700 text-sm",
|
|
163
|
-
children: [/* @__PURE__ */
|
|
164
|
-
}), Q && /* @__PURE__ */
|
|
139
|
+
children: [/* @__PURE__ */ d(p, { className: "size-4 text-orange-500" }), /* @__PURE__ */ d("span", { children: z(Q) })]
|
|
140
|
+
}), Q && /* @__PURE__ */ f("div", {
|
|
165
141
|
className: "flex items-center gap-2 text-gray-700 text-sm",
|
|
166
|
-
children: [/* @__PURE__ */
|
|
142
|
+
children: [/* @__PURE__ */ d(h, { className: "size-4 text-orange-500" }), /* @__PURE__ */ d("span", { children: B(Q) })]
|
|
167
143
|
})]
|
|
168
144
|
}),
|
|
169
|
-
|
|
145
|
+
W.length > 0 && /* @__PURE__ */ f("div", {
|
|
170
146
|
className: "mx-auto mb-5 w-full max-w-lg",
|
|
171
|
-
children: [/* @__PURE__ */
|
|
147
|
+
children: [/* @__PURE__ */ d("h4", {
|
|
172
148
|
className: "mb-3 text-center font-medium text-gray-500 text-xs uppercase tracking-wider",
|
|
173
149
|
children: "Your Details"
|
|
174
|
-
}), /* @__PURE__ */
|
|
150
|
+
}), /* @__PURE__ */ d("div", {
|
|
175
151
|
className: "rounded-lg border border-gray-100 bg-gray-50/50 p-4",
|
|
176
|
-
children: /* @__PURE__ */
|
|
152
|
+
children: /* @__PURE__ */ d("div", {
|
|
177
153
|
className: "space-y-2.5",
|
|
178
|
-
children:
|
|
154
|
+
children: W.map(([e, t]) => /* @__PURE__ */ f("div", {
|
|
179
155
|
className: "flex items-start justify-between gap-3",
|
|
180
|
-
children: [/* @__PURE__ */
|
|
156
|
+
children: [/* @__PURE__ */ d("span", {
|
|
181
157
|
className: "text-gray-500 text-sm",
|
|
182
|
-
children:
|
|
183
|
-
}), Array.isArray(t) ? /* @__PURE__ */
|
|
158
|
+
children: V(e)
|
|
159
|
+
}), Array.isArray(t) ? /* @__PURE__ */ d(x, {
|
|
184
160
|
items: t,
|
|
185
161
|
textSizeClass: "text-sm"
|
|
186
|
-
}) : /* @__PURE__ */
|
|
162
|
+
}) : /* @__PURE__ */ d("span", {
|
|
187
163
|
className: "text-right font-medium text-gray-900 text-sm",
|
|
188
|
-
children:
|
|
164
|
+
children: H(t)
|
|
189
165
|
})]
|
|
190
166
|
}, e))
|
|
191
167
|
})
|
|
192
168
|
})]
|
|
193
169
|
}),
|
|
194
170
|
(() => {
|
|
195
|
-
let e =
|
|
196
|
-
return e ? /* @__PURE__ */
|
|
171
|
+
let e = c || s.billing_details;
|
|
172
|
+
return e ? /* @__PURE__ */ f("div", {
|
|
197
173
|
className: "mx-auto mb-5 w-full max-w-lg",
|
|
198
|
-
children: [/* @__PURE__ */
|
|
174
|
+
children: [/* @__PURE__ */ f("div", {
|
|
199
175
|
className: "mb-3 flex items-center justify-center gap-2",
|
|
200
|
-
children: [/* @__PURE__ */
|
|
176
|
+
children: [/* @__PURE__ */ d("h4", {
|
|
201
177
|
className: "text-center font-medium text-gray-500 text-xs uppercase tracking-wider",
|
|
202
178
|
children: "Billing Details"
|
|
203
|
-
}),
|
|
179
|
+
}), S && /* @__PURE__ */ d("button", {
|
|
204
180
|
type: "button",
|
|
205
|
-
onClick: () =>
|
|
181
|
+
onClick: () => N(!0),
|
|
206
182
|
className: "text-orange-500 hover:text-orange-600",
|
|
207
|
-
children: /* @__PURE__ */
|
|
183
|
+
children: /* @__PURE__ */ d(re, { className: "size-3.5" })
|
|
208
184
|
})]
|
|
209
|
-
}), /* @__PURE__ */
|
|
185
|
+
}), /* @__PURE__ */ d("div", {
|
|
210
186
|
className: "rounded-lg border border-gray-100 bg-gray-50/50 p-4",
|
|
211
|
-
children: /* @__PURE__ */
|
|
187
|
+
children: /* @__PURE__ */ f("div", {
|
|
212
188
|
className: "space-y-2.5",
|
|
213
189
|
children: [
|
|
214
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ f("div", {
|
|
215
191
|
className: "flex items-start justify-between gap-3",
|
|
216
|
-
children: [/* @__PURE__ */
|
|
192
|
+
children: [/* @__PURE__ */ d("span", {
|
|
217
193
|
className: "text-gray-500 text-sm",
|
|
218
194
|
children: "Name"
|
|
219
|
-
}), /* @__PURE__ */
|
|
195
|
+
}), /* @__PURE__ */ d("span", {
|
|
220
196
|
className: "text-right font-medium text-gray-900 text-sm",
|
|
221
197
|
children: e.name
|
|
222
198
|
})]
|
|
223
199
|
}),
|
|
224
|
-
e.tax_id && /* @__PURE__ */
|
|
200
|
+
e.tax_id && /* @__PURE__ */ f("div", {
|
|
225
201
|
className: "flex items-start justify-between gap-3",
|
|
226
|
-
children: [/* @__PURE__ */
|
|
202
|
+
children: [/* @__PURE__ */ d("span", {
|
|
227
203
|
className: "text-gray-500 text-sm",
|
|
228
204
|
children: "Tax ID"
|
|
229
|
-
}), /* @__PURE__ */
|
|
205
|
+
}), /* @__PURE__ */ d("span", {
|
|
230
206
|
className: "text-right font-medium text-gray-900 text-sm",
|
|
231
207
|
children: e.tax_id
|
|
232
208
|
})]
|
|
233
209
|
}),
|
|
234
|
-
/* @__PURE__ */
|
|
210
|
+
/* @__PURE__ */ f("div", {
|
|
235
211
|
className: "flex items-start justify-between gap-3",
|
|
236
|
-
children: [/* @__PURE__ */
|
|
212
|
+
children: [/* @__PURE__ */ d("span", {
|
|
237
213
|
className: "text-gray-500 text-sm",
|
|
238
214
|
children: "Address"
|
|
239
|
-
}), /* @__PURE__ */
|
|
215
|
+
}), /* @__PURE__ */ d("span", {
|
|
240
216
|
className: "text-right font-medium text-gray-900 text-sm",
|
|
241
217
|
children: [
|
|
242
218
|
e.address.line1,
|
|
@@ -253,353 +229,353 @@ var y = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
253
229
|
})]
|
|
254
230
|
}) : null;
|
|
255
231
|
})(),
|
|
256
|
-
/* @__PURE__ */
|
|
232
|
+
/* @__PURE__ */ f("div", {
|
|
257
233
|
className: "mx-auto mb-5 w-full max-w-lg",
|
|
258
|
-
children: [/* @__PURE__ */
|
|
234
|
+
children: [/* @__PURE__ */ d("h4", {
|
|
259
235
|
className: "mb-3 text-center font-medium text-gray-500 text-xs uppercase tracking-wider",
|
|
260
236
|
children: "Payment"
|
|
261
|
-
}), /* @__PURE__ */
|
|
237
|
+
}), /* @__PURE__ */ f("div", {
|
|
262
238
|
className: "rounded-lg border border-gray-200 bg-white p-4",
|
|
263
|
-
children: [/* @__PURE__ */
|
|
239
|
+
children: [/* @__PURE__ */ f("div", {
|
|
264
240
|
className: "space-y-2",
|
|
265
241
|
children: [
|
|
266
|
-
q.map((e) => /* @__PURE__ */
|
|
242
|
+
q.map((e) => /* @__PURE__ */ f("div", {
|
|
267
243
|
className: "flex items-start justify-between gap-3 text-sm",
|
|
268
|
-
children: [/* @__PURE__ */
|
|
244
|
+
children: [/* @__PURE__ */ f("span", {
|
|
269
245
|
className: "min-w-0 flex-1 text-gray-600",
|
|
270
|
-
children: [/* @__PURE__ */
|
|
246
|
+
children: [/* @__PURE__ */ d("span", {
|
|
271
247
|
className: "break-words",
|
|
272
248
|
children: e.instance_label
|
|
273
|
-
}), e.quantity > 1 && /* @__PURE__ */
|
|
249
|
+
}), e.quantity > 1 && /* @__PURE__ */ f("span", {
|
|
274
250
|
className: "ml-1 text-gray-400",
|
|
275
251
|
children: ["×", e.quantity]
|
|
276
252
|
})]
|
|
277
|
-
}), /* @__PURE__ */
|
|
253
|
+
}), /* @__PURE__ */ d("span", {
|
|
278
254
|
className: "shrink-0 text-gray-900",
|
|
279
|
-
children:
|
|
255
|
+
children: R(e.line_subtotal, s.currency)
|
|
280
256
|
})]
|
|
281
257
|
}, e.resource_instance)),
|
|
282
|
-
typeof
|
|
258
|
+
typeof s.discount == "number" && s.discount > 0 && /* @__PURE__ */ f("div", {
|
|
283
259
|
className: "flex items-center justify-between text-sm",
|
|
284
|
-
children: [/* @__PURE__ */
|
|
260
|
+
children: [/* @__PURE__ */ d("span", {
|
|
285
261
|
className: "text-gray-600",
|
|
286
262
|
children: "Discount"
|
|
287
|
-
}), /* @__PURE__ */
|
|
263
|
+
}), /* @__PURE__ */ f("span", {
|
|
288
264
|
className: "text-green-600",
|
|
289
|
-
children: ["-",
|
|
265
|
+
children: ["-", R(s.discount, s.currency)]
|
|
290
266
|
})]
|
|
291
267
|
}),
|
|
292
|
-
|
|
268
|
+
s.taxes && s.taxes.length > 0 && s.taxes.map((e) => /* @__PURE__ */ f("div", {
|
|
293
269
|
className: "flex items-center justify-between text-sm",
|
|
294
|
-
children: [/* @__PURE__ */
|
|
270
|
+
children: [/* @__PURE__ */ d("span", {
|
|
295
271
|
className: "text-gray-600",
|
|
296
272
|
children: e.label
|
|
297
|
-
}), /* @__PURE__ */
|
|
273
|
+
}), /* @__PURE__ */ d("span", {
|
|
298
274
|
className: "text-gray-900",
|
|
299
|
-
children:
|
|
275
|
+
children: R(e.amount, s.currency)
|
|
300
276
|
})]
|
|
301
277
|
}, e.id))
|
|
302
278
|
]
|
|
303
|
-
}), /* @__PURE__ */
|
|
279
|
+
}), /* @__PURE__ */ f("div", {
|
|
304
280
|
className: "mt-3 flex items-center justify-between border-gray-100 border-t pt-3",
|
|
305
|
-
children: [/* @__PURE__ */
|
|
281
|
+
children: [/* @__PURE__ */ d("span", {
|
|
306
282
|
className: "font-medium text-gray-900",
|
|
307
283
|
children: "Total"
|
|
308
|
-
}), /* @__PURE__ */
|
|
284
|
+
}), /* @__PURE__ */ d("span", {
|
|
309
285
|
className: "font-bold text-gray-900 text-xl",
|
|
310
|
-
children: K ? "Free" :
|
|
286
|
+
children: K ? "Free" : R(s.total_amount, s.currency)
|
|
311
287
|
})]
|
|
312
288
|
})]
|
|
313
289
|
})]
|
|
314
290
|
}),
|
|
315
|
-
/* @__PURE__ */
|
|
291
|
+
/* @__PURE__ */ d(e, {
|
|
316
292
|
elementKey: "booking-pay-btn",
|
|
317
293
|
onClick: K ? () => {
|
|
318
|
-
k("confirmed"),
|
|
294
|
+
k("confirmed"), U();
|
|
319
295
|
} : G,
|
|
320
296
|
className: "mx-auto w-full max-w-lg rounded-lg px-4 py-3.5 font-semibold",
|
|
321
|
-
children: /* @__PURE__ */
|
|
297
|
+
children: /* @__PURE__ */ d("span", {
|
|
322
298
|
className: "flex items-center justify-center gap-2",
|
|
323
|
-
children: K ? /* @__PURE__ */
|
|
299
|
+
children: K ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(m, { className: "size-5" }), /* @__PURE__ */ d("span", { children: "Confirm Booking" })] }) : /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(ee, { className: "size-5" }), /* @__PURE__ */ f("span", { children: ["Pay ", R(s.total_amount, s.currency)] })] })
|
|
324
300
|
})
|
|
325
301
|
}),
|
|
326
|
-
!K && /* @__PURE__ */
|
|
302
|
+
!K && /* @__PURE__ */ f("div", {
|
|
327
303
|
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__ */
|
|
304
|
+
children: [/* @__PURE__ */ d(_, { className: "size-3.5" }), /* @__PURE__ */ d("span", { children: "Secure payment" })]
|
|
329
305
|
})
|
|
330
306
|
]
|
|
331
307
|
})]
|
|
332
308
|
}),
|
|
333
|
-
O === "processing" && /* @__PURE__ */
|
|
309
|
+
O === "processing" && /* @__PURE__ */ f("div", {
|
|
334
310
|
className: "flex flex-col items-center justify-center px-6 py-16",
|
|
335
311
|
children: [
|
|
336
|
-
/* @__PURE__ */
|
|
312
|
+
/* @__PURE__ */ f("div", {
|
|
337
313
|
className: "relative mb-6",
|
|
338
|
-
children: [/* @__PURE__ */
|
|
314
|
+
children: [/* @__PURE__ */ d("div", { className: "absolute inset-0 animate-ping rounded-full bg-orange-200 opacity-75" }), /* @__PURE__ */ d("div", {
|
|
339
315
|
className: "relative flex size-16 items-center justify-center rounded-full bg-orange-100",
|
|
340
|
-
children: /* @__PURE__ */
|
|
316
|
+
children: /* @__PURE__ */ d(ne, { className: "size-8 animate-spin text-orange-500" })
|
|
341
317
|
})]
|
|
342
318
|
}),
|
|
343
|
-
/* @__PURE__ */
|
|
319
|
+
/* @__PURE__ */ d("h3", {
|
|
344
320
|
className: "mb-1 font-semibold text-gray-900 text-lg",
|
|
345
321
|
children: "Processing Payment"
|
|
346
322
|
}),
|
|
347
|
-
/* @__PURE__ */
|
|
323
|
+
/* @__PURE__ */ d("p", {
|
|
348
324
|
className: "text-center text-gray-500 text-sm",
|
|
349
325
|
children: "Please wait while we confirm your payment..."
|
|
350
326
|
}),
|
|
351
|
-
/* @__PURE__ */
|
|
327
|
+
/* @__PURE__ */ d("div", {
|
|
352
328
|
className: "mt-6 rounded-lg bg-gray-50 px-6 py-3",
|
|
353
|
-
children: /* @__PURE__ */
|
|
329
|
+
children: /* @__PURE__ */ f("p", {
|
|
354
330
|
className: "text-center text-gray-600 text-sm",
|
|
355
331
|
children: [
|
|
356
332
|
"Amount:",
|
|
357
333
|
" ",
|
|
358
|
-
/* @__PURE__ */
|
|
334
|
+
/* @__PURE__ */ d("span", {
|
|
359
335
|
className: "font-semibold text-gray-900",
|
|
360
|
-
children:
|
|
336
|
+
children: R(s.total_amount, s.currency)
|
|
361
337
|
})
|
|
362
338
|
]
|
|
363
339
|
})
|
|
364
340
|
})
|
|
365
341
|
]
|
|
366
342
|
}),
|
|
367
|
-
O === "failed" && /* @__PURE__ */
|
|
343
|
+
O === "failed" && /* @__PURE__ */ f("div", {
|
|
368
344
|
className: "flex flex-col",
|
|
369
|
-
children: [/* @__PURE__ */
|
|
345
|
+
children: [/* @__PURE__ */ d("div", {
|
|
370
346
|
className: "bg-gradient-to-br from-red-50 to-orange-50 px-6 py-6",
|
|
371
|
-
children: /* @__PURE__ */
|
|
347
|
+
children: /* @__PURE__ */ f("div", {
|
|
372
348
|
className: "flex flex-col items-center",
|
|
373
349
|
children: [
|
|
374
|
-
/* @__PURE__ */
|
|
350
|
+
/* @__PURE__ */ d("div", {
|
|
375
351
|
className: "mb-3 flex size-14 items-center justify-center rounded-full bg-red-100",
|
|
376
|
-
children: /* @__PURE__ */
|
|
352
|
+
children: /* @__PURE__ */ d(ie, { className: "size-8 text-red-500" })
|
|
377
353
|
}),
|
|
378
|
-
/* @__PURE__ */
|
|
354
|
+
/* @__PURE__ */ d("h3", {
|
|
379
355
|
className: "mb-1 font-semibold text-gray-900 text-lg",
|
|
380
356
|
children: "Payment Failed"
|
|
381
357
|
}),
|
|
382
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ d("p", {
|
|
383
359
|
className: "text-center text-gray-600 text-sm",
|
|
384
360
|
children: A || "Something went wrong. Please try again."
|
|
385
361
|
})
|
|
386
362
|
]
|
|
387
363
|
})
|
|
388
|
-
}), /* @__PURE__ */
|
|
364
|
+
}), /* @__PURE__ */ f("div", {
|
|
389
365
|
className: "flex flex-col px-6 py-5 sm:px-8",
|
|
390
366
|
children: [
|
|
391
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ d("div", {
|
|
392
368
|
className: "mx-auto mb-4 w-full max-w-lg text-center",
|
|
393
|
-
children: /* @__PURE__ */
|
|
369
|
+
children: /* @__PURE__ */ d("h4", {
|
|
394
370
|
className: "font-semibold text-base text-gray-900",
|
|
395
371
|
children: X
|
|
396
372
|
})
|
|
397
373
|
}),
|
|
398
|
-
!Y && (Q || $) && /* @__PURE__ */
|
|
374
|
+
!Y && (Q || $) && /* @__PURE__ */ f("div", {
|
|
399
375
|
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__ */
|
|
376
|
+
children: [Q && /* @__PURE__ */ f("div", {
|
|
401
377
|
className: "flex items-center gap-2 text-gray-600 text-sm",
|
|
402
|
-
children: [/* @__PURE__ */
|
|
403
|
-
}), Q && /* @__PURE__ */
|
|
378
|
+
children: [/* @__PURE__ */ d(p, { className: "size-4 text-gray-400" }), /* @__PURE__ */ d("span", { children: z(Q) })]
|
|
379
|
+
}), Q && /* @__PURE__ */ f("div", {
|
|
404
380
|
className: "flex items-center gap-2 text-gray-600 text-sm",
|
|
405
|
-
children: [/* @__PURE__ */
|
|
381
|
+
children: [/* @__PURE__ */ d(h, { className: "size-4 text-gray-400" }), /* @__PURE__ */ d("span", { children: B(Q) })]
|
|
406
382
|
})]
|
|
407
383
|
}),
|
|
408
|
-
|
|
384
|
+
W.length > 0 && /* @__PURE__ */ d("div", {
|
|
409
385
|
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__ */
|
|
386
|
+
children: /* @__PURE__ */ f("div", {
|
|
411
387
|
className: "space-y-1.5",
|
|
412
|
-
children: [
|
|
388
|
+
children: [W.slice(0, 3).map(([e, t]) => /* @__PURE__ */ f("div", {
|
|
413
389
|
className: "flex items-center justify-between gap-3 text-sm",
|
|
414
|
-
children: [/* @__PURE__ */
|
|
390
|
+
children: [/* @__PURE__ */ d("span", {
|
|
415
391
|
className: "text-gray-500",
|
|
416
|
-
children:
|
|
417
|
-
}), Array.isArray(t) ? /* @__PURE__ */
|
|
392
|
+
children: V(e)
|
|
393
|
+
}), Array.isArray(t) ? /* @__PURE__ */ d(x, {
|
|
418
394
|
items: t,
|
|
419
395
|
textSizeClass: "text-sm"
|
|
420
|
-
}) : /* @__PURE__ */
|
|
396
|
+
}) : /* @__PURE__ */ d("span", {
|
|
421
397
|
className: "max-w-[50%] truncate font-medium text-gray-900",
|
|
422
|
-
children:
|
|
398
|
+
children: H(t)
|
|
423
399
|
})]
|
|
424
|
-
}, e)),
|
|
400
|
+
}, e)), W.length > 3 && /* @__PURE__ */ f("p", {
|
|
425
401
|
className: "pt-1 text-center text-gray-400 text-xs",
|
|
426
402
|
children: [
|
|
427
403
|
"+",
|
|
428
|
-
|
|
404
|
+
W.length - 3,
|
|
429
405
|
" more"
|
|
430
406
|
]
|
|
431
407
|
})]
|
|
432
408
|
})
|
|
433
409
|
}),
|
|
434
|
-
/* @__PURE__ */
|
|
410
|
+
/* @__PURE__ */ d("div", {
|
|
435
411
|
className: "mx-auto mb-5 w-full max-w-lg rounded-lg border border-gray-200 bg-white p-4",
|
|
436
|
-
children: /* @__PURE__ */
|
|
412
|
+
children: /* @__PURE__ */ f("div", {
|
|
437
413
|
className: "flex items-center justify-between",
|
|
438
|
-
children: [/* @__PURE__ */
|
|
414
|
+
children: [/* @__PURE__ */ d("span", {
|
|
439
415
|
className: "font-medium text-gray-700",
|
|
440
416
|
children: "Amount to Pay"
|
|
441
|
-
}), /* @__PURE__ */
|
|
417
|
+
}), /* @__PURE__ */ d("span", {
|
|
442
418
|
className: "font-bold text-gray-900 text-xl",
|
|
443
|
-
children:
|
|
419
|
+
children: R(s.total_amount, s.currency)
|
|
444
420
|
})]
|
|
445
421
|
})
|
|
446
422
|
}),
|
|
447
|
-
/* @__PURE__ */
|
|
423
|
+
/* @__PURE__ */ d(e, {
|
|
448
424
|
elementKey: "booking-retry-btn",
|
|
449
425
|
onClick: () => {
|
|
450
426
|
j(null), G();
|
|
451
427
|
},
|
|
452
428
|
className: "mx-auto w-full max-w-lg rounded-lg px-4 py-3.5 font-semibold",
|
|
453
|
-
children: /* @__PURE__ */
|
|
429
|
+
children: /* @__PURE__ */ f("span", {
|
|
454
430
|
className: "flex items-center justify-center gap-2",
|
|
455
|
-
children: [/* @__PURE__ */
|
|
431
|
+
children: [/* @__PURE__ */ d(g, { className: "size-5" }), /* @__PURE__ */ d("span", { children: "Try Again" })]
|
|
456
432
|
})
|
|
457
433
|
}),
|
|
458
|
-
/* @__PURE__ */
|
|
434
|
+
/* @__PURE__ */ f("div", {
|
|
459
435
|
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__ */
|
|
436
|
+
children: [/* @__PURE__ */ d(_, { className: "size-3.5" }), /* @__PURE__ */ f("span", { children: ["Secured by ", b[I]] })]
|
|
461
437
|
}),
|
|
462
|
-
/* @__PURE__ */
|
|
438
|
+
/* @__PURE__ */ d("p", {
|
|
463
439
|
className: "mx-auto mt-3 w-full max-w-lg text-center text-gray-400 text-xs",
|
|
464
440
|
children: "If the problem persists, please contact support"
|
|
465
441
|
})
|
|
466
442
|
]
|
|
467
443
|
})]
|
|
468
444
|
}),
|
|
469
|
-
O === "confirmed" && /* @__PURE__ */
|
|
445
|
+
O === "confirmed" && /* @__PURE__ */ f("div", {
|
|
470
446
|
className: "flex flex-col",
|
|
471
|
-
children: [/* @__PURE__ */
|
|
447
|
+
children: [/* @__PURE__ */ d("div", {
|
|
472
448
|
className: "bg-gradient-to-br from-green-50 to-emerald-50 px-6 py-8",
|
|
473
|
-
children: /* @__PURE__ */
|
|
449
|
+
children: /* @__PURE__ */ f("div", {
|
|
474
450
|
className: "flex flex-col items-center",
|
|
475
451
|
children: [
|
|
476
|
-
/* @__PURE__ */
|
|
452
|
+
/* @__PURE__ */ f("div", {
|
|
477
453
|
className: "relative mb-4",
|
|
478
|
-
children: [/* @__PURE__ */
|
|
454
|
+
children: [/* @__PURE__ */ d("div", { className: "absolute -inset-2 animate-pulse rounded-full bg-green-200/50" }), /* @__PURE__ */ d("div", {
|
|
479
455
|
className: "relative flex size-16 items-center justify-center rounded-full bg-green-100 ring-4 ring-green-50",
|
|
480
|
-
children: /* @__PURE__ */
|
|
456
|
+
children: /* @__PURE__ */ d(m, { className: "size-9 text-green-600" })
|
|
481
457
|
})]
|
|
482
458
|
}),
|
|
483
|
-
/* @__PURE__ */
|
|
459
|
+
/* @__PURE__ */ d("h3", {
|
|
484
460
|
className: "mb-1 font-bold text-gray-900 text-xl",
|
|
485
461
|
children: K ? "Booking Confirmed!" : "Payment Successful!"
|
|
486
462
|
}),
|
|
487
|
-
/* @__PURE__ */
|
|
463
|
+
/* @__PURE__ */ d("p", {
|
|
488
464
|
className: "text-center text-gray-600 text-sm",
|
|
489
465
|
children: K ? "Your booking has been confirmed" : "Your payment has been processed successfully"
|
|
490
466
|
})
|
|
491
467
|
]
|
|
492
468
|
})
|
|
493
|
-
}), /* @__PURE__ */
|
|
469
|
+
}), /* @__PURE__ */ f("div", {
|
|
494
470
|
className: "px-6 py-5 sm:px-8",
|
|
495
471
|
children: [
|
|
496
|
-
/* @__PURE__ */
|
|
472
|
+
/* @__PURE__ */ f("div", {
|
|
497
473
|
className: "relative mx-auto max-w-lg overflow-hidden rounded-xl border border-gray-200 bg-white",
|
|
498
474
|
children: [
|
|
499
|
-
/* @__PURE__ */
|
|
500
|
-
/* @__PURE__ */
|
|
501
|
-
/* @__PURE__ */
|
|
475
|
+
/* @__PURE__ */ d("div", { className: "absolute top-1/2 -left-3 size-6 -translate-y-1/2 rounded-full bg-gray-100" }),
|
|
476
|
+
/* @__PURE__ */ d("div", { className: "absolute top-1/2 -right-3 size-6 -translate-y-1/2 rounded-full bg-gray-100" }),
|
|
477
|
+
/* @__PURE__ */ f("div", {
|
|
502
478
|
className: "px-5 py-4",
|
|
503
479
|
children: [
|
|
504
|
-
/* @__PURE__ */
|
|
480
|
+
/* @__PURE__ */ f("div", {
|
|
505
481
|
className: "mb-4 flex items-start gap-3",
|
|
506
|
-
children: [/* @__PURE__ */
|
|
482
|
+
children: [/* @__PURE__ */ d("div", {
|
|
507
483
|
className: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-orange-100",
|
|
508
|
-
children: /* @__PURE__ */
|
|
509
|
-
}), /* @__PURE__ */
|
|
484
|
+
children: /* @__PURE__ */ d(v, { className: "size-5 text-orange-600" })
|
|
485
|
+
}), /* @__PURE__ */ d("div", {
|
|
510
486
|
className: "min-w-0 flex-1",
|
|
511
|
-
children: /* @__PURE__ */
|
|
487
|
+
children: /* @__PURE__ */ d("p", {
|
|
512
488
|
className: "font-semibold text-gray-900 leading-tight",
|
|
513
489
|
children: X
|
|
514
490
|
})
|
|
515
491
|
})]
|
|
516
492
|
}),
|
|
517
|
-
|
|
493
|
+
s.qr_image?.location && /* @__PURE__ */ d("div", {
|
|
518
494
|
className: "mb-4 flex flex-col items-center",
|
|
519
|
-
children: /* @__PURE__ */
|
|
495
|
+
children: /* @__PURE__ */ d("div", {
|
|
520
496
|
className: "rounded-lg border border-gray-200 bg-white p-2",
|
|
521
|
-
children: /* @__PURE__ */
|
|
522
|
-
src:
|
|
497
|
+
children: /* @__PURE__ */ d("img", {
|
|
498
|
+
src: s.qr_image.location,
|
|
523
499
|
alt: "Booking QR Code",
|
|
524
500
|
className: "size-24"
|
|
525
501
|
})
|
|
526
502
|
})
|
|
527
503
|
}),
|
|
528
|
-
/* @__PURE__ */
|
|
504
|
+
/* @__PURE__ */ f("div", {
|
|
529
505
|
className: "mb-4 flex items-center justify-between rounded-lg bg-gray-50 px-3 py-2.5",
|
|
530
|
-
children: [/* @__PURE__ */
|
|
506
|
+
children: [/* @__PURE__ */ d("span", {
|
|
531
507
|
className: "font-medium text-gray-500 text-xs uppercase tracking-wide",
|
|
532
508
|
children: "Booking ID"
|
|
533
|
-
}), /* @__PURE__ */
|
|
509
|
+
}), /* @__PURE__ */ d("span", {
|
|
534
510
|
className: "font-mono font-semibold text-gray-900 text-sm",
|
|
535
|
-
children:
|
|
511
|
+
children: s._id
|
|
536
512
|
})]
|
|
537
513
|
}),
|
|
538
|
-
/* @__PURE__ */
|
|
539
|
-
/* @__PURE__ */
|
|
514
|
+
/* @__PURE__ */ d("div", { className: "my-4 border-gray-200 border-t border-dashed" }),
|
|
515
|
+
/* @__PURE__ */ f("div", {
|
|
540
516
|
className: "space-y-2.5",
|
|
541
|
-
children: [!Y && Q && /* @__PURE__ */
|
|
517
|
+
children: [!Y && Q && /* @__PURE__ */ f("div", {
|
|
542
518
|
className: "flex items-center justify-between",
|
|
543
|
-
children: [/* @__PURE__ */
|
|
519
|
+
children: [/* @__PURE__ */ f("div", {
|
|
544
520
|
className: "flex items-center gap-2 text-gray-500 text-sm",
|
|
545
|
-
children: [/* @__PURE__ */
|
|
546
|
-
}), /* @__PURE__ */
|
|
521
|
+
children: [/* @__PURE__ */ d(p, { className: "size-4" }), /* @__PURE__ */ d("span", { children: "Date & Time" })]
|
|
522
|
+
}), /* @__PURE__ */ f("p", {
|
|
547
523
|
className: "font-medium text-gray-900 text-sm",
|
|
548
524
|
children: [
|
|
549
|
-
|
|
525
|
+
z(Q),
|
|
550
526
|
", ",
|
|
551
|
-
|
|
527
|
+
B(Q)
|
|
552
528
|
]
|
|
553
529
|
})]
|
|
554
|
-
}),
|
|
530
|
+
}), W.slice(0, 3).map(([e, t]) => /* @__PURE__ */ f("div", {
|
|
555
531
|
className: "flex items-center justify-between",
|
|
556
|
-
children: [/* @__PURE__ */
|
|
532
|
+
children: [/* @__PURE__ */ d("span", {
|
|
557
533
|
className: "text-gray-500 text-sm",
|
|
558
|
-
children:
|
|
559
|
-
}), Array.isArray(t) ? /* @__PURE__ */
|
|
534
|
+
children: V(e)
|
|
535
|
+
}), Array.isArray(t) ? /* @__PURE__ */ d(x, {
|
|
560
536
|
items: t,
|
|
561
537
|
textSizeClass: "text-sm"
|
|
562
|
-
}) : /* @__PURE__ */
|
|
538
|
+
}) : /* @__PURE__ */ d("span", {
|
|
563
539
|
className: "max-w-[50%] truncate font-medium text-gray-900 text-sm",
|
|
564
|
-
children:
|
|
540
|
+
children: H(t)
|
|
565
541
|
})]
|
|
566
542
|
}, e))]
|
|
567
543
|
}),
|
|
568
|
-
/* @__PURE__ */
|
|
569
|
-
/* @__PURE__ */
|
|
544
|
+
/* @__PURE__ */ d("div", { className: "my-4 border-gray-200 border-t border-dashed" }),
|
|
545
|
+
/* @__PURE__ */ f("div", {
|
|
570
546
|
className: "flex items-center justify-between",
|
|
571
|
-
children: [/* @__PURE__ */
|
|
547
|
+
children: [/* @__PURE__ */ d("span", {
|
|
572
548
|
className: "font-medium text-gray-700",
|
|
573
549
|
children: K ? "Total" : "Amount Paid"
|
|
574
|
-
}), /* @__PURE__ */
|
|
550
|
+
}), /* @__PURE__ */ d("span", {
|
|
575
551
|
className: "font-bold text-gray-900 text-lg",
|
|
576
|
-
children: K ? "Free" :
|
|
552
|
+
children: K ? "Free" : R(s.total_amount, s.currency)
|
|
577
553
|
})]
|
|
578
554
|
}),
|
|
579
555
|
(() => {
|
|
580
|
-
let e =
|
|
581
|
-
return e ? /* @__PURE__ */
|
|
556
|
+
let e = P?.invoice?.location || s.invoice?.location;
|
|
557
|
+
return e ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { className: "my-4 border-gray-200 border-t border-dashed" }), /* @__PURE__ */ f("a", {
|
|
582
558
|
href: e,
|
|
583
559
|
target: "_blank",
|
|
584
560
|
rel: "noopener noreferrer",
|
|
585
561
|
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__ */
|
|
562
|
+
children: [/* @__PURE__ */ d(te, { className: "size-4" }), "Download Invoice"]
|
|
587
563
|
})] }) : null;
|
|
588
564
|
})()
|
|
589
565
|
]
|
|
590
566
|
})
|
|
591
567
|
]
|
|
592
568
|
}),
|
|
593
|
-
|
|
569
|
+
C && /* @__PURE__ */ d("div", {
|
|
594
570
|
className: "mx-auto mt-5 max-w-lg",
|
|
595
|
-
children: /* @__PURE__ */
|
|
571
|
+
children: /* @__PURE__ */ d(e, {
|
|
596
572
|
elementKey: "booking-done-btn",
|
|
597
|
-
onClick:
|
|
573
|
+
onClick: C,
|
|
598
574
|
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
575
|
children: "Done"
|
|
600
576
|
})
|
|
601
577
|
}),
|
|
602
|
-
/* @__PURE__ */
|
|
578
|
+
/* @__PURE__ */ d("p", {
|
|
603
579
|
className: "mt-4 text-center text-gray-400 text-xs",
|
|
604
580
|
children: "A confirmation has been sent to your email"
|
|
605
581
|
})
|
|
@@ -608,30 +584,22 @@ var y = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
608
584
|
})
|
|
609
585
|
]
|
|
610
586
|
}),
|
|
611
|
-
|
|
587
|
+
M && S && /* @__PURE__ */ d("div", {
|
|
612
588
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
|
|
613
|
-
children: /* @__PURE__ */
|
|
589
|
+
children: /* @__PURE__ */ d("div", {
|
|
614
590
|
className: "max-h-[90vh] w-full max-w-lg overflow-auto rounded-xl bg-white shadow-xl",
|
|
615
|
-
children: /* @__PURE__ */
|
|
591
|
+
children: /* @__PURE__ */ d(i, {
|
|
616
592
|
isEdit: !0,
|
|
617
|
-
prefillData:
|
|
593
|
+
prefillData: c || s.billing_details,
|
|
618
594
|
onSubmit: (e) => {
|
|
619
|
-
|
|
595
|
+
S(e), N(!1);
|
|
620
596
|
},
|
|
621
|
-
onClose: () =>
|
|
597
|
+
onClose: () => N(!1)
|
|
622
598
|
})
|
|
623
599
|
})
|
|
624
600
|
}),
|
|
625
|
-
|
|
626
|
-
isOpen: E,
|
|
627
|
-
onClose: () => {
|
|
628
|
-
D(), k("summary");
|
|
629
|
-
},
|
|
630
|
-
stripePromise: ue,
|
|
631
|
-
clientSecret: T.clientSecret,
|
|
632
|
-
onComplete: W
|
|
633
|
-
})
|
|
601
|
+
D.element
|
|
634
602
|
] });
|
|
635
603
|
};
|
|
636
604
|
//#endregion
|
|
637
|
-
export {
|
|
605
|
+
export { S as BookingCard };
|