@instockng/storefront-ui 1.0.80 → 1.0.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/dist/components/Checkout.d.ts.map +1 -1
  2. package/dist/index100.mjs +3 -3
  3. package/dist/index142.mjs +1 -1
  4. package/dist/index144.mjs +21 -2
  5. package/dist/index145.mjs +54 -19
  6. package/dist/index146.mjs +28 -55
  7. package/dist/index147.mjs +6 -28
  8. package/dist/index148.mjs +51 -6
  9. package/dist/index149.mjs +5 -51
  10. package/dist/index150.mjs +12 -6
  11. package/dist/index151.mjs +7 -12
  12. package/dist/index152.mjs +27 -6
  13. package/dist/index153.mjs +2 -28
  14. package/dist/index154.mjs +70 -2
  15. package/dist/index155.mjs +164 -67
  16. package/dist/index156.mjs +2 -167
  17. package/dist/index16.mjs +223 -219
  18. package/dist/index160.mjs +1 -1
  19. package/dist/index161.mjs +1 -1
  20. package/dist/index162.mjs +1 -1
  21. package/dist/index163.mjs +1 -1
  22. package/dist/index164.mjs +1 -1
  23. package/dist/index166.mjs +1 -1
  24. package/dist/index167.mjs +1 -1
  25. package/dist/index169.mjs +2 -2
  26. package/dist/index170.mjs +1 -1
  27. package/dist/index175.mjs +2 -2
  28. package/dist/index177.mjs +1 -1
  29. package/dist/index179.mjs +2 -2
  30. package/dist/index180.mjs +5 -5
  31. package/dist/index183.mjs +1 -1
  32. package/dist/index186.mjs +1 -1
  33. package/dist/index189.mjs +1 -1
  34. package/dist/index190.mjs +1 -1
  35. package/dist/index194.mjs +1 -1
  36. package/dist/index196.mjs +1 -1
  37. package/dist/index200.mjs +1 -1
  38. package/dist/index202.mjs +1 -1
  39. package/dist/index211.mjs +2 -2
  40. package/dist/index213.mjs +1 -1
  41. package/dist/index214.mjs +1 -1
  42. package/dist/index215.mjs +31 -2
  43. package/dist/index216.mjs +11 -2
  44. package/dist/index217.mjs +4 -2
  45. package/dist/index218.mjs +4 -2
  46. package/dist/index219.mjs +13 -2
  47. package/dist/index220.mjs +7 -2
  48. package/dist/index221.mjs +11 -107
  49. package/dist/index222.mjs +5 -2
  50. package/dist/index223.mjs +33 -2
  51. package/dist/index224.mjs +31 -2
  52. package/dist/index225.mjs +28 -2
  53. package/dist/index226.mjs +58 -34
  54. package/dist/index227.mjs +2 -2
  55. package/dist/index228.mjs +2 -244
  56. package/dist/index229.mjs +2 -2
  57. package/dist/index230.mjs +2 -33
  58. package/dist/index231.mjs +2 -65
  59. package/dist/index232.mjs +2 -25
  60. package/dist/index233.mjs +108 -2
  61. package/dist/index234.mjs +2 -2
  62. package/dist/index235.mjs +2 -2
  63. package/dist/index236.mjs +2 -2
  64. package/dist/index238.mjs +37 -2
  65. package/dist/index240.mjs +244 -2
  66. package/dist/index242.mjs +32 -30
  67. package/dist/index243.mjs +64 -10
  68. package/dist/index244.mjs +24 -3
  69. package/dist/index245.mjs +2 -4
  70. package/dist/index246.mjs +2 -13
  71. package/dist/index247.mjs +2 -7
  72. package/dist/index248.mjs +2 -12
  73. package/dist/index249.mjs +2 -5
  74. package/dist/index250.mjs +2 -33
  75. package/dist/index251.mjs +2 -31
  76. package/dist/index252.mjs +2 -28
  77. package/dist/index253.mjs +2 -61
  78. package/dist/index254.mjs +2 -2
  79. package/dist/index255.mjs +4 -2
  80. package/dist/index256.mjs +2 -2
  81. package/dist/index257.mjs +2 -4
  82. package/dist/index258.mjs +3 -2
  83. package/dist/index259.mjs +2 -2
  84. package/dist/index260.mjs +2 -18
  85. package/dist/index261.mjs +16 -46
  86. package/dist/index262.mjs +13 -2
  87. package/dist/index263.mjs +6 -2
  88. package/dist/index264.mjs +30 -2
  89. package/dist/index266.mjs +2 -91
  90. package/dist/index267.mjs +18 -3
  91. package/dist/index268.mjs +47 -2
  92. package/dist/index269.mjs +2 -2
  93. package/dist/index270.mjs +2 -17
  94. package/dist/index271.mjs +2 -13
  95. package/dist/index272.mjs +2 -6
  96. package/dist/index273.mjs +91 -30
  97. package/dist/index36.mjs +1 -1
  98. package/dist/index37.mjs +1 -1
  99. package/dist/index38.mjs +1 -1
  100. package/dist/index39.mjs +1 -1
  101. package/dist/index40.mjs +1 -1
  102. package/dist/index41.mjs +2 -2
  103. package/dist/index43.mjs +2 -2
  104. package/dist/index46.mjs +3 -3
  105. package/dist/index50.mjs +1 -1
  106. package/dist/index57.mjs +1 -1
  107. package/dist/index58.mjs +1 -1
  108. package/dist/index59.mjs +1 -1
  109. package/dist/index60.mjs +1 -1
  110. package/dist/index61.mjs +1 -1
  111. package/dist/index62.mjs +1 -1
  112. package/dist/index63.mjs +1 -1
  113. package/dist/index64.mjs +1 -1
  114. package/dist/index65.mjs +1 -1
  115. package/dist/index66.mjs +1 -1
  116. package/dist/index67.mjs +1 -1
  117. package/dist/index68.mjs +1 -1
  118. package/dist/index69.mjs +1 -1
  119. package/dist/index70.mjs +4 -23
  120. package/dist/index71.mjs +19 -149
  121. package/dist/index72.mjs +24 -2
  122. package/dist/index73.mjs +2 -23
  123. package/dist/index74.mjs +149 -71
  124. package/dist/index75.mjs +74 -14
  125. package/dist/index76.mjs +14 -62
  126. package/dist/index77.mjs +62 -4
  127. package/dist/index83.mjs +1 -1
  128. package/dist/index87.mjs +5 -5
  129. package/dist/index89.mjs +3 -3
  130. package/dist/index99.mjs +1 -1
  131. package/package.json +1 -1
  132. package/src/components/Checkout.tsx +19 -3
package/dist/index16.mjs CHANGED
@@ -1,21 +1,21 @@
1
1
  'use client';
2
- import { jsxs as a, jsx as e, Fragment as Ie } from "react/jsx-runtime";
3
- import { useState as w, useEffect as j, useMemo as K, useCallback as qe } from "react";
4
- import { object as V, string as N, ValidationError as Se } from "./index46.mjs";
2
+ import { jsxs as r, jsx as e, Fragment as K } from "react/jsx-runtime";
3
+ import { useState as w, useEffect as Z, useMemo as G, useCallback as Se } from "react";
4
+ import { object as Y, string as N, ValidationError as je } from "./index46.mjs";
5
5
  import "./index24.mjs";
6
6
  import "@tanstack/react-query";
7
- import { useGetDeliveryZones as je } from "./index40.mjs";
8
- import { useCart as Ze } from "./index3.mjs";
9
- import { Modal as ue } from "./index20.mjs";
7
+ import { useGetDeliveryZones as Ze } from "./index40.mjs";
8
+ import { useCart as _e } from "./index3.mjs";
9
+ import { Modal as ye } from "./index20.mjs";
10
10
  import { FormInput as I } from "./index21.mjs";
11
- import { FormSelect as pe } from "./index22.mjs";
12
- import { Button as B } from "./index17.mjs";
13
- import { Loader2 as U, ChevronLeft as _e, ChevronRight as Le, Package as ye, Banknote as fe, Mail as Te, Phone as Fe, ChevronDown as ze, Zap as Ae } from "lucide-react";
14
- import { PostPurchaseUpsell as Be } from "./index47.mjs";
15
- import { formatCurrency as Z, cn as k, getFbCookies as G, getTikTokCookies as O } from "./index23.mjs";
16
- import We from "./index48.mjs";
17
- import { usePaystackPayment as $e } from "./index49.mjs";
18
- const Re = "2348125648668", He = `https://wa.me/${Re}`, Ke = (d) => d.replace(/\D/g, ""), Ue = V({
11
+ import { FormSelect as fe } from "./index22.mjs";
12
+ import { Button as W } from "./index17.mjs";
13
+ import { Loader2 as $, ChevronLeft as Le, ChevronRight as Fe, Package as ve, Banknote as Ne, Mail as Te, Phone as ze, ChevronDown as Ae, Zap as Be } from "lucide-react";
14
+ import { PostPurchaseUpsell as We } from "./index47.mjs";
15
+ import { formatCurrency as _, cn as k, getFbCookies as O, getTikTokCookies as V } from "./index23.mjs";
16
+ import $e from "./index48.mjs";
17
+ import { usePaystackPayment as Re } from "./index49.mjs";
18
+ const Ue = "2348125648668", He = `https://wa.me/${Ue}`, Ke = (d) => d.replace(/\D/g, ""), Ge = Y({
19
19
  firstName: N().required("First name is required").min(2, "First name must be at least 2 characters").max(50, "First name must be less than 50 characters"),
20
20
  lastName: N().required("Last name is required").min(2, "Last name must be at least 2 characters").max(50, "Last name must be less than 50 characters"),
21
21
  email: N().required("Email is required").email("Please enter a valid email address"),
@@ -27,50 +27,50 @@ const Re = "2348125648668", He = `https://wa.me/${Re}`, Ke = (d) => d.replace(/\
27
27
  // 0xxxxxxxxx (11 digits total)
28
28
  ].some((g) => g.test(q));
29
29
  })
30
- }), Ge = V({
30
+ }), Oe = Y({
31
31
  address: N().required("Street address is required").min(10, "Please provide a complete address"),
32
32
  city: N().required("City is required").min(3, "City name must be at least 3 characters"),
33
33
  state: N().required("State is required").test("not-empty", "State is required", (d) => !!d && d.trim() !== ""),
34
34
  deliveryZoneId: N().required("Delivery zone is required").test("not-empty", "Delivery zone is required", (d) => !!d && d.trim() !== "")
35
- }), Oe = V({
35
+ }), Ve = Y({
36
36
  paymentMethod: N().oneOf(["cod", "online"], "Please select a payment method").required("Payment method is required")
37
37
  });
38
- function ct({
38
+ function mt({
39
39
  isOpen: d,
40
40
  onClose: q,
41
41
  initialData: l,
42
42
  onSuccess: g,
43
43
  onError: o,
44
- submitButtonText: ve = "Place Order",
45
- refundPolicy: _
44
+ submitButtonText: ge = "Place Order",
45
+ refundPolicy: L
46
46
  }) {
47
- var re, se, ne, le, ie, de, oe, ce, me, he;
48
- const [c, b] = w("customer"), [L, Ne] = w(void 0), [f, Y] = w(void 0), [p, W] = w(null), { refetch: J, isLoading: Q, cart: s, updateCartMutation: $, checkoutMutation: ge, clearAndCreateNewCart: X } = Ze(), E = (re = s == null ? void 0 : s.brand) == null ? void 0 : re.paystackPublicKey, D = $e({
47
+ var se, ne, le, ie, de, oe, ce, me, he, ue, pe;
48
+ const [c, b] = w("customer"), [F, be] = w(void 0), [p, J] = w(void 0), [y, R] = w(null), { refetch: Q, isLoading: X, cart: a, updateCartMutation: S, checkoutMutation: xe, clearAndCreateNewCart: E } = _e(), D = (se = a == null ? void 0 : a.brand) == null ? void 0 : se.paystackPublicKey, ee = Re({
49
49
  isOpen: d,
50
- publicKey: E || "",
51
- onSuccess: async (r) => {
50
+ publicKey: D || "",
51
+ onSuccess: async (s) => {
52
52
  try {
53
- const { fbc: n, fbp: i } = G(), { ttp: m, ttclid: S } = O(), v = await M.mutateAsync({
53
+ const { fbc: n, fbp: i } = O(), { ttp: m, ttclid: j } = V(), v = await M.mutateAsync({
54
54
  firstName: t.firstName,
55
55
  lastName: t.lastName,
56
56
  email: t.email,
57
57
  phone: t.phone,
58
58
  address: t.address,
59
59
  city: t.city,
60
- deliveryZoneId: f || t.deliveryZoneId,
60
+ deliveryZoneId: p || t.deliveryZoneId,
61
61
  paymentMethod: t.paymentMethod,
62
- paystackReference: r.reference,
62
+ paystackReference: s.reference,
63
63
  fbc: n,
64
64
  fbp: i,
65
65
  ttp: m,
66
- ttclid: S
66
+ ttclid: j
67
67
  });
68
68
  if ("error" in v) {
69
69
  const P = v.error;
70
70
  o == null || o(new Error((P == null ? void 0 : P.message) || "Checkout failed"));
71
71
  return;
72
72
  }
73
- W(v), X(), g == null || g(v);
73
+ R(v), E(), g == null || g(v);
74
74
  } catch (n) {
75
75
  o == null || o(n);
76
76
  }
@@ -79,16 +79,16 @@ function ct({
79
79
  console.log("Payment popup closed by user");
80
80
  }
81
81
  });
82
- j(() => {
83
- d && J();
84
- }, [d, J]);
85
- const { data: C } = je(((se = s == null ? void 0 : s.brand) == null ? void 0 : se.id) || "", {
86
- enabled: !!((ne = s == null ? void 0 : s.brand) != null && ne.id)
87
- }), h = K(() => C == null ? void 0 : C.find((r) => r.id === L), [C, L]), y = K(() => h == null ? void 0 : h.zones.find((r) => r.id === f), [h, f]), M = ge;
88
- j(() => {
89
- d || (W(null), b("customer"), M.reset());
82
+ Z(() => {
83
+ d && Q();
84
+ }, [d, Q]);
85
+ const { data: C } = Ze(((ne = a == null ? void 0 : a.brand) == null ? void 0 : ne.id) || "", {
86
+ enabled: !!((le = a == null ? void 0 : a.brand) != null && le.id)
87
+ }), h = G(() => C == null ? void 0 : C.find((s) => s.id === F), [C, F]), f = G(() => h == null ? void 0 : h.zones.find((s) => s.id === p), [h, p]), M = xe;
88
+ Z(() => {
89
+ d || (R(null), b("customer"), M.reset());
90
90
  }, [d]);
91
- const [t, R] = w({
91
+ const [t, U] = w({
92
92
  firstName: (l == null ? void 0 : l.firstName) || "",
93
93
  lastName: (l == null ? void 0 : l.lastName) || "",
94
94
  email: (l == null ? void 0 : l.email) || "",
@@ -99,104 +99,104 @@ function ct({
99
99
  paymentMethod: (l == null ? void 0 : l.paymentMethod) || "online",
100
100
  notes: (l == null ? void 0 : l.notes) || ""
101
101
  });
102
- j(() => {
102
+ Z(() => {
103
103
  d && b("customer");
104
104
  }, [d]);
105
- const [ee, te] = w(!1);
106
- j(() => {
107
- d && s && !l && !ee && (R((r) => {
105
+ const [te, ae] = w(!1);
106
+ Z(() => {
107
+ d && a && !l && !te && (U((s) => {
108
108
  var n;
109
109
  return {
110
- ...r,
111
- firstName: s.customerFirstName || r.firstName,
112
- lastName: s.customerLastName || r.lastName,
113
- email: s.customerEmail || r.email,
114
- phone: s.customerPhone || r.phone,
115
- deliveryZoneId: ((n = s.deliveryZone) == null ? void 0 : n.id) || r.deliveryZoneId
110
+ ...s,
111
+ firstName: a.customerFirstName || s.firstName,
112
+ lastName: a.customerLastName || s.lastName,
113
+ email: a.customerEmail || s.email,
114
+ phone: a.customerPhone || s.phone,
115
+ deliveryZoneId: ((n = a.deliveryZone) == null ? void 0 : n.id) || s.deliveryZoneId
116
116
  };
117
- }), te(!0)), d || te(!1);
118
- }, [d, s, l, ee]), j(() => {
119
- if (f) {
120
- const r = h == null ? void 0 : h.zones.find((n) => n.id === f);
121
- r && R((n) => ({
117
+ }), ae(!0)), d || ae(!1);
118
+ }, [d, a, l, te]), Z(() => {
119
+ if (p) {
120
+ const s = h == null ? void 0 : h.zones.find((n) => n.id === p);
121
+ s && U((n) => ({
122
122
  ...n,
123
- paymentMethod: r.allowOnline ? "online" : "cod"
123
+ paymentMethod: s.allowOnline ? "online" : "cod"
124
124
  }));
125
125
  }
126
- }, [f, h]);
127
- const [u, T] = w({}), [H, be] = w(!1), x = (r) => {
128
- const { name: n, value: i } = r.target;
129
- R((m) => ({ ...m, [n]: i })), u[n] && T((m) => ({ ...m, [n]: void 0 }));
130
- }, F = qe(
131
- (r) => {
132
- const n = t[r];
126
+ }, [p, h]);
127
+ const [u, T] = w({}), [H, we] = w(!1), x = (s) => {
128
+ const { name: n, value: i } = s.target;
129
+ U((m) => ({ ...m, [n]: i })), u[n] && T((m) => ({ ...m, [n]: void 0 }));
130
+ }, z = Se(
131
+ (s) => {
132
+ const n = t[s];
133
133
  if (!n) return;
134
134
  const i = {};
135
- r === "firstName" ? i.customerFirstName = n : r === "lastName" ? i.customerLastName = n : r === "email" ? i.customerEmail = n : r === "phone" && (i.customerPhone = n), $.mutate(i);
135
+ s === "firstName" ? i.customerFirstName = n : s === "lastName" ? i.customerLastName = n : s === "email" ? i.customerEmail = n : s === "phone" && (i.customerPhone = n), S.mutate(i);
136
136
  },
137
- [t, $]
138
- ), z = (r) => {
137
+ [t, S]
138
+ ), A = (s) => {
139
139
  const n = {};
140
140
  try {
141
- if (r === "customer")
142
- Ue.validateSync(t, { abortEarly: !1 });
143
- else if (r === "delivery") {
141
+ if (s === "customer")
142
+ Ge.validateSync(t, { abortEarly: !1 });
143
+ else if (s === "delivery") {
144
144
  const i = {
145
145
  address: t.address,
146
146
  city: t.city,
147
- state: L || t.state || "",
148
- deliveryZoneId: f || t.deliveryZoneId || ""
147
+ state: F || t.state || "",
148
+ deliveryZoneId: p || t.deliveryZoneId || ""
149
149
  };
150
- Ge.validateSync(i, { abortEarly: !1 });
151
- } else r === "payment" && Oe.validateSync(t, { abortEarly: !1 });
150
+ Oe.validateSync(i, { abortEarly: !1 });
151
+ } else s === "payment" && Ve.validateSync(t, { abortEarly: !1 });
152
152
  } catch (i) {
153
- i instanceof Se && i.inner.forEach((m) => {
153
+ i instanceof je && i.inner.forEach((m) => {
154
154
  m.path && (n[m.path] = m.message);
155
155
  });
156
156
  }
157
157
  return T(n), Object.keys(n).length === 0;
158
- }, xe = () => {
159
- z(c) && (c === "customer" ? b("delivery") : c === "delivery" && b("payment"));
160
- }, we = () => {
158
+ }, Ce = () => {
159
+ A(c) && (c === "customer" ? b("delivery") : c === "delivery" && b("payment"));
160
+ }, Pe = () => {
161
161
  c === "payment" ? b("delivery") : c === "delivery" && b("customer");
162
- }, Ce = async () => {
163
- var r;
164
- if (!z("customer")) {
162
+ }, ke = async () => {
163
+ var s;
164
+ if (!A("customer")) {
165
165
  b("customer");
166
166
  return;
167
167
  }
168
- if (!z("delivery")) {
168
+ if (!A("delivery")) {
169
169
  b("delivery");
170
170
  return;
171
171
  }
172
- if (z("payment")) {
172
+ if (A("payment")) {
173
173
  if (t.paymentMethod === "online") {
174
- if (!E) {
174
+ if (!D) {
175
175
  o == null || o(new Error("Paystack is not configured. Please contact support."));
176
176
  return;
177
177
  }
178
- if (!D.isLoaded) {
178
+ if (!ee.isLoaded) {
179
179
  o == null || o(new Error("Payment system is loading. Please try again."));
180
180
  return;
181
181
  }
182
- const n = Math.round(s.pricing.total * 100), { fbc: i, fbp: m } = G(), { ttp: S, ttclid: v } = O();
183
- D.initializePayment({
184
- email: t.email || (s == null ? void 0 : s.customerEmail) || "customer@example.com",
182
+ const n = Math.round(a.pricing.total * 100), { fbc: i, fbp: m } = O(), { ttp: j, ttclid: v } = V();
183
+ ee.initializePayment({
184
+ email: t.email || (a == null ? void 0 : a.customerEmail) || "customer@example.com",
185
185
  amount: n,
186
186
  currency: "NGN",
187
187
  metadata: {
188
- cartId: s == null ? void 0 : s.id,
189
- brandSlug: (r = s == null ? void 0 : s.brand) == null ? void 0 : r.slug,
188
+ cartId: a == null ? void 0 : a.id,
189
+ brandSlug: (s = a == null ? void 0 : a.brand) == null ? void 0 : s.slug,
190
190
  address: t.address,
191
191
  city: t.city,
192
- delivery_zone_id: f || t.deliveryZoneId,
192
+ delivery_zone_id: p || t.deliveryZoneId,
193
193
  firstName: t.firstName,
194
194
  lastName: t.lastName,
195
195
  email: t.email,
196
196
  phone: t.phone,
197
197
  fbc: i,
198
198
  fbp: m,
199
- ttp: S,
199
+ ttp: j,
200
200
  ttclid: v,
201
201
  custom_fields: [
202
202
  {
@@ -222,7 +222,7 @@ function ct({
222
222
  {
223
223
  display_name: "Delivery Zone ID",
224
224
  variable_name: "delivery_zone_id",
225
- value: f || t.deliveryZoneId
225
+ value: p || t.deliveryZoneId
226
226
  }
227
227
  ]
228
228
  }
@@ -230,118 +230,122 @@ function ct({
230
230
  return;
231
231
  }
232
232
  try {
233
- const { fbc: n, fbp: i } = G(), { ttp: m, ttclid: S } = O(), v = await M.mutateAsync({
233
+ const { fbc: n, fbp: i } = O(), { ttp: m, ttclid: j } = V(), v = await M.mutateAsync({
234
234
  firstName: t.firstName,
235
235
  lastName: t.lastName,
236
236
  email: t.email,
237
237
  phone: t.phone,
238
238
  address: t.address,
239
239
  city: t.city,
240
- deliveryZoneId: f || t.deliveryZoneId,
240
+ deliveryZoneId: p || t.deliveryZoneId,
241
241
  paymentMethod: t.paymentMethod,
242
242
  fbc: n,
243
243
  fbp: i,
244
244
  ttp: m,
245
- ttclid: S
245
+ ttclid: j
246
246
  });
247
247
  if ("error" in v) {
248
248
  const P = v.error;
249
249
  o == null || o(new Error((P == null ? void 0 : P.message) || "Checkout failed"));
250
250
  return;
251
251
  }
252
- W(v), X(), g == null || g(v);
252
+ R(v), E(), g == null || g(v);
253
253
  } catch (n) {
254
254
  o == null || o(n);
255
255
  }
256
256
  }
257
- }, Pe = {
257
+ }, Me = {
258
258
  customer: "Customer Information",
259
259
  delivery: "Delivery Address",
260
260
  payment: "Payment Method"
261
- }, ke = K(() => Pe[c], [c]), Me = /* @__PURE__ */ a("div", { className: "space-y-3", children: [
262
- (c === "payment" || c === "delivery") && ((le = s == null ? void 0 : s.pricing) == null ? void 0 : le.total) && /* @__PURE__ */ a("div", { className: "text-sm text-black relative", children: [
263
- Q && /* @__PURE__ */ e("div", { className: "absolute flex items-center justify-center inset-0 bg-white opacity-50", children: /* @__PURE__ */ e(U, { className: "animate-spin text-accent-500" }) }),
264
- /* @__PURE__ */ a("div", { className: "flex items-center justify-between font-medium", children: [
261
+ }, Ie = G(() => Me[c], [c]), qe = /* @__PURE__ */ r("div", { className: "space-y-3", children: [
262
+ (c === "payment" || c === "delivery") && ((ie = a == null ? void 0 : a.pricing) == null ? void 0 : ie.total) && /* @__PURE__ */ r("div", { className: "text-sm text-black relative", children: [
263
+ X && /* @__PURE__ */ e("div", { className: "absolute flex items-center justify-center inset-0 bg-white opacity-50", children: /* @__PURE__ */ e($, { className: "animate-spin text-accent-500" }) }),
264
+ /* @__PURE__ */ r("div", { className: "flex items-center justify-between font-medium", children: [
265
265
  /* @__PURE__ */ e("span", { children: "Subtotal" }),
266
- /* @__PURE__ */ e("span", { children: Z(((ie = s == null ? void 0 : s.pricing) == null ? void 0 : ie.subtotal) ?? 0) })
266
+ /* @__PURE__ */ e("span", { children: _(((de = a == null ? void 0 : a.pricing) == null ? void 0 : de.subtotal) ?? 0) })
267
267
  ] }),
268
- s.pricing.discount && /* @__PURE__ */ a("div", { className: "flex items-center justify-between font-medium", children: [
268
+ a.pricing.discount && /* @__PURE__ */ r("div", { className: "flex items-center justify-between font-medium", children: [
269
269
  /* @__PURE__ */ e("span", { children: "Discount" }),
270
- /* @__PURE__ */ a("span", { className: "text-green-600", children: [
270
+ /* @__PURE__ */ r("span", { className: "text-green-600", children: [
271
271
  "-",
272
- Z(((oe = (de = s == null ? void 0 : s.pricing) == null ? void 0 : de.discount) == null ? void 0 : oe.amount) ?? 0)
272
+ _(((ce = (oe = a == null ? void 0 : a.pricing) == null ? void 0 : oe.discount) == null ? void 0 : ce.amount) ?? 0)
273
273
  ] })
274
274
  ] }),
275
- /* @__PURE__ */ a("div", { className: "flex items-center justify-between font-medium", children: [
275
+ /* @__PURE__ */ r("div", { className: "flex items-center justify-between font-medium", children: [
276
276
  /* @__PURE__ */ e("span", { children: "Delivery Fee" }),
277
- /* @__PURE__ */ e("span", { children: Z(((ce = s == null ? void 0 : s.pricing) == null ? void 0 : ce.deliveryCharge) ?? 0) })
277
+ /* @__PURE__ */ e("span", { children: p ? ((me = a == null ? void 0 : a.pricing) == null ? void 0 : me.deliveryCharge) === 0 ? /* @__PURE__ */ e("span", { className: "text-green-600", children: "Free" }) : _(((he = a == null ? void 0 : a.pricing) == null ? void 0 : he.deliveryCharge) ?? 0) : /* @__PURE__ */ e("span", { className: "text-gray-400 text-xs", children: "Select zone first" }) })
278
278
  ] }),
279
279
  /* @__PURE__ */ e("hr", { className: "border-gray-200 my-2" }),
280
- /* @__PURE__ */ a("div", { className: "flex items-center justify-between font-medium", children: [
280
+ /* @__PURE__ */ r("div", { className: "flex items-center justify-between font-medium", children: [
281
281
  /* @__PURE__ */ e("span", { children: "Total" }),
282
- /* @__PURE__ */ e("span", { children: Z(((me = s == null ? void 0 : s.pricing) == null ? void 0 : me.total) ?? 0) })
282
+ /* @__PURE__ */ e("span", { children: _(((ue = a == null ? void 0 : a.pricing) == null ? void 0 : ue.total) ?? 0) })
283
283
  ] })
284
284
  ] }),
285
- /* @__PURE__ */ a("div", { className: "flex gap-3", children: [
286
- c !== "customer" && /* @__PURE__ */ a(
287
- B,
285
+ /* @__PURE__ */ r("div", { className: "flex gap-3", children: [
286
+ c !== "customer" && /* @__PURE__ */ r(
287
+ W,
288
288
  {
289
289
  type: "button",
290
290
  variant: "outline",
291
- onClick: we,
291
+ onClick: Pe,
292
292
  className: "flex-1 border-gray-400",
293
293
  size: "lg",
294
294
  children: [
295
- /* @__PURE__ */ e(_e, { className: "mr-2 h-4 w-4" }),
295
+ /* @__PURE__ */ e(Le, { className: "mr-2 h-4 w-4" }),
296
296
  "Back"
297
297
  ]
298
298
  }
299
299
  ),
300
- c !== "payment" ? /* @__PURE__ */ a(
301
- B,
300
+ c !== "payment" ? /* @__PURE__ */ e(
301
+ W,
302
302
  {
303
303
  type: "button",
304
- onClick: xe,
304
+ onClick: Ce,
305
+ disabled: c === "delivery" && S.isPending,
305
306
  className: "flex-1 bg-accent-500 text-white hover:bg-accent-600",
306
307
  size: "lg",
307
- children: [
308
+ children: c === "delivery" && S.isPending ? /* @__PURE__ */ r(K, { children: [
309
+ /* @__PURE__ */ e($, { className: "mr-2 h-4 w-4 animate-spin" }),
310
+ "Updating..."
311
+ ] }) : /* @__PURE__ */ r(K, { children: [
308
312
  "Next",
309
- /* @__PURE__ */ e(Le, { className: "ml-2 h-4 w-4" })
310
- ]
313
+ /* @__PURE__ */ e(Fe, { className: "ml-2 h-4 w-4" })
314
+ ] })
311
315
  }
312
316
  ) : /* @__PURE__ */ e(
313
- B,
317
+ W,
314
318
  {
315
319
  type: "button",
316
- onClick: Ce,
320
+ onClick: ke,
317
321
  disabled: M.isPending,
318
322
  className: "flex-1 bg-accent-500 text-white hover:bg-accent-600",
319
323
  size: "lg",
320
- children: M.isPending ? /* @__PURE__ */ a(Ie, { children: [
321
- /* @__PURE__ */ e(U, { className: "mr-2 h-4 w-4 animate-spin" }),
324
+ children: M.isPending ? /* @__PURE__ */ r(K, { children: [
325
+ /* @__PURE__ */ e($, { className: "mr-2 h-4 w-4 animate-spin" }),
322
326
  "Processing..."
323
- ] }) : ve
327
+ ] }) : ge
324
328
  }
325
329
  )
326
330
  ] }),
327
331
  M.isError && /* @__PURE__ */ e("div", { className: "rounded-lg bg-red-50 p-3 text-sm text-red-600", children: "Failed to place order. Please check your information and try again." })
328
- ] }), A = (r) => !(s != null && s.availablePaymentMethods.includes(r));
329
- if (p)
332
+ ] }), B = (s) => !(a != null && a.availablePaymentMethods.includes(s));
333
+ if (y)
330
334
  return /* @__PURE__ */ e(
331
- ue,
335
+ ye,
332
336
  {
333
337
  isOpen: d,
334
338
  onClose: q,
335
- title: /* @__PURE__ */ a("span", { className: "flex items-center gap-3", children: [
339
+ title: /* @__PURE__ */ r("span", { className: "flex items-center gap-3", children: [
336
340
  /* @__PURE__ */ e("span", { className: "w-10 h-10 bg-green-100 rounded-full flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ e("svg", { className: "h-6 w-6 text-green-600", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) }) }),
337
- /* @__PURE__ */ a("span", { children: [
341
+ /* @__PURE__ */ r("span", { children: [
338
342
  "Thank You!",
339
343
  /* @__PURE__ */ e("br", {}),
340
344
  "We'll contact you shortly"
341
345
  ] })
342
346
  ] }),
343
347
  footer: /* @__PURE__ */ e(
344
- B,
348
+ W,
345
349
  {
346
350
  onClick: q,
347
351
  className: "w-full bg-accent-500 text-white hover:bg-accent-600",
@@ -351,82 +355,82 @@ function ct({
351
355
  ),
352
356
  size: "lg",
353
357
  contentClassName: "p-4",
354
- children: /* @__PURE__ */ a("div", { className: "space-y-4", children: [
355
- /* @__PURE__ */ a("div", { className: "bg-gray-50 rounded-lg p-4 space-y-2", children: [
356
- /* @__PURE__ */ a("div", { className: "flex items-center justify-center space-x-2 text-gray-700", children: [
357
- /* @__PURE__ */ e(ye, { className: "h-4 w-4" }),
358
- /* @__PURE__ */ a("span", { className: "text-sm font-medium", children: [
358
+ children: /* @__PURE__ */ r("div", { className: "space-y-4", children: [
359
+ /* @__PURE__ */ r("div", { className: "bg-gray-50 rounded-lg p-4 space-y-2", children: [
360
+ /* @__PURE__ */ r("div", { className: "flex items-center justify-center space-x-2 text-gray-700", children: [
361
+ /* @__PURE__ */ e(ve, { className: "h-4 w-4" }),
362
+ /* @__PURE__ */ r("span", { className: "text-sm font-medium", children: [
359
363
  "Order #",
360
- p.orderNumber
364
+ y.orderNumber
361
365
  ] })
362
366
  ] }),
363
- /* @__PURE__ */ a("div", { className: "border-t border-gray-200 pt-2 space-y-1.5", children: [
364
- /* @__PURE__ */ a("div", { className: "flex justify-between text-sm", children: [
367
+ /* @__PURE__ */ r("div", { className: "border-t border-gray-200 pt-2 space-y-1.5", children: [
368
+ /* @__PURE__ */ r("div", { className: "flex justify-between text-sm", children: [
365
369
  /* @__PURE__ */ e("span", { className: "text-gray-600", children: "Customer" }),
366
- /* @__PURE__ */ a("span", { className: "font-medium text-gray-900", children: [
367
- p.firstName,
370
+ /* @__PURE__ */ r("span", { className: "font-medium text-gray-900", children: [
371
+ y.firstName,
368
372
  " ",
369
- p.lastName
373
+ y.lastName
370
374
  ] })
371
375
  ] }),
372
- /* @__PURE__ */ a("div", { className: "flex justify-between text-sm", children: [
376
+ /* @__PURE__ */ r("div", { className: "flex justify-between text-sm", children: [
373
377
  /* @__PURE__ */ e("span", { className: "text-gray-600", children: "Phone" }),
374
- /* @__PURE__ */ e("span", { className: "font-medium text-gray-900", children: p.phone })
378
+ /* @__PURE__ */ e("span", { className: "font-medium text-gray-900", children: y.phone })
375
379
  ] }),
376
- p.email && /* @__PURE__ */ a("div", { className: "flex justify-between text-sm", children: [
380
+ y.email && /* @__PURE__ */ r("div", { className: "flex justify-between text-sm", children: [
377
381
  /* @__PURE__ */ e("span", { className: "text-gray-600", children: "Email" }),
378
- /* @__PURE__ */ e("span", { className: "font-medium text-gray-900", children: p.email })
382
+ /* @__PURE__ */ e("span", { className: "font-medium text-gray-900", children: y.email })
379
383
  ] }),
380
- /* @__PURE__ */ a("div", { className: "flex justify-between text-sm", children: [
384
+ /* @__PURE__ */ r("div", { className: "flex justify-between text-sm", children: [
381
385
  /* @__PURE__ */ e("span", { className: "text-gray-600", children: "Payment" }),
382
- /* @__PURE__ */ e("span", { className: "font-medium text-gray-900", children: p.paymentMethod === "cod" ? "Cash on Delivery" : "Online" })
386
+ /* @__PURE__ */ e("span", { className: "font-medium text-gray-900", children: y.paymentMethod === "cod" ? "Cash on Delivery" : "Online" })
383
387
  ] }),
384
- /* @__PURE__ */ a("div", { className: "flex justify-between text-sm", children: [
388
+ /* @__PURE__ */ r("div", { className: "flex justify-between text-sm", children: [
385
389
  /* @__PURE__ */ e("span", { className: "text-gray-600", children: "Total" }),
386
- /* @__PURE__ */ e("span", { className: "font-bold text-gray-900", children: Z(p.totalPrice) })
390
+ /* @__PURE__ */ e("span", { className: "font-bold text-gray-900", children: _(y.totalPrice) })
387
391
  ] })
388
392
  ] })
389
393
  ] }),
390
394
  /* @__PURE__ */ e(
391
- Be,
395
+ We,
392
396
  {
393
- orderId: p.id,
394
- token: p.userActionToken,
397
+ orderId: y.id,
398
+ token: y.userActionToken,
395
399
  limit: 4,
396
- brandSiteUrl: (he = p.brand) == null ? void 0 : he.siteUrl
400
+ brandSiteUrl: (pe = y.brand) == null ? void 0 : pe.siteUrl
397
401
  }
398
402
  )
399
403
  ] })
400
404
  }
401
405
  );
402
- const ae = y && (c === "delivery" || c === "payment") && (y.waybillOnly || !(y != null && y.allowCOD));
406
+ const re = f && (c === "delivery" || c === "payment") && (f.waybillOnly || !(f != null && f.allowCOD));
403
407
  return /* @__PURE__ */ e(
404
- ue,
408
+ ye,
405
409
  {
406
410
  isOpen: d,
407
411
  onClose: q,
408
- title: ke,
409
- footer: Me,
412
+ title: Ie,
413
+ footer: qe,
410
414
  size: "lg",
411
415
  contentClassName: "p-0",
412
- children: Q ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center min-h-[300px]", children: /* @__PURE__ */ e(U, { className: "h-8 w-8 animate-spin text-gray-600" }) }) : /* @__PURE__ */ e("div", { className: "w-full overflow-hidden", children: /* @__PURE__ */ a("div", { className: "relative w-full", children: [
413
- ae && /* @__PURE__ */ a("div", { className: "space-y-3 p-4 pb-0", children: [
414
- y.noteTitle && y.noteContent && /* @__PURE__ */ e("div", { className: "bg-amber-50 border border-amber-200 rounded-lg p-4", children: /* @__PURE__ */ a("div", { className: "flex items-start gap-3", children: [
415
- /* @__PURE__ */ e(ye, { className: "h-5 w-5 text-amber-600 flex-shrink-0 mt-0.5" }),
416
- /* @__PURE__ */ a("div", { className: "space-y-1", children: [
417
- /* @__PURE__ */ e("p", { className: "text-sm font-semibold text-amber-900 whitespace-pre-wrap", children: y.noteTitle }),
418
- /* @__PURE__ */ e("p", { className: "text-sm text-amber-800 whitespace-pre-wrap", children: y.noteContent })
416
+ children: X ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center min-h-[300px]", children: /* @__PURE__ */ e($, { className: "h-8 w-8 animate-spin text-gray-600" }) }) : /* @__PURE__ */ e("div", { className: "w-full overflow-hidden", children: /* @__PURE__ */ r("div", { className: "relative w-full", children: [
417
+ re && /* @__PURE__ */ r("div", { className: "space-y-3 p-4 pb-0", children: [
418
+ f.noteTitle && f.noteContent && /* @__PURE__ */ e("div", { className: "bg-amber-50 border border-amber-200 rounded-lg p-4", children: /* @__PURE__ */ r("div", { className: "flex items-start gap-3", children: [
419
+ /* @__PURE__ */ e(ve, { className: "h-5 w-5 text-amber-600 flex-shrink-0 mt-0.5" }),
420
+ /* @__PURE__ */ r("div", { className: "space-y-1", children: [
421
+ /* @__PURE__ */ e("p", { className: "text-sm font-semibold text-amber-900 whitespace-pre-wrap", children: f.noteTitle }),
422
+ /* @__PURE__ */ e("p", { className: "text-sm text-amber-800 whitespace-pre-wrap", children: f.noteContent })
419
423
  ] })
420
424
  ] }) }),
421
- !(y != null && y.allowCOD) && /* @__PURE__ */ e("div", { className: "bg-blue-50 border border-blue-200 rounded-lg p-4", children: /* @__PURE__ */ a("div", { className: "flex items-start gap-3", children: [
422
- /* @__PURE__ */ e(fe, { className: "h-5 w-5 text-blue-600 flex-shrink-0 mt-0.5" }),
423
- /* @__PURE__ */ a("div", { className: "space-y-1", children: [
425
+ !(f != null && f.allowCOD) && /* @__PURE__ */ e("div", { className: "bg-blue-50 border border-blue-200 rounded-lg p-4", children: /* @__PURE__ */ r("div", { className: "flex items-start gap-3", children: [
426
+ /* @__PURE__ */ e(Ne, { className: "h-5 w-5 text-blue-600 flex-shrink-0 mt-0.5" }),
427
+ /* @__PURE__ */ r("div", { className: "space-y-1", children: [
424
428
  /* @__PURE__ */ e("p", { className: "text-sm font-semibold text-blue-900", children: "Cash on Delivery Unavailable" }),
425
429
  /* @__PURE__ */ e("p", { className: "text-sm text-blue-800", children: "We're unable to offer cash on delivery to this location. Please use online payment to complete your order." })
426
430
  ] })
427
431
  ] }) })
428
432
  ] }),
429
- /* @__PURE__ */ e("div", { className: "p-4", children: /* @__PURE__ */ a(
433
+ /* @__PURE__ */ e("div", { className: "p-4", children: /* @__PURE__ */ r(
430
434
  "a",
431
435
  {
432
436
  href: He,
@@ -446,7 +450,7 @@ function ct({
446
450
  ]
447
451
  }
448
452
  ) }),
449
- /* @__PURE__ */ a(
453
+ /* @__PURE__ */ r(
450
454
  "div",
451
455
  {
452
456
  className: k(
@@ -456,7 +460,7 @@ function ct({
456
460
  c === "payment" && "-translate-x-[200%]"
457
461
  ),
458
462
  children: [
459
- /* @__PURE__ */ e("div", { className: "w-full min-w-full flex-shrink-0 p-4", children: /* @__PURE__ */ e("div", { className: "space-y-4", children: /* @__PURE__ */ a("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
463
+ /* @__PURE__ */ e("div", { className: "w-full min-w-full flex-shrink-0 p-4", children: /* @__PURE__ */ e("div", { className: "space-y-4", children: /* @__PURE__ */ r("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
460
464
  /* @__PURE__ */ e(
461
465
  I,
462
466
  {
@@ -465,7 +469,7 @@ function ct({
465
469
  name: "firstName",
466
470
  value: t.firstName,
467
471
  onChange: x,
468
- onBlur: () => F("firstName"),
472
+ onBlur: () => z("firstName"),
469
473
  error: u.firstName,
470
474
  autoCorrect: "off",
471
475
  required: !0
@@ -479,7 +483,7 @@ function ct({
479
483
  name: "lastName",
480
484
  value: t.lastName,
481
485
  onChange: x,
482
- onBlur: () => F("lastName"),
486
+ onBlur: () => z("lastName"),
483
487
  error: u.lastName,
484
488
  autoCorrect: "off",
485
489
  required: !0
@@ -493,7 +497,7 @@ function ct({
493
497
  name: "email",
494
498
  value: t.email,
495
499
  onChange: x,
496
- onBlur: () => F("email"),
500
+ onBlur: () => z("email"),
497
501
  error: u.email,
498
502
  icon: /* @__PURE__ */ e(Te, { size: 16 }),
499
503
  autoCorrect: "off",
@@ -508,18 +512,18 @@ function ct({
508
512
  name: "phone",
509
513
  value: t.phone,
510
514
  onChange: x,
511
- onBlur: () => F("phone"),
515
+ onBlur: () => z("phone"),
512
516
  placeholder: "e.g. 08012345678",
513
517
  maxLength: 18,
514
518
  error: u.phone,
515
- icon: /* @__PURE__ */ e(Fe, { size: 16 }),
519
+ icon: /* @__PURE__ */ e(ze, { size: 16 }),
516
520
  autoCorrect: "off",
517
521
  required: !0,
518
522
  className: "font-semibold"
519
523
  }
520
524
  )
521
525
  ] }) }) }),
522
- /* @__PURE__ */ e("div", { className: "w-full min-w-full flex-shrink-0 p-4", children: /* @__PURE__ */ a("div", { className: "space-y-4", children: [
526
+ /* @__PURE__ */ e("div", { className: "w-full min-w-full flex-shrink-0 p-4", children: /* @__PURE__ */ r("div", { className: "space-y-4", children: [
523
527
  /* @__PURE__ */ e(
524
528
  I,
525
529
  {
@@ -533,7 +537,7 @@ function ct({
533
537
  required: !0
534
538
  }
535
539
  ),
536
- /* @__PURE__ */ a("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
540
+ /* @__PURE__ */ r("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
537
541
  /* @__PURE__ */ e(
538
542
  I,
539
543
  {
@@ -547,64 +551,64 @@ function ct({
547
551
  required: !0
548
552
  }
549
553
  ),
550
- /* @__PURE__ */ a(
551
- pe,
554
+ /* @__PURE__ */ r(
555
+ fe,
552
556
  {
553
557
  label: "State",
554
558
  name: "state",
555
- value: L || "",
556
- onChange: (r) => {
557
- Y("");
558
- const n = r.target.value;
559
- Ne(n || void 0), u.state && T((i) => ({ ...i, state: void 0 }));
559
+ value: F || "",
560
+ onChange: (s) => {
561
+ J("");
562
+ const n = s.target.value;
563
+ be(n || void 0), u.state && T((i) => ({ ...i, state: void 0 }));
560
564
  },
561
565
  error: u.state,
562
566
  required: !0,
563
567
  children: [
564
568
  /* @__PURE__ */ e("option", { disabled: !0, value: "", children: "Select State" }),
565
- C == null ? void 0 : C.map((r) => /* @__PURE__ */ e("option", { value: r.id, children: r.name }, r.id))
569
+ C == null ? void 0 : C.map((s) => /* @__PURE__ */ e("option", { value: s.id, children: s.name }, s.id))
566
570
  ]
567
571
  }
568
572
  ),
569
- /* @__PURE__ */ a(
570
- pe,
573
+ /* @__PURE__ */ r(
574
+ fe,
571
575
  {
572
576
  label: "Delivery Zone",
573
- value: f || "",
574
- onChange: (r) => {
575
- const n = r.target.value;
576
- Y(n || void 0), u.deliveryZoneId && T((i) => ({ ...i, deliveryZoneId: void 0 })), n && $.mutate({ deliveryZoneId: n });
577
+ value: p || "",
578
+ onChange: (s) => {
579
+ const n = s.target.value;
580
+ J(n || void 0), u.deliveryZoneId && T((i) => ({ ...i, deliveryZoneId: void 0 })), n && S.mutate({ deliveryZoneId: n });
577
581
  },
578
582
  disabled: !h,
579
583
  error: u.deliveryZoneId,
580
584
  required: !0,
581
585
  children: [
582
586
  /* @__PURE__ */ e("option", { disabled: !0, value: "", children: h ? "Select Delivery Zone" : "Select State First" }),
583
- h == null ? void 0 : h.zones.map((r) => {
587
+ h == null ? void 0 : h.zones.map((s) => {
584
588
  var m;
585
- const n = ((m = s == null ? void 0 : s.pricing) == null ? void 0 : m.subtotal) ?? 0, i = r.freeShippingThreshold && n >= r.freeShippingThreshold;
586
- return /* @__PURE__ */ a("option", { value: r.id, children: [
587
- r.name,
588
- i ? "" : ` (₦${r.deliveryCost})`
589
- ] }, r.id);
589
+ const n = ((m = a == null ? void 0 : a.pricing) == null ? void 0 : m.subtotal) ?? 0, i = s.freeShippingThreshold && n >= s.freeShippingThreshold;
590
+ return /* @__PURE__ */ r("option", { value: s.id, children: [
591
+ s.name,
592
+ i ? "" : ` (₦${s.deliveryCost})`
593
+ ] }, s.id);
590
594
  })
591
595
  ]
592
596
  }
593
597
  )
594
598
  ] })
595
599
  ] }) }),
596
- /* @__PURE__ */ e("div", { className: "w-full min-w-full flex-shrink-0 p-4", children: /* @__PURE__ */ a("div", { className: "space-y-6", children: [
597
- _ && /* @__PURE__ */ a("div", { className: `border border-gray-200 rounded-lg ${ae ? "mt-4" : ""}`, children: [
598
- /* @__PURE__ */ a(
600
+ /* @__PURE__ */ e("div", { className: "w-full min-w-full flex-shrink-0 p-4", children: /* @__PURE__ */ r("div", { className: "space-y-6", children: [
601
+ L && /* @__PURE__ */ r("div", { className: `border border-gray-200 rounded-lg ${re ? "mt-4" : ""}`, children: [
602
+ /* @__PURE__ */ r(
599
603
  "button",
600
604
  {
601
605
  type: "button",
602
- onClick: () => be(!H),
606
+ onClick: () => we(!H),
603
607
  className: "overflow-hidden w-full flex items-center overflow-hidden rounded-lg rounded-b-none justify-between p-4 text-left hover:bg-gray-50 transition-colors",
604
608
  children: [
605
- /* @__PURE__ */ e("span", { className: "text-sm font-bold text-accent-700", children: _.title || "🤔 Curious about Refunds?" }),
609
+ /* @__PURE__ */ e("span", { className: "text-sm font-bold text-accent-700", children: L.title || "🤔 Curious about Refunds?" }),
606
610
  /* @__PURE__ */ e(
607
- ze,
611
+ Ae,
608
612
  {
609
613
  size: 16,
610
614
  className: k(
@@ -623,24 +627,24 @@ function ct({
623
627
  "overflow-hidden transition-all duration-300 ease-in-out",
624
628
  H ? "max-h-96 opacity-100" : "max-h-0 opacity-0"
625
629
  ),
626
- children: /* @__PURE__ */ e("div", { className: "px-4 pb-4 border-t border-gray-100", children: /* @__PURE__ */ e("div", { className: "text-sm text-gray-600 space-y-3 pt-4", children: _.policies && /* @__PURE__ */ a("div", { children: [
630
+ children: /* @__PURE__ */ e("div", { className: "px-4 pb-4 border-t border-gray-100", children: /* @__PURE__ */ e("div", { className: "text-sm text-gray-600 space-y-3 pt-4", children: L.policies && /* @__PURE__ */ r("div", { children: [
627
631
  /* @__PURE__ */ e("h4", { className: "font-bold text-gray-800 mb-2", children: "Our Refund Policy" }),
628
- /* @__PURE__ */ e("ul", { className: "space-y-1", children: _.policies.map((r, n) => /* @__PURE__ */ a("li", { className: "flex items-start", children: [
632
+ /* @__PURE__ */ e("ul", { className: "space-y-1", children: L.policies.map((s, n) => /* @__PURE__ */ r("li", { className: "flex items-start", children: [
629
633
  /* @__PURE__ */ e("span", { className: "text-green-600 mr-2", children: "✓" }),
630
- /* @__PURE__ */ e("span", { children: r })
634
+ /* @__PURE__ */ e("span", { children: s })
631
635
  ] }, n)) })
632
636
  ] }) }) })
633
637
  }
634
638
  )
635
639
  ] }),
636
- /* @__PURE__ */ a("div", { className: "grid grid-cols-2 gap-4", children: [
637
- /* @__PURE__ */ e("div", { className: "relative", children: /* @__PURE__ */ a(
640
+ /* @__PURE__ */ r("div", { className: "grid grid-cols-2 gap-4", children: [
641
+ /* @__PURE__ */ e("div", { className: "relative", children: /* @__PURE__ */ r(
638
642
  "label",
639
643
  {
640
644
  className: k(
641
645
  "flex items-center justify-center relative p-4 border-2 rounded-xl cursor-pointer transition-all duration-200",
642
646
  t.paymentMethod === "online" ? "border-accent-500 bg-accent-50" : "border-gray-200 hover:border-gray-300",
643
- A("online") && "opacity-50 cursor-not-allowed"
647
+ B("online") && "opacity-50 cursor-not-allowed"
644
648
  ),
645
649
  children: [
646
650
  /* @__PURE__ */ e(
@@ -649,13 +653,13 @@ function ct({
649
653
  type: "radio",
650
654
  name: "paymentMethod",
651
655
  value: "online",
652
- disabled: A("online"),
656
+ disabled: B("online"),
653
657
  checked: t.paymentMethod === "online",
654
658
  onChange: x,
655
659
  className: "sr-only"
656
660
  }
657
661
  ),
658
- /* @__PURE__ */ a("div", { className: "flex flex-col items-center text-center space-y-3", children: [
662
+ /* @__PURE__ */ r("div", { className: "flex flex-col items-center text-center space-y-3", children: [
659
663
  /* @__PURE__ */ e(
660
664
  "div",
661
665
  {
@@ -663,16 +667,16 @@ function ct({
663
667
  "p-3 rounded-full",
664
668
  t.paymentMethod === "online" ? "bg-accent-100 text-accent-600" : "bg-gray-100 text-gray-600"
665
669
  ),
666
- children: /* @__PURE__ */ e(Ae, { size: 24 })
670
+ children: /* @__PURE__ */ e(Be, { size: 24 })
667
671
  }
668
672
  ),
669
- /* @__PURE__ */ a("div", { children: [
673
+ /* @__PURE__ */ r("div", { children: [
670
674
  /* @__PURE__ */ e("div", { className: "font-semibold text-gray-900", children: "Pay Online" }),
671
675
  /* @__PURE__ */ e("div", { className: "text-sm text-gray-500 mt-1", children: "Bank transfer" }),
672
676
  /* @__PURE__ */ e(
673
677
  "img",
674
678
  {
675
- src: We,
679
+ src: $e,
676
680
  alt: "Paystack",
677
681
  className: "h-4 w-auto mt-2 mx-auto"
678
682
  }
@@ -683,13 +687,13 @@ function ct({
683
687
  ]
684
688
  }
685
689
  ) }),
686
- /* @__PURE__ */ a(
690
+ /* @__PURE__ */ r(
687
691
  "label",
688
692
  {
689
693
  className: k(
690
694
  "flex items-center justify-center relative p-4 border-2 rounded-xl cursor-pointer transition-all duration-200",
691
695
  t.paymentMethod === "cod" ? "border-accent-500 bg-accent-50" : "border-gray-200 hover:border-gray-300",
692
- A("cod") && "opacity-50 cursor-not-allowed"
696
+ B("cod") && "opacity-50 cursor-not-allowed"
693
697
  ),
694
698
  children: [
695
699
  /* @__PURE__ */ e(
@@ -698,13 +702,13 @@ function ct({
698
702
  type: "radio",
699
703
  name: "paymentMethod",
700
704
  value: "cod",
701
- disabled: A("cod"),
705
+ disabled: B("cod"),
702
706
  checked: t.paymentMethod === "cod",
703
707
  onChange: x,
704
708
  className: "sr-only"
705
709
  }
706
710
  ),
707
- /* @__PURE__ */ a("div", { className: "flex flex-col items-center text-center space-y-3", children: [
711
+ /* @__PURE__ */ r("div", { className: "flex flex-col items-center text-center space-y-3", children: [
708
712
  /* @__PURE__ */ e(
709
713
  "div",
710
714
  {
@@ -712,10 +716,10 @@ function ct({
712
716
  "p-3 rounded-full",
713
717
  t.paymentMethod === "cod" ? "bg-accent-100 text-accent-600" : "bg-gray-100 text-gray-600"
714
718
  ),
715
- children: /* @__PURE__ */ e(fe, { size: 24 })
719
+ children: /* @__PURE__ */ e(Ne, { size: 24 })
716
720
  }
717
721
  ),
718
- /* @__PURE__ */ a("div", { children: [
722
+ /* @__PURE__ */ r("div", { children: [
719
723
  /* @__PURE__ */ e("div", { className: "font-semibold text-gray-900", children: "Pay on Delivery" }),
720
724
  /* @__PURE__ */ e("div", { className: "text-sm text-gray-500 mt-1", children: "Pay when item arrives" })
721
725
  ] })
@@ -735,5 +739,5 @@ function ct({
735
739
  );
736
740
  }
737
741
  export {
738
- ct as Checkout
742
+ mt as Checkout
739
743
  };