@miden-npm/react 0.0.1

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/dist/index.cjs ADDED
@@ -0,0 +1,1865 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.ts
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ BzpCheckoutButton: () => BzpCheckoutButton,
34
+ BzpCheckoutCard: () => BzpCheckoutCard,
35
+ BzpCheckoutIframe: () => BzpCheckoutIframe,
36
+ MidenPGClient: () => MidenPGClient,
37
+ MidenPGProvider: () => MidenPGProvider,
38
+ useMidenPGClient: () => useMidenPGClient,
39
+ usePaymentIntents: () => usePaymentIntents
40
+ });
41
+ module.exports = __toCommonJS(index_exports);
42
+
43
+ // src/client.ts
44
+ var MidenPGClient = class {
45
+ constructor(cfg) {
46
+ this.cfg = cfg;
47
+ this.base = cfg.apiBaseUrl ?? "https://api.buzapay.com";
48
+ }
49
+ async createPaymentIntent(params) {
50
+ const res = await fetch(`${this.base}/v1/payment_intents`, {
51
+ method: "POST",
52
+ headers: {
53
+ "Content-Type": "application/json",
54
+ "X-Publishable-Key": this.cfg.publishableKey
55
+ },
56
+ body: JSON.stringify(params)
57
+ });
58
+ if (!res.ok) throw new Error(`Failed to create PI: ${res.status}`);
59
+ return res.json();
60
+ }
61
+ async confirmCardPayment(params) {
62
+ const res = await fetch(`${this.base}/v1/payment_intents/confirm`, {
63
+ method: "POST",
64
+ headers: {
65
+ "Content-Type": "application/json",
66
+ "X-Publishable-Key": this.cfg.publishableKey
67
+ },
68
+ body: JSON.stringify(params)
69
+ });
70
+ if (!res.ok) throw new Error(`Failed to confirm: ${res.status}`);
71
+ return res.json();
72
+ }
73
+ };
74
+
75
+ // src/provider.tsx
76
+ var import_react = require("react");
77
+ var import_jsx_runtime = require("react/jsx-runtime");
78
+ var Ctx = (0, import_react.createContext)(null);
79
+ var MidenPGProvider = ({ config, children }) => {
80
+ const client = (0, import_react.useMemo)(
81
+ () => new MidenPGClient(config),
82
+ [config.publishableKey, config.apiBaseUrl]
83
+ );
84
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Ctx.Provider, { value: client, children });
85
+ };
86
+ var useMidenPGClient = () => {
87
+ const ctx = (0, import_react.useContext)(Ctx);
88
+ if (!ctx)
89
+ throw new Error("useMidenPGClient must be used within MidenPGProvider");
90
+ return ctx;
91
+ };
92
+
93
+ // src/hooks.ts
94
+ var import_react2 = require("react");
95
+ function usePaymentIntents() {
96
+ const client = useMidenPGClient();
97
+ const create = (0, import_react2.useCallback)(
98
+ (p) => client.createPaymentIntent(p),
99
+ [client]
100
+ );
101
+ const confirm = (0, import_react2.useCallback)(
102
+ (p) => client.confirmCardPayment(p),
103
+ [client]
104
+ );
105
+ return { create, confirm };
106
+ }
107
+
108
+ // src/buzapay-checkout/checkout-button.tsx
109
+ var import_react6 = require("react");
110
+
111
+ // src/utils/object.util.ts
112
+ var checkObjectTruthy = (obj) => {
113
+ if (obj == null || typeof obj !== "object") return false;
114
+ return Object.values(obj).every(Boolean);
115
+ };
116
+
117
+ // src/utils/api.util.ts
118
+ var getBaseUrl = (mode) => {
119
+ return mode === "sandbox" ? "https://sandbox-api.midencards.io/payment-gateway-api" : "";
120
+ };
121
+
122
+ // src/utils/string.util.ts
123
+ var currencySign = (currency) => {
124
+ if (currency === "USD") return "$";
125
+ if (currency === "NGN") return "\u20A6";
126
+ if (currency === "EUR") return "\u20AC";
127
+ if (currency === "GBP") return "\xA3";
128
+ if (currency === "JPY") return "\xA5";
129
+ if (currency === "CNY") return "\xA5";
130
+ if (currency === "USDC" || currency === "usdc") return "$\u29EB";
131
+ if (currency === "USDT" || currency === "usdt") return "\u20AE";
132
+ return "$";
133
+ };
134
+ var formatAmount = (value, currency) => {
135
+ const num = typeof value === "string" ? parseFloat(value) : value;
136
+ if (isNaN(num)) return "0";
137
+ return `${currency ? currencySign(currency) : ""} ${num?.toLocaleString(
138
+ "en-US"
139
+ )}`;
140
+ };
141
+ var truncateString = (str, num) => {
142
+ if (str.length <= num) {
143
+ return str;
144
+ }
145
+ return str.slice(0, num) + "...";
146
+ };
147
+
148
+ // src/utils/input.util.ts
149
+ var restrictToNumericKeys = (event) => {
150
+ const allowedKeys = [
151
+ "Backspace",
152
+ "Tab",
153
+ "ArrowLeft",
154
+ "ArrowRight",
155
+ "Delete",
156
+ "Home",
157
+ "End",
158
+ "."
159
+ ];
160
+ if ((event.ctrlKey || event.metaKey) && ["a", "c", "v", "x"].includes(event.key.toLowerCase())) {
161
+ return;
162
+ }
163
+ if (!allowedKeys.includes(event.key) && !/^\d$/.test(event.key)) {
164
+ event.preventDefault();
165
+ }
166
+ if (event.key === "." && event.target.value.includes(".")) {
167
+ event.preventDefault();
168
+ }
169
+ };
170
+
171
+ // src/apis/checkout.api.ts
172
+ async function createPaymentLink(paymentObject, environment, secretKey) {
173
+ try {
174
+ const baseUrl = getBaseUrl(environment);
175
+ const res = await fetch(
176
+ `${baseUrl}/api/v1/checkout/generate-payment-link2`,
177
+ {
178
+ method: "POST",
179
+ headers: {
180
+ "Content-Type": "application/json",
181
+ Accept: "application/json",
182
+ merchantId: secretKey
183
+ },
184
+ body: JSON.stringify({
185
+ ...paymentObject,
186
+ LinkName: `${Date.now()}-Link`
187
+ })
188
+ }
189
+ );
190
+ return await res.json();
191
+ } catch (error) {
192
+ }
193
+ }
194
+
195
+ // src/components/base/input-error.tsx
196
+ var import_jsx_runtime2 = require("react/jsx-runtime");
197
+ function BaseInputError({ errorMessage }) {
198
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "mb-0 text-body-3xs font-normal text-red-500", children: errorMessage });
199
+ }
200
+
201
+ // src/components/icons/icon-loader.tsx
202
+ var import_jsx_runtime3 = require("react/jsx-runtime");
203
+ function IconLoader({
204
+ size = 24,
205
+ color = "currentColor",
206
+ className = "",
207
+ ...props
208
+ }) {
209
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
210
+ "svg",
211
+ {
212
+ className: `animate-spin ${className}`,
213
+ xmlns: "http://www.w3.org/2000/svg",
214
+ fill: "none",
215
+ viewBox: "0 0 24 24",
216
+ width: size,
217
+ height: size,
218
+ role: "img",
219
+ "aria-label": "loading",
220
+ ...props,
221
+ children: [
222
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
223
+ "circle",
224
+ {
225
+ className: "opacity-25",
226
+ cx: "12",
227
+ cy: "12",
228
+ r: "10",
229
+ stroke: color,
230
+ strokeWidth: 4
231
+ }
232
+ ),
233
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
234
+ "path",
235
+ {
236
+ className: "opacity-75",
237
+ fill: color,
238
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
239
+ }
240
+ )
241
+ ]
242
+ }
243
+ );
244
+ }
245
+
246
+ // src/components/icons/icon-chevron-left.tsx
247
+ var import_jsx_runtime4 = require("react/jsx-runtime");
248
+ function IconChevronLeft({
249
+ width = 17,
250
+ height = 17,
251
+ color = "currentColor",
252
+ ...props
253
+ }) {
254
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
255
+ "svg",
256
+ {
257
+ width,
258
+ height,
259
+ viewBox: "0 0 17 17",
260
+ fill: "none",
261
+ xmlns: "http://www.w3.org/2000/svg",
262
+ ...props,
263
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
264
+ "path",
265
+ {
266
+ d: "M10.5 14.28C10.3734 14.28 10.2467 14.2333 10.1467 14.1333L5.80002 9.78668C5.09335 9.08001 5.09335 7.92001 5.80002 7.21335L10.1467 2.86668C10.34 2.67335 10.66 2.67335 10.8534 2.86668C11.0467 3.06001 11.0467 3.38001 10.8534 3.57335L6.50669 7.92001C6.18669 8.24001 6.18669 8.76001 6.50669 9.08001L10.8534 13.4267C11.0467 13.62 11.0467 13.94 10.8534 14.1333C10.7534 14.2267 10.6267 14.28 10.5 14.28Z",
267
+ fill: color
268
+ }
269
+ )
270
+ }
271
+ );
272
+ }
273
+
274
+ // src/components/icons/icon-buzapay-icon.tsx
275
+ var import_jsx_runtime5 = require("react/jsx-runtime");
276
+ function IconBuzapayIcon({
277
+ width = 15,
278
+ height = 13,
279
+ color = "currentColor",
280
+ ...props
281
+ }) {
282
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
283
+ "svg",
284
+ {
285
+ width,
286
+ height,
287
+ viewBox: "0 0 15 13",
288
+ fill: "none",
289
+ xmlns: "http://www.w3.org/2000/svg",
290
+ ...props,
291
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
292
+ "path",
293
+ {
294
+ d: "M9.97919 0.5C10.8854 0.5 11.6276 0.585938 12.2057 0.757812C12.7891 0.924479 13.2188 1.22396 13.4948 1.65625C13.7761 2.08333 13.9167 2.6901 13.9167 3.47656C13.9167 4.1849 13.7526 4.77083 13.4245 5.23438C13.0964 5.69792 12.5938 5.95312 11.9167 6C12.8021 6.08854 13.4401 6.40625 13.8307 6.95312C14.2214 7.49479 14.4167 8.17708 14.4167 9C14.4167 9.71354 14.3334 10.2995 14.1667 10.7578C14.0052 11.2161 13.7318 11.5729 13.3464 11.8281C12.961 12.0781 12.4375 12.2526 11.7761 12.3516C11.1198 12.4505 10.2995 12.5 9.31512 12.5H0.416687V0.5H9.97919ZM2.91669 7.77344H5.97235V11.167L10.2497 5.22754H7.19501V1.83398L2.91669 7.77344ZM5.97235 6.07617H8.2702L7.19501 7.57324V6.9248H4.89716L5.97235 5.42676V6.07617Z",
295
+ fill: color
296
+ }
297
+ )
298
+ }
299
+ );
300
+ }
301
+
302
+ // src/components/icons/icon-check-circle.tsx
303
+ var import_jsx_runtime6 = require("react/jsx-runtime");
304
+ function IconCheckCircle({
305
+ width = 67,
306
+ height = 67,
307
+ color = "currentColor",
308
+ ...props
309
+ }) {
310
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
311
+ "svg",
312
+ {
313
+ width,
314
+ height,
315
+ viewBox: "0 0 67 67",
316
+ fill: "none",
317
+ xmlns: "http://www.w3.org/2000/svg",
318
+ ...props,
319
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
320
+ "path",
321
+ {
322
+ d: "M33.6705 0.0820312C15.2758 0.0820312 0.36377 14.9941 0.36377 33.3888C0.36377 51.7846 15.2758 66.6956 33.6705 66.6956C52.0663 66.6956 66.9773 51.7846 66.9773 33.3888C66.9773 14.9941 52.0663 0.0820312 33.6705 0.0820312ZM33.6705 62.5978C17.6011 62.5978 4.52712 49.4583 4.52712 33.3887C4.52712 17.3192 17.6011 4.24525 33.6705 4.24525C49.74 4.24525 62.814 17.3193 62.814 33.3887C62.814 49.4581 49.74 62.5978 33.6705 62.5978ZM46.9631 21.2016L27.4213 40.8662L18.621 32.0659C17.8081 31.253 16.4904 31.253 15.6765 32.0659C14.8636 32.8788 14.8636 34.1965 15.6765 35.0094L25.9797 45.3137C26.7926 46.1255 28.1103 46.1255 28.9243 45.3137C29.0179 45.22 29.0981 45.1179 29.171 45.0118L49.9086 24.1461C50.7205 23.3332 50.7205 22.0155 49.9086 21.2016C49.0947 20.3888 47.777 20.3888 46.9631 21.2016Z",
323
+ fill: color
324
+ }
325
+ )
326
+ }
327
+ );
328
+ }
329
+
330
+ // src/components/icons/icon-copy-success.tsx
331
+ var import_jsx_runtime7 = require("react/jsx-runtime");
332
+ function IconCopySuccess({
333
+ width = 16,
334
+ height = 17,
335
+ color = "currentColor",
336
+ ...props
337
+ }) {
338
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
339
+ "svg",
340
+ {
341
+ width,
342
+ height,
343
+ viewBox: "0 0 16 17",
344
+ fill: "none",
345
+ xmlns: "http://www.w3.org/2000/svg",
346
+ ...props,
347
+ children: [
348
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
349
+ "path",
350
+ {
351
+ d: "M11.4002 1.6875H8.60016C5.9935 1.6875 4.8335 2.8475 4.8335 5.45417V6.1875C4.8335 6.46083 5.06016 6.6875 5.3335 6.6875H7.40016C9.46683 6.6875 10.1668 7.3875 10.1668 9.45417V11.5208C10.1668 11.7942 10.3935 12.0208 10.6668 12.0208H11.4002C14.0068 12.0208 15.1668 10.8608 15.1668 8.25417V5.45417C15.1668 2.8475 14.0068 1.6875 11.4002 1.6875ZM5.8335 5.6875V5.45417C5.8335 3.3875 6.5335 2.6875 8.60016 2.6875H11.4002C13.4668 2.6875 14.1668 3.3875 14.1668 5.45417V8.25417C14.1668 10.3208 13.4668 11.0208 11.4002 11.0208H11.1668V9.45417C11.1668 6.8475 10.0068 5.6875 7.40016 5.6875H5.8335Z",
352
+ fill: color
353
+ }
354
+ ),
355
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
356
+ "path",
357
+ {
358
+ d: "M7.40016 5.6875H4.60016C1.9935 5.6875 0.833496 6.8475 0.833496 9.45417V12.2542C0.833496 14.8608 1.9935 16.0208 4.60016 16.0208H7.40016C10.0068 16.0208 11.1668 14.8608 11.1668 12.2542V9.45417C11.1668 6.8475 10.0068 5.6875 7.40016 5.6875ZM4.60016 15.0208C2.5335 15.0208 1.8335 14.3208 1.8335 12.2542V9.45417C1.8335 7.3875 2.5335 6.6875 4.60016 6.6875H7.40016C9.46683 6.6875 10.1668 7.3875 10.1668 9.45417V12.2542C10.1668 14.3208 9.46683 15.0208 7.40016 15.0208H4.60016Z",
359
+ fill: color
360
+ }
361
+ ),
362
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
363
+ "path",
364
+ {
365
+ d: "M5.35302 12.6542C5.22635 12.6542 5.09969 12.6075 4.99969 12.5075L3.69969 11.2075C3.50635 11.0142 3.50635 10.6942 3.69969 10.5008C3.89302 10.3075 4.21302 10.3075 4.40635 10.5008L5.35302 11.4475L7.59302 9.2075C7.78635 9.01417 8.10635 9.01417 8.29969 9.2075C8.49302 9.40083 8.49302 9.72083 8.29969 9.91417L5.69969 12.5075C5.60635 12.6008 5.47969 12.6542 5.35302 12.6542Z",
366
+ fill: color
367
+ }
368
+ )
369
+ ]
370
+ }
371
+ );
372
+ }
373
+
374
+ // src/components/icons/icon-chevron-up.tsx
375
+ var import_jsx_runtime8 = require("react/jsx-runtime");
376
+ function IconChevronUp({
377
+ width = 24,
378
+ height = 24,
379
+ color = "currentColor",
380
+ ...props
381
+ }) {
382
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
383
+ "svg",
384
+ {
385
+ width,
386
+ height,
387
+ viewBox: "0 0 16 16",
388
+ fill: "none",
389
+ xmlns: "http://www.w3.org/2000/svg",
390
+ ...props,
391
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("g", { opacity: "0.7", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
392
+ "path",
393
+ {
394
+ d: "M2.73508 9.73495L7.73508 4.73495C7.80539 4.66473 7.9007 4.62528 8.00008 4.62528C8.09945 4.62528 8.19476 4.66473 8.26508 4.73495L13.2651 9.73495C13.3313 9.80604 13.3674 9.90006 13.3657 9.99722C13.364 10.0944 13.3246 10.1871 13.2559 10.2558C13.1872 10.3245 13.0945 10.3638 12.9973 10.3655C12.9002 10.3673 12.8062 10.3312 12.7351 10.265L8.00008 5.53058L3.26508 10.265C3.19399 10.3312 3.09997 10.3673 3.00282 10.3655C2.90566 10.3638 2.81297 10.3245 2.74427 10.2558C2.67556 10.1871 2.6362 10.0944 2.63449 9.99722C2.63277 9.90006 2.66884 9.80604 2.73508 9.73495Z",
395
+ fill: color
396
+ }
397
+ ) })
398
+ }
399
+ );
400
+ }
401
+
402
+ // src/components/icons/icon-chevron-down.tsx
403
+ var import_jsx_runtime9 = require("react/jsx-runtime");
404
+ function IconChevronDown({
405
+ width = 24,
406
+ height = 24,
407
+ color = "currentColor",
408
+ ...props
409
+ }) {
410
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
411
+ "svg",
412
+ {
413
+ width,
414
+ height,
415
+ viewBox: "0 0 20 20",
416
+ fill: "none",
417
+ xmlns: "http://www.w3.org/2000/svg",
418
+ ...props,
419
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("g", { opacity: "0.6", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
420
+ "path",
421
+ {
422
+ d: "M16.5813 7.83128L10.3313 14.0813C10.2434 14.1691 10.1242 14.2184 10 14.2184C9.87581 14.2184 9.75667 14.1691 9.66878 14.0813L3.41878 7.83128C3.33598 7.74242 3.2909 7.62489 3.29304 7.50345C3.29518 7.38201 3.34438 7.26615 3.43026 7.18026C3.51615 7.09438 3.63201 7.04518 3.75345 7.04304C3.87489 7.0409 3.99242 7.08598 4.08128 7.16878L10 13.0867L15.9188 7.16878C16.0076 7.08598 16.1252 7.0409 16.2466 7.04304C16.368 7.04518 16.4839 7.09438 16.5698 7.18026C16.6557 7.26615 16.7049 7.38201 16.707 7.50345C16.7092 7.62489 16.6641 7.74242 16.5813 7.83128Z",
423
+ fill: color
424
+ }
425
+ ) })
426
+ }
427
+ );
428
+ }
429
+
430
+ // src/components/icons/icon-usdt.tsx
431
+ var import_jsx_runtime10 = require("react/jsx-runtime");
432
+ function IconUsdt({
433
+ width = 28,
434
+ height = 28,
435
+ color = "currentColor",
436
+ ...props
437
+ }) {
438
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
439
+ "svg",
440
+ {
441
+ width,
442
+ height,
443
+ viewBox: "0 0 28 28",
444
+ fill: "none",
445
+ xmlns: "http://www.w3.org/2000/svg",
446
+ ...props,
447
+ children: [
448
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("g", { "clip-path": "url(#clip0_10908_387045)", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
449
+ "path",
450
+ {
451
+ "fill-rule": "evenodd",
452
+ "clip-rule": "evenodd",
453
+ d: "M14 28C6.26763 28 0 21.7324 0 14C0 6.26763 6.26763 0 14 0C21.7324 0 28 6.26763 28 14C28 21.7324 21.7324 28 14 28ZM15.6818 12.0689V9.99863H20.419V6.84162H7.52063V9.99863H12.2579V12.068C8.40787 12.2447 5.5125 13.0077 5.5125 13.9212C5.5125 14.8347 8.40787 15.5969 12.2579 15.7745V22.4088H15.6818V15.7727C19.5256 15.596 22.414 14.8339 22.414 13.9212C22.414 13.0086 19.5256 12.2465 15.6818 12.0689ZM15.6818 15.2101V15.2084C15.5855 15.2154 15.0894 15.2451 13.9825 15.2451C13.0987 15.2451 12.4766 15.2189 12.2579 15.2084V15.211C8.85587 15.0614 6.31662 14.469 6.31662 13.7602C6.31662 13.0524 8.85587 12.46 12.2579 12.3077V14.6212C12.4801 14.637 13.1171 14.6746 13.9974 14.6746C15.0535 14.6746 15.5829 14.6309 15.6818 14.6221V12.3095C19.0768 12.4609 21.6099 13.0532 21.6099 13.7602C21.6099 14.469 19.0768 15.0596 15.6818 15.2101Z",
454
+ fill: color
455
+ }
456
+ ) }),
457
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("clipPath", { id: "clip0_10908_387045", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("rect", { width: "28", height: "28", fill: color }) }) })
458
+ ]
459
+ }
460
+ );
461
+ }
462
+
463
+ // src/components/icons/icon-usdc.tsx
464
+ var import_jsx_runtime11 = require("react/jsx-runtime");
465
+ function IconUsdc({
466
+ width = 28,
467
+ height = 28,
468
+ color = "currentColor",
469
+ ...props
470
+ }) {
471
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
472
+ "svg",
473
+ {
474
+ width,
475
+ height,
476
+ viewBox: "0 0 28 28",
477
+ fill: "none",
478
+ xmlns: "http://www.w3.org/2000/svg",
479
+ ...props,
480
+ children: [
481
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("g", { "clip-path": "url(#clip0_10908_387048)", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
482
+ "path",
483
+ {
484
+ d: "M14 0C21.7324 0 28 6.26763 28 14C28 21.7324 21.7324 28 14 28C6.26763 28 0 21.7324 0 14C0 6.26763 6.26763 0 14 0ZM16.933 4.865C16.7195 4.76 16.506 4.865 16.4535 5.07762C16.4001 5.131 16.4001 5.18438 16.4001 5.29025V6.034L16.4089 6.125C16.4546 6.30501 16.5652 6.46177 16.7195 6.56512C20.8792 8.05262 23.0125 12.6726 21.4655 16.7615C20.6657 18.9928 18.9061 20.6911 16.7195 21.4883C16.506 21.5941 16.4001 21.7534 16.4001 22.0194V22.7631L16.4045 22.8401C16.4128 22.9241 16.4479 23.0033 16.5047 23.0658C16.5614 23.1284 16.6367 23.171 16.7195 23.1875C16.7729 23.1875 16.8796 23.1875 16.933 23.135C18.1331 22.7602 19.2473 22.1517 20.2113 21.3446C21.1753 20.5375 21.9701 19.5476 22.5499 18.432C23.1298 17.3164 23.4833 16.0972 23.59 14.8444C23.6967 13.5917 23.5546 12.3302 23.1718 11.1326C22.2128 8.10512 19.866 5.8205 16.933 4.865ZM11.2805 4.8125C11.2271 4.8125 11.1204 4.8125 11.067 4.865C9.86688 5.23978 8.75274 5.84826 7.78874 6.6554C6.82475 7.46254 6.02993 8.4524 5.45006 9.56797C4.87019 10.6836 4.51673 11.9028 4.41001 13.1556C4.30329 14.4083 4.44543 15.6698 4.82825 16.8674C5.78725 19.8424 8.08062 22.1261 11.067 23.0816C11.2805 23.1875 11.494 23.0816 11.5465 22.869C11.5999 22.8165 11.5999 22.7622 11.5999 22.6564V21.9126L11.5911 21.8426C11.5544 21.6947 11.417 21.5259 11.2805 21.4349C7.12075 19.9474 4.9875 15.3274 6.5345 11.2385C7.33425 9.00725 9.09388 7.30887 11.2805 6.51175C11.494 6.40587 11.5999 6.24663 11.5999 5.98063V5.23688L11.5955 5.15987C11.5872 5.07585 11.5521 4.99673 11.4954 4.93418C11.4386 4.87163 11.3633 4.82898 11.2805 4.8125ZM14.3736 7.574H13.573L13.496 7.581C13.321 7.616 13.1933 7.7665 13.146 7.99925V9.22075L12.9649 9.24875C11.4704 9.51475 10.5341 10.5464 10.5341 11.823C10.5341 13.5748 11.5999 14.2651 13.8399 14.5311C15.3335 14.7963 15.813 15.1156 15.813 15.9653C15.813 16.814 15.0666 17.3985 14.0534 17.3985C12.6665 17.3985 12.187 16.8149 12.0269 16.0177C11.9744 15.806 11.8134 15.6992 11.6532 15.6992H10.7467L10.6776 15.7054C10.5913 15.7193 10.513 15.7641 10.4572 15.8313C10.4014 15.8985 10.3718 15.9838 10.374 16.0711V16.1236L10.4029 16.2811C10.6566 17.5271 11.5106 18.4187 13.2003 18.6734V19.9483L13.2072 20.0252C13.2422 20.1985 13.3936 20.3263 13.6273 20.3726H14.427L14.504 20.3656C14.679 20.3306 14.8067 20.1801 14.854 19.9483V18.6725L15.0351 18.6375C16.534 18.3207 17.5201 17.2366 17.5201 15.8576C17.5201 13.9991 16.4001 13.3621 14.1601 13.0961C12.5598 12.8835 12.2404 12.4591 12.2404 11.7154C12.2404 10.9716 12.7741 10.4939 13.8399 10.4939C14.7998 10.4939 15.3335 10.8124 15.5995 11.6095C15.6272 11.6866 15.6779 11.7533 15.7447 11.8007C15.8115 11.8481 15.8912 11.8739 15.9731 11.8746H16.8262L16.8954 11.8694C16.982 11.8556 17.0606 11.8108 17.1166 11.7434C17.1726 11.6759 17.2022 11.5904 17.1999 11.5027V11.4503L17.1675 11.2989C17.0361 10.755 16.7366 10.2664 16.3115 9.90255C15.8864 9.53872 15.3574 9.31821 14.7997 9.27238V7.99925L14.7928 7.92225C14.7578 7.74812 14.6073 7.62038 14.3736 7.574Z",
485
+ fill: color
486
+ }
487
+ ) }),
488
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("clipPath", { id: "clip0_10908_387048", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("rect", { width: "28", height: "28", fill: color }) }) })
489
+ ]
490
+ }
491
+ );
492
+ }
493
+
494
+ // src/components/icons/icon-arrow-swap.tsx
495
+ var import_jsx_runtime12 = require("react/jsx-runtime");
496
+ function IconArrowSwap({
497
+ width = 16,
498
+ height = 17,
499
+ color = "currentColor",
500
+ ...props
501
+ }) {
502
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
503
+ "svg",
504
+ {
505
+ width,
506
+ height,
507
+ viewBox: "0 0 16 17",
508
+ fill: "none",
509
+ xmlns: "http://www.w3.org/2000/svg",
510
+ ...props,
511
+ children: [
512
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
513
+ "path",
514
+ {
515
+ d: "M10.3265 14.1948C10.1998 14.1948 10.0731 14.1481 9.97313 14.0481C9.77979 13.8548 9.77979 13.5348 9.97313 13.3414L13.3131 10.0014C13.5065 9.80811 13.8265 9.80811 14.0198 10.0014C14.2131 10.1948 14.2131 10.5148 14.0198 10.7081L10.6798 14.0481C10.5798 14.1414 10.4531 14.1948 10.3265 14.1948Z",
516
+ fill: color
517
+ }
518
+ ),
519
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
520
+ "path",
521
+ {
522
+ d: "M13.6668 10.8477H2.3335C2.06016 10.8477 1.8335 10.621 1.8335 10.3477C1.8335 10.0743 2.06016 9.84766 2.3335 9.84766H13.6668C13.9402 9.84766 14.1668 10.0743 14.1668 10.3477C14.1668 10.621 13.9402 10.8477 13.6668 10.8477Z",
523
+ fill: color
524
+ }
525
+ ),
526
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
527
+ "path",
528
+ {
529
+ d: "M2.33329 6.86079C2.20663 6.86079 2.07996 6.81413 1.97996 6.71413C1.78663 6.52079 1.78663 6.20079 1.97996 6.00746L5.31996 2.66746C5.51329 2.47413 5.83329 2.47413 6.02663 2.66746C6.21996 2.86079 6.21996 3.18079 6.02663 3.37413L2.68663 6.71413C2.59329 6.80746 2.45996 6.86079 2.33329 6.86079Z",
530
+ fill: color
531
+ }
532
+ ),
533
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
534
+ "path",
535
+ {
536
+ d: "M13.6668 6.86133H2.3335C2.06016 6.86133 1.8335 6.63466 1.8335 6.36133C1.8335 6.08799 2.06016 5.86133 2.3335 5.86133H13.6668C13.9402 5.86133 14.1668 6.08799 14.1668 6.36133C14.1668 6.63466 13.9402 6.86133 13.6668 6.86133Z",
537
+ fill: color
538
+ }
539
+ )
540
+ ]
541
+ }
542
+ );
543
+ }
544
+
545
+ // src/components/base/button.tsx
546
+ var import_jsx_runtime13 = require("react/jsx-runtime");
547
+ function getButtonBgClass(type, disabled) {
548
+ if (disabled)
549
+ return "bg-gray-200 text-gray-400 cursor-not-allowed border-gray-200";
550
+ switch (type) {
551
+ case "primary":
552
+ return "bg-primary text-white hover:bg-primary-black hover:border-primary-black border-primary";
553
+ case "secondary":
554
+ return "bg-gray-200 border-gray-200 hover:bg-gray-300 text-heading-text";
555
+ case "danger":
556
+ return "bg-red-500 border-red-500 text-white hover:bg-red-600";
557
+ case "neutral":
558
+ default:
559
+ return "bg-off-white border-grey-border hover:bg-gray-100";
560
+ }
561
+ }
562
+ function getButtonSizeClass(size) {
563
+ switch (size) {
564
+ case "de":
565
+ return "h-68px rounded-xl";
566
+ case "md":
567
+ return "h-42px rounded-lg";
568
+ case "sm":
569
+ return "h-32px rounded-md";
570
+ default:
571
+ return "h-68px rounded-xl";
572
+ }
573
+ }
574
+ function getLabelSizeClass(size) {
575
+ switch (size) {
576
+ case "de":
577
+ case "md":
578
+ case "sm":
579
+ return "text-body-2xs font-normal";
580
+ default:
581
+ return "text-body-xs font-normal";
582
+ }
583
+ }
584
+ function BaseButton({
585
+ label,
586
+ type = "neutral",
587
+ size = "de",
588
+ paddingClassX = "px-8",
589
+ disabled = false,
590
+ loading = false,
591
+ customClass,
592
+ onClick,
593
+ prefix,
594
+ suffix,
595
+ children
596
+ }) {
597
+ const isDisabled = disabled || loading;
598
+ const handleClick = () => {
599
+ if (!isDisabled) onClick?.();
600
+ };
601
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
602
+ "button",
603
+ {
604
+ className: `flex items-center justify-center gap-2 py-3 border font-normal text-input-grey transition-colors duration-300 ease-in-out ${getButtonBgClass(
605
+ type,
606
+ isDisabled
607
+ )} ${getButtonSizeClass(size)} ${paddingClassX} ${customClass}`,
608
+ type: "button",
609
+ disabled: isDisabled,
610
+ onClick: handleClick,
611
+ children: [
612
+ prefix,
613
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconLoader, {}) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { children: label ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: `mb-0 ${getLabelSizeClass(size)}`, children: label }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_jsx_runtime13.Fragment, { children }) }),
614
+ suffix
615
+ ]
616
+ }
617
+ );
618
+ }
619
+
620
+ // src/components/base/back.tsx
621
+ var import_jsx_runtime14 = require("react/jsx-runtime");
622
+ function BaseBack({ back }) {
623
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center gap-2 cursor-pointer", onClick: back, children: [
624
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(IconChevronLeft, {}),
625
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "mb-0 text-body-xs font-normal", children: "Back" })
626
+ ] });
627
+ }
628
+
629
+ // src/components/base/card.tsx
630
+ var import_jsx_runtime15 = require("react/jsx-runtime");
631
+ function BaseCard({
632
+ showBackButton = false,
633
+ onBack,
634
+ children,
635
+ onClose
636
+ }) {
637
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "checkout-card w-full h-screen flex flex-col items-center justify-center text-white", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex w-1/2", children: [
638
+ showBackButton && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(BaseBack, { back: () => onBack?.() }),
639
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex gap-2 w-full", children: [
640
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-col gap-8 w-full", children: [
641
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "bg-off-white rounded-xl", children }),
642
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-2 justify-center", children: [
643
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "text-light-white-100 text-body-2xs font-regular", children: "Powered by Buzapay" }),
644
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(IconBuzapayIcon, { color: "#E8F4FF" })
645
+ ] })
646
+ ] }),
647
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
648
+ "div",
649
+ {
650
+ onClick: onClose,
651
+ className: "close-icon flex flex-col items-center justify-center self-start cursor-pointer hover:bg-gray-500",
652
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "text-white", children: "x" })
653
+ }
654
+ )
655
+ ] })
656
+ ] }) });
657
+ }
658
+
659
+ // src/components/base/radio-group.tsx
660
+ var import_react3 = require("react");
661
+ var import_jsx_runtime16 = require("react/jsx-runtime");
662
+ var BaseRadioGroup = ({
663
+ options,
664
+ type = "vertical",
665
+ value,
666
+ defaultValue,
667
+ selectedChange,
668
+ className = ""
669
+ }) => {
670
+ const isControlled = value !== void 0;
671
+ const [internal, setInternal] = (0, import_react3.useState)("");
672
+ (0, import_react3.useEffect)(() => {
673
+ if (isControlled) return;
674
+ const initial = defaultValue ?? (options.length > 0 ? options[0].value : "");
675
+ setInternal(initial);
676
+ selectedChange?.(initial);
677
+ }, [isControlled, defaultValue, options]);
678
+ const selected = isControlled ? value : internal;
679
+ const setSelected = (v) => {
680
+ if (!isControlled) setInternal(v);
681
+ selectedChange?.(v);
682
+ };
683
+ const containerLayout = type === "horizontal" ? "flex-row gap-5" : "flex-col gap-6";
684
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
685
+ "div",
686
+ {
687
+ className: `flex ${containerLayout} ${className}`,
688
+ role: "radiogroup",
689
+ "aria-orientation": type === "horizontal" ? "horizontal" : "vertical",
690
+ tabIndex: 0,
691
+ children: options.map((option) => {
692
+ const isActive = selected === option.value;
693
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
694
+ "div",
695
+ {
696
+ role: "radio",
697
+ "aria-checked": isActive,
698
+ tabIndex: -1,
699
+ onClick: () => setSelected(option.value),
700
+ className: "flex items-center gap-2 cursor-pointer transition-colors duration-200",
701
+ children: [
702
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
703
+ "div",
704
+ {
705
+ className: [
706
+ "w-4 h-4 rounded-full border flex items-center justify-center",
707
+ isActive ? "bg-orange-500 border-orange-500" : "bg-white border-grey-200"
708
+ ].join(" "),
709
+ children: isActive && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "bg-white w-2 h-2 rounded-full" })
710
+ }
711
+ ),
712
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "mb-0 text-body-2xs font-medium text-heading-text", children: option.label })
713
+ ]
714
+ },
715
+ option.value
716
+ );
717
+ })
718
+ }
719
+ );
720
+ };
721
+
722
+ // src/components/base/image.tsx
723
+ var import_jsx_runtime17 = require("react/jsx-runtime");
724
+ function BaseImage({
725
+ src,
726
+ height = 50,
727
+ width = 50,
728
+ alt = "Image",
729
+ customClass,
730
+ isFullWidth,
731
+ onClick
732
+ }) {
733
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
734
+ "img",
735
+ {
736
+ src,
737
+ height,
738
+ alt,
739
+ className: `${customClass} ${isFullWidth ? "w-full" : ""}`,
740
+ style: { width: isFullWidth ? "100%" : `${width}px` },
741
+ onClick
742
+ }
743
+ );
744
+ }
745
+
746
+ // src/components/base/copy.tsx
747
+ var import_jsx_runtime18 = require("react/jsx-runtime");
748
+ function BaseCopy({ copyText, color }) {
749
+ const copyToClipboard = (text) => {
750
+ return navigator.clipboard.writeText(text);
751
+ };
752
+ const copyHandler = () => {
753
+ copyToClipboard(copyText).then(() => {
754
+ }).catch((err) => {
755
+ });
756
+ };
757
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
758
+ IconCopySuccess,
759
+ {
760
+ className: "cursor-pointer",
761
+ color,
762
+ onClick: () => copyHandler()
763
+ }
764
+ );
765
+ }
766
+
767
+ // src/components/base/label-info.tsx
768
+ var import_jsx_runtime19 = require("react/jsx-runtime");
769
+ var BaseLabelInfo = ({
770
+ type = "vertical",
771
+ label = "",
772
+ labelCustomClass = "text-body-4xs font-medium text-light-copy",
773
+ valueImageSrc = "",
774
+ valueImageCustomClass = "",
775
+ valueImagePosition = "prefix",
776
+ hasValueCopy = false,
777
+ value = "",
778
+ valueCustomClass = "text-body-2xs font-medium text-sub-copy",
779
+ alignRight = false
780
+ }) => {
781
+ const showPrefixImg = valueImageSrc && valueImagePosition === "prefix";
782
+ const showSuffixImg = valueImageSrc && valueImagePosition === "suffix";
783
+ if (type === "vertical") {
784
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
785
+ "div",
786
+ {
787
+ className: `flex flex-col gap-1 ${alignRight ? "text-right items-end" : ""}`,
788
+ children: [
789
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: labelCustomClass, children: label.toUpperCase() }),
790
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center gap-1", children: [
791
+ showPrefixImg && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
792
+ BaseImage,
793
+ {
794
+ src: valueImageSrc,
795
+ alt: value,
796
+ width: 22,
797
+ customClass: valueImageCustomClass
798
+ }
799
+ ),
800
+ !hasValueCopy ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: valueCustomClass, children: value }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: `${valueCustomClass} truncate`, children: truncateString(value, 40) }),
801
+ hasValueCopy && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(BaseCopy, { copyText: value, color: "#9DBFDE" }),
802
+ showSuffixImg && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
803
+ BaseImage,
804
+ {
805
+ src: valueImageSrc,
806
+ alt: value,
807
+ width: 22,
808
+ customClass: valueImageCustomClass
809
+ }
810
+ )
811
+ ] })
812
+ ]
813
+ }
814
+ );
815
+ }
816
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center justify-between", children: [
817
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: labelCustomClass, children: label.toUpperCase() }),
818
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center gap-1", children: [
819
+ showPrefixImg && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
820
+ BaseImage,
821
+ {
822
+ src: valueImageSrc,
823
+ alt: value,
824
+ width: 22,
825
+ customClass: valueImageCustomClass
826
+ }
827
+ ),
828
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: valueCustomClass, children: value }),
829
+ hasValueCopy && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(BaseCopy, { copyText: value, color: "#9DBFDE" }),
830
+ showSuffixImg && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
831
+ BaseImage,
832
+ {
833
+ src: valueImageSrc,
834
+ alt: value,
835
+ width: 22,
836
+ customClass: valueImageCustomClass
837
+ }
838
+ )
839
+ ] })
840
+ ] });
841
+ };
842
+
843
+ // src/components/base/success.tsx
844
+ var import_jsx_runtime20 = require("react/jsx-runtime");
845
+ var BaseSuccess = ({}) => {
846
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex flex-col gap-8 p-16", children: [
847
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex flex-col gap-8", children: [
848
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex flex-col gap-8", children: [
849
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(IconCheckCircle, { color: "#F47A1F", className: "mx-auto" }),
850
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex flex-col text-center", style: { gap: "2px" }, children: [
851
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-heading-text font-medium text-header-2xl", children: "\u20A62,500.00" }),
852
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-sub-copy font-regular text-body-3xs", children: "Has been paid successfully" })
853
+ ] })
854
+ ] }),
855
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex flex-col", children: [
856
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "py-4 border-b border-grey-100", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
857
+ BaseLabelInfo,
858
+ {
859
+ type: "horizontal",
860
+ label: "Order ID",
861
+ value: "9900009000-8890-8829hd7"
862
+ }
863
+ ) }),
864
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "py-4", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
865
+ BaseLabelInfo,
866
+ {
867
+ type: "horizontal",
868
+ label: "Payment date",
869
+ value: "July 24, 2025"
870
+ }
871
+ ) })
872
+ ] })
873
+ ] }),
874
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "mx-auto", style: { width: "80%" }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
875
+ BaseButton,
876
+ {
877
+ label: "Return to Merchant Website",
878
+ type: "secondary",
879
+ customClass: "w-full"
880
+ }
881
+ ) })
882
+ ] });
883
+ };
884
+
885
+ // src/components/base/hint.tsx
886
+ var import_jsx_runtime21 = require("react/jsx-runtime");
887
+ function BaseHint({ hint }) {
888
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "mb-0 text-body-3xs font-medium text-orange-500", children: hint });
889
+ }
890
+
891
+ // src/components/base/select.tsx
892
+ var import_react4 = __toESM(require("react"), 1);
893
+ var import_jsx_runtime22 = require("react/jsx-runtime");
894
+ var BaseSelect = ({
895
+ options,
896
+ value,
897
+ defaultValue,
898
+ onChange,
899
+ placeholder = "Select an option",
900
+ hasSearch = true,
901
+ disabled = false,
902
+ loading = false,
903
+ validationError = "",
904
+ label = "",
905
+ hint = "",
906
+ required = false,
907
+ itemImageType = null,
908
+ prefix,
909
+ className = ""
910
+ }) => {
911
+ const isControlled = value !== void 0;
912
+ const [open, setOpen] = import_react4.default.useState(false);
913
+ const [internalValue, setInternalValue] = import_react4.default.useState(
914
+ defaultValue ?? value ?? ""
915
+ );
916
+ const [filtered, setFiltered] = import_react4.default.useState(options);
917
+ const [activeIndex, setActiveIndex] = import_react4.default.useState(-1);
918
+ const triggerRef = import_react4.default.useRef(null);
919
+ const menuRef = import_react4.default.useRef(null);
920
+ const searchRef = import_react4.default.useRef(null);
921
+ import_react4.default.useEffect(() => {
922
+ if (isControlled) setInternalValue(value ?? "");
923
+ }, [isControlled, value]);
924
+ import_react4.default.useEffect(() => {
925
+ setFiltered(options);
926
+ }, [options]);
927
+ const selected = import_react4.default.useMemo(
928
+ () => options.find((o) => o.value === (isControlled ? value : internalValue)) || null,
929
+ [options, value, internalValue, isControlled]
930
+ );
931
+ const displayText = selected?.label || placeholder || (label ? `Select ${label}` : "Select an option");
932
+ const openMenu = import_react4.default.useCallback(() => {
933
+ if (disabled || open) return;
934
+ setFiltered(options);
935
+ const idx = selected ? Math.max(
936
+ 0,
937
+ options.findIndex((o) => o.value === selected.value)
938
+ ) : 0;
939
+ setActiveIndex(idx);
940
+ setOpen(true);
941
+ setTimeout(() => {
942
+ if (hasSearch && searchRef.current) {
943
+ searchRef.current.focus();
944
+ searchRef.current.select();
945
+ }
946
+ });
947
+ }, [disabled, open, options, selected, hasSearch]);
948
+ const closeMenu = import_react4.default.useCallback(() => {
949
+ if (!open) return;
950
+ setOpen(false);
951
+ setActiveIndex(-1);
952
+ }, [open]);
953
+ const toggleMenu = import_react4.default.useCallback(() => {
954
+ if (disabled) return;
955
+ open ? closeMenu() : openMenu();
956
+ }, [open, disabled, openMenu, closeMenu]);
957
+ import_react4.default.useEffect(() => {
958
+ if (!open) return;
959
+ const handler = (e) => {
960
+ const t = e.target;
961
+ const tri = triggerRef.current;
962
+ const menu = menuRef.current;
963
+ if (tri && !tri.contains(t) && menu && !menu.contains(t)) closeMenu();
964
+ };
965
+ document.addEventListener("mousedown", handler);
966
+ return () => document.removeEventListener("mousedown", handler);
967
+ }, [open, closeMenu]);
968
+ const commit = (val) => {
969
+ if (!isControlled) setInternalValue(val);
970
+ onChange?.(val);
971
+ closeMenu();
972
+ };
973
+ const onSearchInput = (e) => {
974
+ const q = e.target.value.toLowerCase();
975
+ const list = options.filter((o) => o.label.toLowerCase().includes(q));
976
+ setFiltered(list);
977
+ setActiveIndex(list.length ? 0 : -1);
978
+ };
979
+ const onTriggerKeyDown = (e) => {
980
+ if (disabled) return;
981
+ switch (e.key) {
982
+ case "Enter":
983
+ case " ":
984
+ case "Spacebar":
985
+ case "ArrowDown":
986
+ e.preventDefault();
987
+ if (!open) openMenu();
988
+ else moveActive(1);
989
+ break;
990
+ case "ArrowUp":
991
+ e.preventDefault();
992
+ if (!open) openMenu();
993
+ else moveActive(-1);
994
+ break;
995
+ case "Escape":
996
+ if (open) {
997
+ e.preventDefault();
998
+ closeMenu();
999
+ }
1000
+ break;
1001
+ }
1002
+ };
1003
+ const onMenuKeyDown = (e) => {
1004
+ switch (e.key) {
1005
+ case "ArrowDown":
1006
+ e.preventDefault();
1007
+ moveActive(1);
1008
+ break;
1009
+ case "ArrowUp":
1010
+ e.preventDefault();
1011
+ moveActive(-1);
1012
+ break;
1013
+ case "Home":
1014
+ e.preventDefault();
1015
+ setActiveIndex(filtered.length ? 0 : -1);
1016
+ scrollActiveIntoView(0);
1017
+ break;
1018
+ case "End":
1019
+ e.preventDefault();
1020
+ setActiveIndex(filtered.length - 1);
1021
+ scrollActiveIntoView(filtered.length - 1);
1022
+ break;
1023
+ case "Enter":
1024
+ e.preventDefault();
1025
+ if (activeIndex >= 0) {
1026
+ const opt = filtered[activeIndex];
1027
+ if (opt) commit(opt.value);
1028
+ }
1029
+ break;
1030
+ case "Escape":
1031
+ e.preventDefault();
1032
+ closeMenu();
1033
+ break;
1034
+ case "Tab":
1035
+ closeMenu();
1036
+ break;
1037
+ }
1038
+ };
1039
+ const moveActive = (delta) => {
1040
+ if (!filtered.length) return;
1041
+ const max = filtered.length - 1;
1042
+ const next = activeIndex < 0 ? 0 : Math.min(max, Math.max(0, activeIndex + delta));
1043
+ setActiveIndex(next);
1044
+ scrollActiveIntoView(next);
1045
+ };
1046
+ const scrollActiveIntoView = (index) => {
1047
+ const menu = menuRef.current;
1048
+ if (!menu) return;
1049
+ const items = menu.querySelectorAll("[data-option]");
1050
+ if (index >= 0 && index < items.length) {
1051
+ items[index]?.scrollIntoView({ block: "nearest" });
1052
+ }
1053
+ };
1054
+ const containerBg = disabled ? "bg-grey-100 cursor-not-allowed" : "bg-white";
1055
+ const containerBorder = validationError ? "border-red-300 bg-red-50" : "border-grey-100 bg-white";
1056
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: `flex flex-col gap-2 relative ${className}`, children: [
1057
+ label ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("p", { className: "mb-0 text-body-2xs font-normal text-heading-text", children: [
1058
+ label,
1059
+ required && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "text-orange-required", children: " *" })
1060
+ ] }) : null,
1061
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
1062
+ "div",
1063
+ {
1064
+ ref: triggerRef,
1065
+ className: `border-c rounded-md flex items-center justify-between h-12 cursor-pointer px-3 py-2 ${containerBg} ${containerBorder}`,
1066
+ role: "combobox",
1067
+ "aria-haspopup": "listbox",
1068
+ "aria-expanded": open,
1069
+ "aria-controls": open ? "select-menu" : void 0,
1070
+ "aria-disabled": disabled || void 0,
1071
+ "aria-activedescendant": open && activeIndex >= 0 ? `option-${activeIndex}` : void 0,
1072
+ tabIndex: 0,
1073
+ onClick: toggleMenu,
1074
+ onKeyDown: onTriggerKeyDown,
1075
+ children: [
1076
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-center gap-2", children: [
1077
+ prefix,
1078
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-center gap-2", children: [
1079
+ selected && itemImageType === "country" && selected.countryCode && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1080
+ BaseImage,
1081
+ {
1082
+ src: `https://flagcdn.com/w40/${selected.countryCode.toLowerCase()}.png`,
1083
+ alt: selected.countryCode,
1084
+ width: 28,
1085
+ customClass: "rounded-lg"
1086
+ }
1087
+ ),
1088
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1089
+ "p",
1090
+ {
1091
+ className: `text-body-2xs font-normal mb-0 ${selected?.label ? "text-sub-copy" : "text-grey-500"}`,
1092
+ children: displayText
1093
+ }
1094
+ )
1095
+ ] })
1096
+ ] }),
1097
+ loading ? (
1098
+ // Loader (replace with your own IconLoader if you have one)
1099
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "inline-block h-4 w-4 border-2 border-current border-t-transparent rounded-full animate-spin" })
1100
+ ) : open ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(IconChevronUp, { color: "#8FAECA" }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(IconChevronDown, { color: "#8FAECA" })
1101
+ ]
1102
+ }
1103
+ ),
1104
+ open && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
1105
+ "div",
1106
+ {
1107
+ ref: menuRef,
1108
+ id: "select-menu",
1109
+ className: "border-c bg-white rounded-md border-grey-border text-body-xs font-normal text-input-grey w-full mt-2 max-h-22rem overflow-y-auto",
1110
+ role: "listbox",
1111
+ "aria-label": label || "Options",
1112
+ style: { position: "absolute", top: "100%", zIndex: 10 },
1113
+ onKeyDown: onMenuKeyDown,
1114
+ children: [
1115
+ hasSearch && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "px-4 pt-2 pb-1", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1116
+ "input",
1117
+ {
1118
+ ref: searchRef,
1119
+ type: "text",
1120
+ onChange: onSearchInput,
1121
+ placeholder: `Search ${label || "options"}`,
1122
+ className: "bg-transparent outline-none border-b pb-2 w-full focus:outline-none focus:ring-0 text-body-2xs text-light-copy font-normal"
1123
+ }
1124
+ ) }),
1125
+ filtered.map((opt, i) => {
1126
+ const selectedOpt = selected?.value === opt.value;
1127
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
1128
+ "div",
1129
+ {
1130
+ onClick: () => commit(opt.value),
1131
+ id: `option-${i}`,
1132
+ "data-option": true,
1133
+ role: "option",
1134
+ "aria-selected": selectedOpt,
1135
+ className: `px-4 py-3 first:pt-0 hover:bg-gray-100 flex items-center gap-2 cursor-pointer ${i === activeIndex ? "bg-gray-100" : ""}`,
1136
+ children: [
1137
+ itemImageType === "country" && opt.countryCode && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1138
+ BaseImage,
1139
+ {
1140
+ src: `https://flagcdn.com/w40/${opt.countryCode.toLowerCase()}.png`,
1141
+ alt: opt.countryCode,
1142
+ width: 28,
1143
+ customClass: "rounded-lg"
1144
+ }
1145
+ ),
1146
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "mb-0 text-body-2xs font-medium", children: opt.label })
1147
+ ]
1148
+ },
1149
+ opt.value
1150
+ );
1151
+ })
1152
+ ]
1153
+ }
1154
+ ),
1155
+ hint && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(BaseHint, { hint }),
1156
+ validationError && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(BaseInputError, { errorMessage: validationError })
1157
+ ] });
1158
+ };
1159
+
1160
+ // src/components/base/currency-amount.tsx
1161
+ var import_jsx_runtime23 = require("react/jsx-runtime");
1162
+ var BaseCurrencyAmount = ({
1163
+ currency,
1164
+ amount,
1165
+ textClass = "",
1166
+ iconColorClass = "",
1167
+ iconWidth = 16,
1168
+ iconHeight = 16
1169
+ }) => {
1170
+ const cur = currency?.toUpperCase();
1171
+ if (cur !== "USDT" && cur !== "USDC") {
1172
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: textClass, children: formatAmount(amount, cur) });
1173
+ }
1174
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-center gap-1", children: [
1175
+ cur === "USDT" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1176
+ IconUsdt,
1177
+ {
1178
+ width: iconWidth,
1179
+ height: iconHeight,
1180
+ color: iconColorClass
1181
+ }
1182
+ ),
1183
+ cur === "USDC" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1184
+ IconUsdc,
1185
+ {
1186
+ width: iconWidth,
1187
+ height: iconHeight,
1188
+ color: iconColorClass
1189
+ }
1190
+ ),
1191
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: textClass, children: formatAmount(amount) })
1192
+ ] });
1193
+ };
1194
+
1195
+ // src/buzapay-checkout/checkout-iframe.tsx
1196
+ var import_react5 = require("react");
1197
+ var import_jsx_runtime24 = require("react/jsx-runtime");
1198
+ function BzpCheckoutIframe({
1199
+ style = {
1200
+ width: "100%",
1201
+ height: "100vh",
1202
+ border: "0",
1203
+ borderRadius: "6px",
1204
+ overflow: "hidden"
1205
+ },
1206
+ url,
1207
+ secretKey,
1208
+ environment = "sandbox",
1209
+ paymentObject = {
1210
+ amount: 0,
1211
+ currency: "",
1212
+ email: "",
1213
+ phoneNumber: "",
1214
+ narration: "",
1215
+ redirectUrl: ""
1216
+ }
1217
+ }) {
1218
+ const containerRef = (0, import_react5.useRef)(null);
1219
+ const iframeRef = (0, import_react5.useRef)(null);
1220
+ const [message, setMessage] = (0, import_react5.useState)("");
1221
+ const [launchUrl, setLaunchUrl] = (0, import_react5.useState)("");
1222
+ const [loading, setLoading] = (0, import_react5.useState)(false);
1223
+ const launchIframe = (0, import_react5.useCallback)(
1224
+ (url2) => {
1225
+ if (iframeRef.current && iframeRef.current.parentNode) {
1226
+ iframeRef.current.parentNode.removeChild(iframeRef.current);
1227
+ }
1228
+ const iframe = document.createElement("iframe");
1229
+ iframe.src = url2;
1230
+ if (style.width) iframe.style.width = style.width;
1231
+ if (style.height) iframe.style.height = style.height;
1232
+ if (style.border) iframe.style.border = style.border;
1233
+ if (style.borderRadius) iframe.style.borderRadius = style.borderRadius;
1234
+ if (style.overflow) iframe.style.overflow = style.overflow;
1235
+ containerRef.current?.appendChild(iframe);
1236
+ iframeRef.current = iframe;
1237
+ },
1238
+ [style]
1239
+ );
1240
+ const generatePaymentLinkHandler = async () => {
1241
+ if (url) {
1242
+ launchIframe(url);
1243
+ return;
1244
+ }
1245
+ if (!secretKey) {
1246
+ return setMessage("Secret key is required.");
1247
+ }
1248
+ if (!checkObjectTruthy(paymentObject)) {
1249
+ return setMessage("Secret key is required.");
1250
+ }
1251
+ setLoading(true);
1252
+ const response = await createPaymentLink(
1253
+ paymentObject,
1254
+ environment,
1255
+ secretKey
1256
+ );
1257
+ if (response?.isSuccessful) {
1258
+ setLaunchUrl(response.launchUrl ?? "");
1259
+ setMessage("Payment link created successfully");
1260
+ if (response.launchUrl) {
1261
+ setLoading(false);
1262
+ launchIframe(response.launchUrl);
1263
+ }
1264
+ } else {
1265
+ setLoading(false);
1266
+ setMessage("Failed to create payment link");
1267
+ }
1268
+ };
1269
+ (0, import_react5.useEffect)(() => {
1270
+ if (!containerRef.current) return;
1271
+ generatePaymentLinkHandler();
1272
+ }, []);
1273
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "relative", style, children: [
1274
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { ref: containerRef, className: "w-full h-full" }),
1275
+ loading && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "absolute inset-0 grid place-items-center bg-white/60", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(IconLoader, {}) })
1276
+ ] });
1277
+ }
1278
+
1279
+ // src/buzapay-checkout/checkout-button.tsx
1280
+ var import_jsx_runtime25 = require("react/jsx-runtime");
1281
+ function BzpCheckoutButton({
1282
+ secretKey,
1283
+ environment = "sandbox",
1284
+ paymentObject = {
1285
+ amount: 0,
1286
+ currency: "",
1287
+ email: "",
1288
+ phoneNumber: "",
1289
+ narration: "",
1290
+ redirectUrl: ""
1291
+ },
1292
+ mode = "redirect"
1293
+ }) {
1294
+ const [message, setMessage] = (0, import_react6.useState)("");
1295
+ const [launchUrl, setLaunchUrl] = (0, import_react6.useState)("");
1296
+ const [loading, setLoading] = (0, import_react6.useState)(false);
1297
+ const generatePaymentLinkHandler = async () => {
1298
+ if (!secretKey) {
1299
+ setMessage("Secret key is required.");
1300
+ return;
1301
+ }
1302
+ if (!checkObjectTruthy(paymentObject)) {
1303
+ setMessage("Kindly ensure you are passing all the required data.");
1304
+ return;
1305
+ }
1306
+ setLoading(true);
1307
+ setMessage("");
1308
+ try {
1309
+ const response = await createPaymentLink(
1310
+ paymentObject,
1311
+ environment,
1312
+ secretKey
1313
+ );
1314
+ if (response?.isSuccessful && response.launchUrl) {
1315
+ setLaunchUrl(response.launchUrl);
1316
+ setMessage("Payment link created successfully");
1317
+ if (mode === "redirect") {
1318
+ window.open(response.launchUrl, "_blank", "noopener,noreferrer");
1319
+ }
1320
+ } else {
1321
+ setMessage("Failed to create payment link");
1322
+ }
1323
+ } catch (e) {
1324
+ setMessage(e?.message || "Failed to create payment link");
1325
+ } finally {
1326
+ setLoading(false);
1327
+ }
1328
+ };
1329
+ return launchUrl && mode === "iframe" ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1330
+ BzpCheckoutIframe,
1331
+ {
1332
+ url: launchUrl,
1333
+ secretKey,
1334
+ environment
1335
+ }
1336
+ ) : /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { children: [
1337
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1338
+ BaseButton,
1339
+ {
1340
+ label: "Pay",
1341
+ type: "primary",
1342
+ customClass: "w-full",
1343
+ loading,
1344
+ onClick: generatePaymentLinkHandler
1345
+ }
1346
+ ),
1347
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(BaseInputError, { errorMessage: message })
1348
+ ] });
1349
+ }
1350
+
1351
+ // src/buzapay-checkout/checkout-card.tsx
1352
+ var import_react11 = require("react");
1353
+
1354
+ // src/components/pay-by-card.tsx
1355
+ var import_react8 = require("react");
1356
+
1357
+ // src/components/base/input.tsx
1358
+ var import_react7 = __toESM(require("react"), 1);
1359
+ var import_jsx_runtime26 = require("react/jsx-runtime");
1360
+ var BaseInput = ({
1361
+ label = "",
1362
+ type = "text",
1363
+ placeholder,
1364
+ validationError = "",
1365
+ hint = "",
1366
+ rules = [],
1367
+ isAmountInput = false,
1368
+ required = false,
1369
+ disabled = false,
1370
+ loading = false,
1371
+ showCopyIcon = false,
1372
+ value,
1373
+ defaultValue,
1374
+ onChange,
1375
+ onBlur,
1376
+ prefix,
1377
+ suffix,
1378
+ className = ""
1379
+ }) => {
1380
+ const isControlled = value !== void 0;
1381
+ const [rawValue, setRawValue] = import_react7.default.useState(
1382
+ defaultValue ?? value ?? ""
1383
+ );
1384
+ const [localHint, setLocalHint] = import_react7.default.useState("");
1385
+ const [localError, setLocalError] = import_react7.default.useState("");
1386
+ import_react7.default.useEffect(() => {
1387
+ if (isControlled) setRawValue(value ?? "");
1388
+ }, [isControlled, value]);
1389
+ const formattedValue = isAmountInput ? formatAmount(rawValue.replace(/,/g, "")) : rawValue;
1390
+ const handleChange = (e) => {
1391
+ const incoming = e.target.value.replace(/,/g, "");
1392
+ if (!isControlled) setRawValue(incoming);
1393
+ onChange?.(incoming);
1394
+ setTimeout(() => {
1395
+ const el = e.target;
1396
+ el.selectionStart = el.selectionEnd = el.value.length;
1397
+ });
1398
+ };
1399
+ const handleBlur = () => {
1400
+ onBlur?.(rawValue);
1401
+ };
1402
+ const handleKeyDown = (e) => {
1403
+ if (rules.includes("numeric")) restrictToNumericKeys(e);
1404
+ };
1405
+ const containerBg = disabled ? "bg-grey-50 cursor-not-allowed" : "bg-white";
1406
+ const containerBorder = validationError || localError ? "border-red-300 bg-red-50" : "border-grey-100";
1407
+ const copyToClipboard = (text) => {
1408
+ return navigator.clipboard.writeText(text);
1409
+ };
1410
+ const copyHandler = () => {
1411
+ copyToClipboard(rawValue).then(() => {
1412
+ setLocalHint("Text copied to clipboard");
1413
+ }).catch((err) => {
1414
+ setLocalError("Failed to copy text to clipboard");
1415
+ });
1416
+ };
1417
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: `flex flex-col gap-2 ${className}`, children: [
1418
+ label ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("p", { className: "mb-0 text-body-2xs font-normal text-heading-text", children: [
1419
+ label,
1420
+ required && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "text-orange-required", children: " *" })
1421
+ ] }) : null,
1422
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
1423
+ "div",
1424
+ {
1425
+ className: `border-c px-3 py-2 flex items-center justify-between rounded-md h-12 ${containerBg} ${containerBorder}`,
1426
+ children: [
1427
+ prefix,
1428
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1429
+ "input",
1430
+ {
1431
+ type,
1432
+ value: formattedValue,
1433
+ onChange: handleChange,
1434
+ onBlur: handleBlur,
1435
+ onKeyDown: handleKeyDown,
1436
+ disabled,
1437
+ placeholder: placeholder ?? (label ? `Enter ${label.toLowerCase()}` : void 0),
1438
+ inputMode: isAmountInput ? "decimal" : void 0,
1439
+ className: "search-input bg-transparent outline-none border-none focus:outline-none focus:ring-0 text-body-2xs text-light-copy font-normal w-full"
1440
+ }
1441
+ ),
1442
+ !loading ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
1443
+ suffix,
1444
+ showCopyIcon && rawValue && rawValue.trim() !== "" && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1445
+ BaseImage,
1446
+ {
1447
+ src: "assets/images/copyIcon.svg",
1448
+ alt: "copy",
1449
+ width: 16,
1450
+ height: 16,
1451
+ customClass: "cursor-pointer hover:opacity-70 transition-opacity",
1452
+ onClick: copyHandler
1453
+ }
1454
+ )
1455
+ ] }) : (
1456
+ // Simple loader placeholder; swap for your icon component if desired
1457
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full" })
1458
+ )
1459
+ ]
1460
+ }
1461
+ ),
1462
+ (hint || localHint) && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-body-3xs text-light-copy", children: localHint || hint }),
1463
+ (validationError || localError) && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-body-3xs text-red-500", children: localError || validationError })
1464
+ ] });
1465
+ };
1466
+
1467
+ // src/components/pay-by-card.tsx
1468
+ var import_jsx_runtime27 = require("react/jsx-runtime");
1469
+ function PayByCard({}) {
1470
+ const [formIndex, setFormIndex] = (0, import_react8.useState)(0);
1471
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex flex-col gap-6", children: [
1472
+ formIndex === 0 && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "grid grid-cols-2 gap-6 overflow-y-auto", children: [
1473
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(BaseInput, { label: "First Name", required: true }),
1474
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(BaseInput, { label: "Last Name", required: true }),
1475
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(BaseInput, { label: "Email", required: true }),
1476
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(BaseInput, { label: "Phone Number", required: true }),
1477
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1478
+ BaseSelect,
1479
+ {
1480
+ label: "Select Country",
1481
+ required: true,
1482
+ options: [
1483
+ { label: "United States", value: "US" },
1484
+ { label: "Canada", value: "CA" },
1485
+ { label: "United Kingdom", value: "UK" }
1486
+ ]
1487
+ }
1488
+ ),
1489
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1490
+ BaseSelect,
1491
+ {
1492
+ label: "Select State",
1493
+ required: true,
1494
+ options: [
1495
+ { label: "California", value: "CA" },
1496
+ { label: "Texas", value: "TX" },
1497
+ { label: "New York", value: "NY" }
1498
+ ]
1499
+ }
1500
+ ),
1501
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(BaseInput, { label: "City", required: true }),
1502
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(BaseInput, { label: "Postal Code", required: true }),
1503
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "col-span-2", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(BaseInput, { label: "Street Address", required: true }) })
1504
+ ] }),
1505
+ formIndex === 1 && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
1506
+ "div",
1507
+ {
1508
+ className: "grid grid-cols-2 gap-6 overflow-y-auto",
1509
+ style: { maxHeight: "320px" },
1510
+ children: [
1511
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "col-span-2", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(BaseInput, { label: "Card Name", required: true }) }),
1512
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "col-span-2", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(BaseInput, { label: "Card Number", required: true }) }),
1513
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(BaseInput, { label: "Expiry Date", required: true }),
1514
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(BaseInput, { label: "CVV", required: true })
1515
+ ]
1516
+ }
1517
+ ),
1518
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1519
+ BaseButton,
1520
+ {
1521
+ label: formIndex === 0 ? "Proceed" : "Pay",
1522
+ type: "primary",
1523
+ customClass: "w-full",
1524
+ onClick: formIndex === 0 ? () => setFormIndex(1) : void 0
1525
+ }
1526
+ )
1527
+ ] });
1528
+ }
1529
+
1530
+ // src/components/pay-by-transfer.tsx
1531
+ var import_react9 = require("react");
1532
+ var import_jsx_runtime28 = require("react/jsx-runtime");
1533
+ var PayByTransfer = ({
1534
+ amountDisplay = "NGN 200,500.00",
1535
+ bankName = "Teerus MFB",
1536
+ accountNumber = "0001928940",
1537
+ initialSeconds = 30 * 60,
1538
+ onConfirmPaid,
1539
+ onCancel
1540
+ }) => {
1541
+ const [remaining, setRemaining] = (0, import_react9.useState)(initialSeconds);
1542
+ const intervalRef = (0, import_react9.useRef)(null);
1543
+ const countDownTime = (0, import_react9.useMemo)(() => {
1544
+ const clamped = Math.max(0, remaining);
1545
+ const m = Math.floor(clamped / 60);
1546
+ const s = clamped % 60;
1547
+ return `${String(m).padStart(2, "0")}:${String(s).padStart(2, "0")}`;
1548
+ }, [remaining]);
1549
+ (0, import_react9.useEffect)(() => {
1550
+ intervalRef.current = window.setInterval(() => {
1551
+ setRemaining((prev) => prev - 1);
1552
+ }, 1e3);
1553
+ return () => {
1554
+ if (intervalRef.current) {
1555
+ clearInterval(intervalRef.current);
1556
+ intervalRef.current = null;
1557
+ }
1558
+ };
1559
+ }, []);
1560
+ (0, import_react9.useEffect)(() => {
1561
+ if (remaining < 0 && intervalRef.current) {
1562
+ clearInterval(intervalRef.current);
1563
+ intervalRef.current = null;
1564
+ }
1565
+ }, [remaining]);
1566
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-col gap-10", children: [
1567
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("p", { className: "text-sub-copy text-sm font-semibold text-center", children: [
1568
+ "Amount to Pay ",
1569
+ amountDisplay
1570
+ ] }),
1571
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "bg-[#EFF7FF] p-4 rounded-lg flex flex-col gap-6", children: [
1572
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(BaseLabelInfo, { label: "Bank Name", value: bankName, type: "horizontal" }),
1573
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center justify-between", children: [
1574
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1575
+ BaseLabelInfo,
1576
+ {
1577
+ label: "Account Number",
1578
+ value: accountNumber,
1579
+ type: "horizontal"
1580
+ }
1581
+ ),
1582
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(BaseCopy, { color: "#9DBFDE", copyText: accountNumber })
1583
+ ] }),
1584
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center justify-between", children: [
1585
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1586
+ BaseLabelInfo,
1587
+ {
1588
+ label: "Amount",
1589
+ value: amountDisplay,
1590
+ type: "horizontal"
1591
+ }
1592
+ ),
1593
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(BaseCopy, { color: "#9DBFDE", copyText: amountDisplay })
1594
+ ] })
1595
+ ] }),
1596
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("p", { className: "w-2/3 mx-auto text-center text-body-2xs font-medium text-sub-copy", children: [
1597
+ "This account is for this transaction only and expires in",
1598
+ " ",
1599
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-orange-500", children: remaining >= 0 ? countDownTime : "00:00" })
1600
+ ] }),
1601
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-col gap-4", children: [
1602
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1603
+ BaseButton,
1604
+ {
1605
+ label: "I have paid the money",
1606
+ type: "primary",
1607
+ customClass: "w-full",
1608
+ onClick: onConfirmPaid
1609
+ }
1610
+ ),
1611
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1612
+ "button",
1613
+ {
1614
+ type: "button",
1615
+ onClick: onCancel,
1616
+ className: "text-heading-text text-body-2xs font-medium text-center py-2 cursor-pointer",
1617
+ children: "Cancel Payment"
1618
+ }
1619
+ )
1620
+ ] })
1621
+ ] });
1622
+ };
1623
+
1624
+ // src/components/pay-by-stable-coin.tsx
1625
+ var import_react10 = require("react");
1626
+ var import_jsx_runtime29 = require("react/jsx-runtime");
1627
+ var PayByStableCoin = ({ onProceedToPay }) => {
1628
+ const [formIndex, setFormIndex] = (0, import_react10.useState)(0);
1629
+ const payHandler = () => {
1630
+ setFormIndex(1);
1631
+ onProceedToPay?.();
1632
+ };
1633
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex flex-col gap-6", children: [
1634
+ formIndex === 0 && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
1635
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "grid grid-cols-1 gap-6", children: [
1636
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1637
+ BaseSelect,
1638
+ {
1639
+ label: "Select Crypto",
1640
+ required: true,
1641
+ options: [
1642
+ { label: "USDT", value: "USDT" },
1643
+ { label: "USDC", value: "USDC" },
1644
+ { label: "BUSD", value: "BUSD" }
1645
+ ]
1646
+ }
1647
+ ),
1648
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1649
+ BaseSelect,
1650
+ {
1651
+ label: "Select Network",
1652
+ required: true,
1653
+ options: [
1654
+ { label: "Ethereum", value: "ETH" },
1655
+ { label: "Binance Smart Chain", value: "BSC" },
1656
+ { label: "Polygon", value: "MATIC" }
1657
+ ]
1658
+ }
1659
+ )
1660
+ ] }),
1661
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1662
+ BaseButton,
1663
+ {
1664
+ label: "Pay",
1665
+ type: "primary",
1666
+ customClass: "w-full",
1667
+ onClick: payHandler
1668
+ }
1669
+ )
1670
+ ] }),
1671
+ formIndex === 1 && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex flex-col gap-6", children: [
1672
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "mx-auto", children: [
1673
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1674
+ BaseImage,
1675
+ {
1676
+ src: "../../../assets/images/stable-coin-qr-code.png",
1677
+ alt: "QR Code",
1678
+ width: 122,
1679
+ height: 122,
1680
+ customClass: "mb-1"
1681
+ }
1682
+ ),
1683
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "mb-0 text-body-4xs text-light-copy font-normal text-center", children: "USDC" })
1684
+ ] }),
1685
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex flex-col gap-6 border-c border-grey-100 p-4 rounded-2xl bg-light-white-50", children: [
1686
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "border-b border-grey-border pb-4 flex flex-col gap-2", children: [
1687
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "mb-0 text-body-3xs text-light-copy font-normal", children: "Network" }),
1688
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex justify-between", children: [
1689
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex flex-col gap-1", children: [
1690
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "mb-0 text-body-2xs font-medium text-sub-copy", children: "BNB Smart Chain (BEP20)" }),
1691
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex items-center gap-2", children: [
1692
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "mb-0 text-body-3xs text-light-copy font-normal", children: "*Est. arrival = 3 mins" }),
1693
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "mb-0 text-body-3xs text-light-copy font-normal", children: "|" }),
1694
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1695
+ BaseCurrencyAmount,
1696
+ {
1697
+ currency: "USDC",
1698
+ amount: 10,
1699
+ textClass: "mb-0 text-body-3xs text-light-copy font-normal",
1700
+ iconColorClass: "#557591",
1701
+ iconWidth: 12,
1702
+ iconHeight: 12
1703
+ }
1704
+ )
1705
+ ] })
1706
+ ] }),
1707
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(IconArrowSwap, {})
1708
+ ] })
1709
+ ] }),
1710
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "pb-4 flex flex-col gap-2", children: [
1711
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "mb-0 text-body-3xs text-light-copy font-normal", children: "Deposit Address >" }),
1712
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex justify-between", children: [
1713
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "mb-0 text-body-2xs font-medium text-sub-copy w-2/3 break-words", children: "0j8938ysheeee8333c162883a4d4f5g6t111nhk8uey37777yt6" }),
1714
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(BaseCopy, { copyText: "0j8938ysheeee8333c162883a4d4f5g6t111nhk8uey37777yt6" })
1715
+ ] })
1716
+ ] })
1717
+ ] }),
1718
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex flex-col gap-2", children: [
1719
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex items-center justify-between border-b border-grey-border py-3", children: [
1720
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "mb-0 text-body-2xs font-medium text-primary-black", children: "Network fee" }),
1721
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1722
+ BaseCurrencyAmount,
1723
+ {
1724
+ currency: "USDC",
1725
+ amount: 12,
1726
+ textClass: "mb-0 text-body-2xs font-extrabold text-primary-black",
1727
+ iconColorClass: "#231F20"
1728
+ }
1729
+ )
1730
+ ] }),
1731
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex items-center justify-between py-4", children: [
1732
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "mb-0 text-body-lg font-semibold text-primary-black", children: "Pay" }),
1733
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1734
+ BaseCurrencyAmount,
1735
+ {
1736
+ currency: "USDC",
1737
+ amount: 15,
1738
+ textClass: "mb-0 text-body-lg font-extrabold text-primary-black",
1739
+ iconColorClass: "#231F20",
1740
+ iconWidth: 20,
1741
+ iconHeight: 20
1742
+ }
1743
+ )
1744
+ ] })
1745
+ ] }),
1746
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex flex-col gap-6", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1747
+ BaseButton,
1748
+ {
1749
+ label: "Confirm Payment",
1750
+ type: "primary",
1751
+ customClass: "w-full"
1752
+ }
1753
+ ) })
1754
+ ] })
1755
+ ] });
1756
+ };
1757
+
1758
+ // src/buzapay-checkout/checkout-card.tsx
1759
+ var import_jsx_runtime30 = require("react/jsx-runtime");
1760
+ function BzpCheckoutCard({
1761
+ options,
1762
+ environment = "sandbox",
1763
+ paymentObject = {
1764
+ amount: 0,
1765
+ currency: "",
1766
+ email: "",
1767
+ phoneNumber: "",
1768
+ narration: "",
1769
+ redirectUrl: ""
1770
+ }
1771
+ }) {
1772
+ const [checkoutState, setCheckoutState] = (0, import_react11.useState)("PAYMENT");
1773
+ const paymentTypeOptions = [
1774
+ { label: "Card", value: "CARD" },
1775
+ { label: "Bank Transfer", value: "BANK_TRANSFER" },
1776
+ { label: "Stable Coin", value: "STABLE_COIN" }
1777
+ ];
1778
+ const [filteredPaymentTypeOptions, setFilteredPaymentTypeOptions] = (0, import_react11.useState)([]);
1779
+ const [paymentType, setPaymentType] = (0, import_react11.useState)("");
1780
+ const paymentTypeHandler = (event) => {
1781
+ setPaymentType(event);
1782
+ };
1783
+ (0, import_react11.useEffect)(() => {
1784
+ let options2 = [];
1785
+ if (paymentObject.currency === "USD") {
1786
+ options2 = paymentTypeOptions.filter(
1787
+ (option) => option.value !== "BANK_TRANSFER"
1788
+ );
1789
+ } else {
1790
+ options2 = paymentTypeOptions.filter(
1791
+ (option) => option.value !== "STABLE_COIN"
1792
+ );
1793
+ }
1794
+ setFilteredPaymentTypeOptions(options2);
1795
+ }, [paymentObject.currency]);
1796
+ (0, import_react11.useEffect)(() => {
1797
+ if (filteredPaymentTypeOptions.length) {
1798
+ setPaymentType(filteredPaymentTypeOptions[0].value);
1799
+ }
1800
+ }, [filteredPaymentTypeOptions]);
1801
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(BaseCard, { showBackButton: checkoutState === "STABLE_COIN_PAYMENT", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "grid grid-cols-3", children: [
1802
+ checkoutState === "PAYMENT" && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "bg-[#EFF7FF] px-6 py-8 flex flex-col gap-5 col-span-1 rounded-l-xl", children: [
1803
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-heading-text text-body-xs font-semibold", children: "Pay with" }),
1804
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1805
+ BaseRadioGroup,
1806
+ {
1807
+ options: paymentTypeOptions,
1808
+ selectedChange: (e) => paymentTypeHandler(e)
1809
+ }
1810
+ )
1811
+ ] }),
1812
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "col-span-2", children: [
1813
+ (checkoutState === "PAYMENT" || checkoutState === "STABLE_COIN_PAYMENT") && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { children: [
1814
+ checkoutState === "PAYMENT" && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-center justify-between px-12 py-8", children: [
1815
+ options?.imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1816
+ BaseImage,
1817
+ {
1818
+ src: options?.imageUrl ?? "",
1819
+ alt: "Merchant Logo",
1820
+ width: 52,
1821
+ height: 52,
1822
+ customClass: "rounded-lg"
1823
+ }
1824
+ ) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1825
+ "div",
1826
+ {
1827
+ className: "bg-heading-text rounded flex flex-col justify-center",
1828
+ style: { width: "52px", height: "52px" },
1829
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-white text-center text-body-2xs font-medium", children: "Logo" })
1830
+ }
1831
+ ),
1832
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-col gap-1", children: [
1833
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-body-2xs font-regular text-sub-copy text-right", children: "Raymahni Merchant LLC" }),
1834
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("p", { className: "text-body-2xs font-regular text-sub-copy text-right", children: [
1835
+ "Pay:",
1836
+ " ",
1837
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "text-orange-500 font-extrabold", children: [
1838
+ currencySign(paymentObject.currency),
1839
+ " 100,051.00"
1840
+ ] })
1841
+ ] })
1842
+ ] })
1843
+ ] }),
1844
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "overflow-y-scroll px-10 pb-10 pt-2", children: paymentType === "CARD" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(PayByCard, {}) : paymentType === "BANK_TRANSFER" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(PayByTransfer, {}) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1845
+ PayByStableCoin,
1846
+ {
1847
+ onProceedToPay: () => setCheckoutState("STABLE_COIN_PAYMENT")
1848
+ }
1849
+ ) })
1850
+ ] }),
1851
+ checkoutState === "SUCCESS" && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(BaseSuccess, {})
1852
+ ] })
1853
+ ] }) });
1854
+ }
1855
+ // Annotate the CommonJS export names for ESM import in node:
1856
+ 0 && (module.exports = {
1857
+ BzpCheckoutButton,
1858
+ BzpCheckoutCard,
1859
+ BzpCheckoutIframe,
1860
+ MidenPGClient,
1861
+ MidenPGProvider,
1862
+ useMidenPGClient,
1863
+ usePaymentIntents
1864
+ });
1865
+ //# sourceMappingURL=index.cjs.map