@burdenoff/microfe-kadaikodi 2026.1126.2 → 2026.1127.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +12 -0
  2. package/dist/kadaikodi/components/CourierLocationSharingCard.d.ts +10 -0
  3. package/dist/kadaikodi/components/CourierLocationSharingCard.js +52 -0
  4. package/dist/kadaikodi/components/CourierLocationSharingCard.js.map +1 -0
  5. package/dist/kadaikodi/components/DropoffPinField.d.ts +16 -0
  6. package/dist/kadaikodi/components/DropoffPinField.js +67 -0
  7. package/dist/kadaikodi/components/DropoffPinField.js.map +1 -0
  8. package/dist/kadaikodi/components/LiveTrackingMap.d.ts +27 -0
  9. package/dist/kadaikodi/components/LiveTrackingMap.js +74 -0
  10. package/dist/kadaikodi/components/LiveTrackingMap.js.map +1 -0
  11. package/dist/kadaikodi/hooks/useCourierLocationSharing.d.ts +24 -0
  12. package/dist/kadaikodi/hooks/useCourierLocationSharing.js +54 -0
  13. package/dist/kadaikodi/hooks/useCourierLocationSharing.js.map +1 -0
  14. package/dist/kadaikodi/hooks/useTrackingApi.d.ts +63 -0
  15. package/dist/kadaikodi/hooks/useTrackingApi.js +37 -0
  16. package/dist/kadaikodi/hooks/useTrackingApi.js.map +1 -0
  17. package/dist/kadaikodi/pages/customer/CheckoutPage.js +222 -213
  18. package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
  19. package/dist/kadaikodi/pages/customer/OrderTrackingPage.d.ts +4 -0
  20. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js +274 -249
  21. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
  22. package/dist/kadaikodi/pages/customer/shared.d.ts +0 -13
  23. package/dist/kadaikodi/pages/customer/shared.js +16 -119
  24. package/dist/kadaikodi/pages/customer/shared.js.map +1 -1
  25. package/dist/kadaikodi/pages/worker/TaskDetailsPage.d.ts +3 -2
  26. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +67 -65
  27. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
  28. package/dist/kadaikodi/utils/deviceGeolocation.d.ts +46 -0
  29. package/dist/kadaikodi/utils/deviceGeolocation.js +71 -0
  30. package/dist/kadaikodi/utils/deviceGeolocation.js.map +1 -0
  31. package/dist/kadaikodi/utils/leaflet.d.ts +8 -0
  32. package/dist/kadaikodi/utils/leaflet.js +11 -0
  33. package/dist/kadaikodi/utils/leaflet.js.map +1 -0
  34. package/dist/node_modules/leaflet/dist/leaflet-src.js +4535 -0
  35. package/dist/node_modules/leaflet/dist/leaflet-src.js.map +1 -0
  36. package/package.json +4 -1
@@ -2,36 +2,37 @@ import { PageLayout as e } from "../../components/PageLayout.js";
2
2
  import { StatusBadge as t } from "../../components/StatusBadge.js";
3
3
  import { EmptyState as n } from "../../components/EmptyState.js";
4
4
  import "../../components/viz/index.js";
5
- import { useKadaikodi as r } from "../../context/KadaikodiContext.js";
6
- import { useCreateReview as ee, useOrder as i } from "../../hooks/useKadaikodiApi.js";
7
- import { cn as a } from "../../utils/cn.js";
8
- import { useKadaikodiStore as o } from "../../store/kadaikodiStore.js";
9
- import { formatCurrency as s, formatDate as c } from "../../utils/formatters.js";
10
- import { Timeline as l } from "../../components/viz/Timeline.js";
5
+ import { LiveTrackingMap as r } from "../../components/LiveTrackingMap.js";
6
+ import { useKadaikodi as i } from "../../context/KadaikodiContext.js";
7
+ import { useCreateReview as ee, useOrder as te } from "../../hooks/useKadaikodiApi.js";
8
+ import { useKadaikodiStore as a } from "../../store/kadaikodiStore.js";
9
+ import { useOrderTracking as ne } from "../../hooks/useTrackingApi.js";
10
+ import { Timeline as re } from "../../components/viz/Timeline.js";
11
+ import { cn as o } from "../../utils/cn.js";
12
+ import { formatCurrency as s, formatDate as c, formatDistance as ie, formatRelativeTime as l } from "../../utils/formatters.js";
11
13
  import { notifyOrderStatusChange as u } from "../../utils/orderStatusNotifier.js";
12
14
  import "../../store/index.js";
13
- import { StylizedRouteMap as te } from "./shared.js";
14
- import { useEffect as d, useRef as f, useState as p } from "react";
15
- import { ArrowLeft as m, CheckCircle2 as h, Clock as g, Loader2 as _, MapPin as ne, MessageCircle as v, Phone as y, ShoppingBag as re, Star as b, WifiOff as ie, X as x, XCircle as S } from "lucide-react";
16
- import { useParams as C } from "react-router";
17
- import { jsx as w, jsxs as T } from "react/jsx-runtime";
18
- import { GlassCard as E, PagePurpose as D } from "@burdenoff/fe-libs/ui";
15
+ import { useEffect as d, useRef as ae, useState as f } from "react";
16
+ import { ArrowLeft as oe, CheckCircle2 as p, Clock as m, Loader2 as se, MapPin as h, MessageCircle as g, Navigation as ce, Phone as _, ShoppingBag as v, Star as y, WifiOff as le, X as ue, XCircle as de } from "lucide-react";
17
+ import { useParams as b } from "react-router";
18
+ import { jsx as x, jsxs as S } from "react/jsx-runtime";
19
+ import { GlassCard as fe, PagePurpose as pe } from "@burdenoff/fe-libs/ui";
19
20
  // src/kadaikodi/pages/customer/OrderTrackingPage.tsx
20
- var O = [
21
+ var C = [
21
22
  "pending",
22
23
  "confirmed",
23
24
  "preparing",
24
25
  "ready",
25
26
  "out_for_delivery",
26
27
  "delivered"
27
- ], k = {
28
+ ], w = {
28
29
  pending: "Order Placed",
29
30
  confirmed: "Confirmed",
30
31
  preparing: "Preparing",
31
32
  ready: "Ready",
32
33
  out_for_delivery: "Out for Delivery",
33
34
  delivered: "Delivered"
34
- }, A = {
35
+ }, T = {
35
36
  pending: "Your order has been received",
36
37
  confirmed: "Cart has accepted your order",
37
38
  preparing: "Your food is being prepared",
@@ -39,235 +40,263 @@ var O = [
39
40
  out_for_delivery: "Your order is on the way",
40
41
  delivered: "Order has been delivered"
41
42
  };
42
- function j() {
43
- let { orderId: j } = C(), { navigateTo: M, currentUser: N } = r(), { data: P, isLoading: F, isError: I } = i(j, { pollWhileActive: !0 }), L = ee(), [R, z] = p(!1), [B, V] = p(5), [H, U] = p(""), [W, G] = p(null), K = (e) => {
44
- G(e), setTimeout(() => G(null), 3e3);
45
- }, q = o((e) => j ? e.lastKnownOrderStatus[j] : void 0), J = o((e) => e.setLastKnownOrderStatus), Y = f(/* @__PURE__ */ new Set());
43
+ function me(e, t) {
44
+ return e ? {
45
+ name: e.name,
46
+ phone: e.phone ?? void 0
47
+ } : t ? {
48
+ name: t.name,
49
+ phone: t.phone || void 0,
50
+ rating: t.rating
51
+ } : null;
52
+ }
53
+ function he(e, t, n) {
54
+ return t ? e.actualDeliveryTime ? `Delivered at ${c(e.actualDeliveryTime)}` : "Delivered" : n ? `Estimated arrival by ${c(n)}` : e.estimatedDeliveryTime ? `Estimated delivery by ${c(e.estimatedDeliveryTime)}` : "Estimated delivery time: TBD";
55
+ }
56
+ function ge(e, t, n) {
57
+ if (e) {
58
+ let t = l(e.recordedAt);
59
+ return e.stale ? `Courier location last updated ${t}` : `Live courier location · updated ${t}`;
60
+ }
61
+ return t ? "Waiting for the delivery partner's location…" : n ? "" : "Live courier location is shared while your order is out for delivery.";
62
+ }
63
+ function E() {
64
+ let { orderId: l } = b(), { navigateTo: E, currentUser: D } = i(), { data: O, isLoading: k, isError: A } = te(l, { pollWhileActive: !0 }), { data: j } = ne(l), M = ee(), [N, P] = f(!1), [F, I] = f(5), [L, R] = f(""), [z, B] = f(null), V = (e) => {
65
+ B(e), setTimeout(() => B(null), 3e3);
66
+ }, H = a((e) => l ? e.lastKnownOrderStatus[l] : void 0), _e = a((e) => e.setLastKnownOrderStatus), U = ae(/* @__PURE__ */ new Set());
46
67
  d(() => {
47
- if (!P || !j) return;
48
- let e = q?.status, t = e !== void 0 && e !== P.status, n = `${j}:${P.status}`;
49
- if (t && !Y.current.has(n)) {
50
- Y.current.add(n);
51
- let e = k[P.status] ?? P.status;
52
- K(`Order status updated: ${e}`), u({
53
- orderId: j,
54
- title: `${P.cartName} — ${e}`,
55
- body: A[P.status] ?? `Your order is now ${e.toLowerCase()}.`
68
+ if (!O || !l) return;
69
+ let e = H?.status, t = e !== void 0 && e !== O.status, n = `${l}:${O.status}`;
70
+ if (t && !U.current.has(n)) {
71
+ U.current.add(n);
72
+ let e = w[O.status] ?? O.status;
73
+ V(`Order status updated: ${e}`), u({
74
+ orderId: l,
75
+ title: `${O.cartName} — ${e}`,
76
+ body: T[O.status] ?? `Your order is now ${e.toLowerCase()}.`
56
77
  });
57
78
  }
58
- J(j, {
59
- status: P.status,
60
- orderNumber: P.id,
61
- cartName: P.cartName,
62
- total: P.total,
79
+ _e(l, {
80
+ status: O.status,
81
+ orderNumber: O.id,
82
+ cartName: O.cartName,
83
+ total: O.total,
63
84
  cachedAt: (/* @__PURE__ */ new Date()).toISOString()
64
85
  });
65
86
  }, [
66
- P?.status,
67
- P?.id,
68
- j
87
+ O?.status,
88
+ O?.id,
89
+ l
69
90
  ]);
70
- let ae = () => {
71
- !P || !N?.id ? K("Please sign in to rate this order.") : L.mutate({
72
- providerId: P.cartId,
73
- orderId: P.id,
74
- customerId: N.id,
75
- rating: B,
76
- review: H.trim() || void 0
91
+ let ve = () => {
92
+ !O || !D?.id ? V("Please sign in to rate this order.") : M.mutate({
93
+ providerId: O.cartId,
94
+ orderId: O.id,
95
+ customerId: D.id,
96
+ rating: F,
97
+ review: L.trim() || void 0
77
98
  }, {
78
99
  onSuccess: () => {
79
- z(!1), U(""), K("Thanks! Your rating has been submitted.");
100
+ P(!1), R(""), V("Thanks! Your rating has been submitted.");
80
101
  },
81
- onError: () => K("Could not submit your rating. Please try again.")
102
+ onError: () => V("Could not submit your rating. Please try again.")
82
103
  });
83
104
  };
84
- if (F) return /* @__PURE__ */ w(e, {
105
+ if (k) return /* @__PURE__ */ x(e, {
85
106
  title: "Track Order",
86
- children: /* @__PURE__ */ T("div", {
107
+ children: /* @__PURE__ */ S("div", {
87
108
  className: "flex flex-col items-center justify-center py-16 text-center",
88
- children: [/* @__PURE__ */ w("div", { className: "animate-spin rounded-full h-12 w-12 border-b-2 border-foreground mx-auto mb-4" }), /* @__PURE__ */ w("p", {
109
+ children: [/* @__PURE__ */ x("div", { className: "animate-spin rounded-full h-12 w-12 border-b-2 border-foreground mx-auto mb-4" }), /* @__PURE__ */ x("p", {
89
110
  className: "text-sm text-text-secondary",
90
111
  children: "Loading order details..."
91
112
  })]
92
113
  })
93
114
  });
94
- if (!P) return I && q ? /* @__PURE__ */ T(e, {
115
+ if (!O) return A && H ? /* @__PURE__ */ S(e, {
95
116
  title: "Track Order",
96
- children: [/* @__PURE__ */ T("div", {
117
+ children: [/* @__PURE__ */ S("div", {
97
118
  className: "mb-4 flex items-start gap-3 rounded-lg border border-status-warning-text/30 bg-status-warning-bg-subtle p-4",
98
- children: [/* @__PURE__ */ w(ie, { className: "h-5 w-5 text-status-warning-text mt-0.5 shrink-0" }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
119
+ children: [/* @__PURE__ */ x(le, { className: "h-5 w-5 text-status-warning-text mt-0.5 shrink-0" }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
99
120
  className: "text-sm font-medium text-status-warning-text",
100
121
  children: "You're offline — showing the last known status"
101
- }), /* @__PURE__ */ T("p", {
122
+ }), /* @__PURE__ */ S("p", {
102
123
  className: "text-xs text-status-warning-text/80 mt-0.5",
103
124
  children: [
104
125
  "Cached ",
105
- c(q.cachedAt),
126
+ c(H.cachedAt),
106
127
  ". Reconnect to see live updates."
107
128
  ]
108
129
  })] })]
109
- }), /* @__PURE__ */ T("div", {
130
+ }), /* @__PURE__ */ S("div", {
110
131
  className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
111
- children: [/* @__PURE__ */ T("div", {
132
+ children: [/* @__PURE__ */ S("div", {
112
133
  className: "flex items-center justify-between gap-3",
113
- children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("h2", {
134
+ children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("h2", {
114
135
  className: "text-lg font-semibold text-text-primary",
115
- children: ["Order #", q.orderNumber]
116
- }), /* @__PURE__ */ w("p", {
136
+ children: ["Order #", H.orderNumber]
137
+ }), /* @__PURE__ */ x("p", {
117
138
  className: "text-sm text-text-secondary",
118
- children: q.cartName
119
- })] }), /* @__PURE__ */ w(t, { status: q.status })]
120
- }), /* @__PURE__ */ T("p", {
139
+ children: H.cartName
140
+ })] }), /* @__PURE__ */ x(t, { status: H.status })]
141
+ }), /* @__PURE__ */ S("p", {
121
142
  className: "mt-3 text-sm text-text-primary",
122
- children: ["Last known total: ", s(q.total, { minimumFractionDigits: 0 })]
143
+ children: ["Last known total: ", s(H.total, { minimumFractionDigits: 0 })]
123
144
  })]
124
145
  })]
125
- }) : /* @__PURE__ */ w(e, {
146
+ }) : /* @__PURE__ */ x(e, {
126
147
  title: "Order Not Found",
127
- children: /* @__PURE__ */ w(n, {
128
- icon: /* @__PURE__ */ w(re, { className: "h-12 w-12" }),
148
+ children: /* @__PURE__ */ x(n, {
149
+ icon: /* @__PURE__ */ x(v, { className: "h-12 w-12" }),
129
150
  title: "Order not found",
130
151
  description: "The order you're looking for doesn't exist.",
131
- action: /* @__PURE__ */ w("button", {
152
+ action: /* @__PURE__ */ x("button", {
132
153
  type: "button",
133
- onClick: () => M("/customer/orders"),
154
+ onClick: () => E("/customer/orders"),
134
155
  className: "rounded-lg bg-foreground px-4 py-2 text-sm font-medium text-background hover:opacity-90 transition-opacity",
135
156
  children: "View All Orders"
136
157
  })
137
158
  })
138
159
  });
139
- let X = O.indexOf(P.status), Z = P.status === "cancelled", Q = P.status === "delivered", $ = P.estimatedDeliveryTime ? Math.max(0, Math.round((new Date(P.estimatedDeliveryTime).getTime() - Date.now()) / 6e4)) : null, oe = X < 0 ? 0 : X / (O.length - 1), se = O.map((e, t) => {
140
- let n = t < X ? "success" : t === X ? "accent" : "muted", r = t === X;
160
+ let W = C.indexOf(O.status), G = O.status === "cancelled", K = O.status === "delivered", q = j?.active ? j : null, J = q?.etaMinutes ?? (O.estimatedDeliveryTime ? Math.max(0, Math.round((new Date(O.estimatedDeliveryTime).getTime() - Date.now()) / 6e4)) : null), Y = q?.location ?? null, X = j?.origin ?? null, Z = q?.destination ?? null, ye = !!(X || Z || Y), Q = me(j?.courier ?? null, O.assignedWorker), $ = Q?.phone?.replace(/\s/g, ""), be = C.map((e, t) => {
161
+ let n = t < W ? "success" : t === W ? "accent" : "muted", r = t === W;
141
162
  return {
142
163
  id: e,
143
- title: k[e],
164
+ title: w[e],
144
165
  tone: n,
145
- meta: /* @__PURE__ */ w("span", {
146
- className: a(r ? "text-text-primary" : void 0),
147
- children: A[e]
166
+ meta: /* @__PURE__ */ x("span", {
167
+ className: o(r ? "text-text-primary" : void 0),
168
+ children: T[e]
148
169
  })
149
170
  };
150
171
  });
151
- return /* @__PURE__ */ T(e, {
152
- title: /* @__PURE__ */ T("div", {
172
+ return /* @__PURE__ */ S(e, {
173
+ title: /* @__PURE__ */ S("div", {
153
174
  className: "flex items-center gap-3",
154
- children: [/* @__PURE__ */ w("button", {
175
+ children: [/* @__PURE__ */ x("button", {
155
176
  type: "button",
156
- onClick: () => M("/customer/orders"),
177
+ onClick: () => E("/customer/orders"),
157
178
  className: "rounded-md p-1 text-text-secondary hover:bg-accent hover:text-text-primary transition-colors",
158
- children: /* @__PURE__ */ w(m, { className: "h-5 w-5" })
159
- }), /* @__PURE__ */ w("span", { children: "Track Order" })]
179
+ children: /* @__PURE__ */ x(oe, { className: "h-5 w-5" })
180
+ }), /* @__PURE__ */ x("span", { children: "Track Order" })]
160
181
  }),
161
- actions: /* @__PURE__ */ w(t, { status: P.status }),
182
+ actions: /* @__PURE__ */ x(t, { status: O.status }),
162
183
  children: [
163
- /* @__PURE__ */ w(D, {
184
+ /* @__PURE__ */ x(pe, {
164
185
  className: "mb-6",
165
186
  children: "Follow your order in real time — see exactly where it is from kitchen to doorstep, who's delivering it, and reach out for help if anything looks off. The live status updates as your order moves through each stage."
166
187
  }),
167
- /* @__PURE__ */ T("div", {
188
+ /* @__PURE__ */ S("div", {
168
189
  className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
169
- children: [/* @__PURE__ */ T("div", {
190
+ children: [/* @__PURE__ */ S("div", {
170
191
  className: "lg:col-span-2 space-y-6",
171
192
  children: [
172
- /* @__PURE__ */ T(E, {
193
+ /* @__PURE__ */ S(fe, {
173
194
  treatment: "glass",
174
195
  glow: !0,
175
196
  className: "p-5",
176
- children: [/* @__PURE__ */ T("div", {
197
+ children: [/* @__PURE__ */ S("div", {
177
198
  className: "flex flex-col sm:flex-row sm:justify-between sm:items-start gap-3",
178
- children: [/* @__PURE__ */ T("div", {
199
+ children: [/* @__PURE__ */ S("div", {
179
200
  className: "flex-1",
180
201
  children: [
181
- /* @__PURE__ */ T("h2", {
202
+ /* @__PURE__ */ S("h2", {
182
203
  className: "text-lg font-semibold text-text-primary",
183
- children: ["Order #", P.id]
204
+ children: ["Order #", O.id]
184
205
  }),
185
- /* @__PURE__ */ w("p", {
206
+ /* @__PURE__ */ x("p", {
186
207
  className: "text-sm text-text-secondary",
187
- children: P.cartName
208
+ children: O.cartName
188
209
  }),
189
- /* @__PURE__ */ w("p", {
210
+ /* @__PURE__ */ x("p", {
190
211
  className: "text-xs text-text-secondary mt-0.5",
191
- children: c(P.orderDate)
212
+ children: c(O.orderDate)
192
213
  })
193
214
  ]
194
- }), /* @__PURE__ */ T("div", {
215
+ }), /* @__PURE__ */ S("div", {
195
216
  className: "text-left sm:text-right",
196
- children: [/* @__PURE__ */ w("p", {
217
+ children: [/* @__PURE__ */ x("p", {
197
218
  className: "text-xl font-bold text-text-primary",
198
- children: s(P.total, { minimumFractionDigits: 0 })
199
- }), /* @__PURE__ */ w("p", {
219
+ children: s(O.total, { minimumFractionDigits: 0 })
220
+ }), /* @__PURE__ */ x("p", {
200
221
  className: "text-xs text-text-secondary uppercase",
201
- children: P.paymentMethod
222
+ children: O.paymentMethod
202
223
  })]
203
224
  })]
204
- }), Z ? /* @__PURE__ */ T("div", {
225
+ }), G ? /* @__PURE__ */ S("div", {
205
226
  className: "mt-4 flex items-start gap-3 rounded-lg bg-status-error-bg/10 p-4 border border-status-error-border/20",
206
- children: [/* @__PURE__ */ w(S, { className: "h-5 w-5 text-status-error-text mt-0.5 shrink-0" }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
227
+ children: [/* @__PURE__ */ x(de, { className: "h-5 w-5 text-status-error-text mt-0.5 shrink-0" }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
207
228
  className: "font-medium text-status-error-text",
208
229
  children: "Order Cancelled"
209
- }), P.cancellationReason && /* @__PURE__ */ w("p", {
230
+ }), O.cancellationReason && /* @__PURE__ */ x("p", {
210
231
  className: "text-sm text-status-error-text/80 mt-0.5",
211
- children: P.cancellationReason
232
+ children: O.cancellationReason
212
233
  })] })]
213
- }) : /* @__PURE__ */ T("div", {
214
- className: a("mt-4 flex items-start gap-3 rounded-lg p-4 border", Q ? "bg-status-success-bg-subtle border-status-success-text/20" : "bg-[var(--color-accent-soft)] border-border-focus/20"),
215
- children: [Q ? /* @__PURE__ */ w(h, { className: "h-5 w-5 text-status-success-text mt-0.5 shrink-0" }) : /* @__PURE__ */ w(g, { className: "h-5 w-5 text-text-primary mt-0.5 shrink-0" }), /* @__PURE__ */ w("p", {
216
- className: a("text-sm font-medium", Q ? "text-status-success-text" : "text-text-primary"),
217
- children: Q ? `Delivered at ${c(P.actualDeliveryTime)}` : P.estimatedDeliveryTime ? `Estimated delivery by ${c(P.estimatedDeliveryTime)}` : "Estimated delivery time: TBD"
234
+ }) : /* @__PURE__ */ S("div", {
235
+ className: o("mt-4 flex items-start gap-3 rounded-lg p-4 border", K ? "bg-status-success-bg-subtle border-status-success-text/20" : "bg-[var(--color-accent-soft)] border-border-focus/20"),
236
+ children: [K ? /* @__PURE__ */ x(p, { className: "h-5 w-5 text-status-success-text mt-0.5 shrink-0" }) : /* @__PURE__ */ x(m, { className: "h-5 w-5 text-text-primary mt-0.5 shrink-0" }), /* @__PURE__ */ x("p", {
237
+ className: o("text-sm font-medium", K ? "text-status-success-text" : "text-text-primary"),
238
+ children: he(O, K, q?.etaAt ?? null)
218
239
  })]
219
240
  })]
220
241
  }),
221
- !Z && /* @__PURE__ */ T("div", {
242
+ !G && /* @__PURE__ */ S("div", {
222
243
  className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
223
244
  children: [
224
- /* @__PURE__ */ T("div", {
245
+ /* @__PURE__ */ S("div", {
225
246
  className: "mb-4 flex flex-wrap items-center justify-between gap-2",
226
- children: [/* @__PURE__ */ w("h3", {
247
+ children: [/* @__PURE__ */ x("h3", {
227
248
  className: "text-base font-semibold text-text-primary",
228
249
  children: "Order Status"
229
- }), !Q && $ != null && /* @__PURE__ */ T("span", {
250
+ }), !K && J != null && /* @__PURE__ */ S("span", {
230
251
  className: "inline-flex items-center gap-1.5 rounded-full bg-[var(--color-accent-soft)] px-3 py-1 text-sm font-semibold text-accent-primary",
231
- children: [
232
- /* @__PURE__ */ w(g, { className: "h-3.5 w-3.5" }),
233
- "Arriving in ~",
234
- $,
235
- " min"
236
- ]
252
+ children: [/* @__PURE__ */ x(m, { className: "h-3.5 w-3.5" }), J === 0 ? "Arriving now" : `Arriving in ~${J} min`]
237
253
  })]
238
254
  }),
239
- /* @__PURE__ */ w(te, {
240
- progress: oe,
241
- originLabel: P.cartName,
242
- destinationLabel: "You",
243
- className: "mb-6 h-44"
255
+ ye ? /* @__PURE__ */ x(r, {
256
+ origin: X,
257
+ destination: Z,
258
+ courier: Y,
259
+ originLabel: O.cartName,
260
+ destinationLabel: "Your drop-off point",
261
+ courierLabel: Q ? `${Q.name} (delivery partner)` : "Delivery partner",
262
+ className: "h-64"
263
+ }) : /* @__PURE__ */ x("div", {
264
+ className: "flex h-32 items-center justify-center rounded-lg border border-border-subtle bg-bg-sunken px-4 text-center text-sm text-text-secondary",
265
+ children: "The live map appears once your order is on its way."
244
266
  }),
245
- /* @__PURE__ */ w(l, { items: se })
267
+ /* @__PURE__ */ S("div", {
268
+ className: "mb-6 mt-2 flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-text-secondary",
269
+ children: [/* @__PURE__ */ S("span", {
270
+ className: o("inline-flex items-center gap-1", Y?.stale && "text-status-warning-text"),
271
+ children: [Y && /* @__PURE__ */ x(ce, { className: "h-3 w-3" }), ge(Y, !!q, K)]
272
+ }), q?.distanceMeters != null && /* @__PURE__ */ S("span", { children: [ie(q.distanceMeters / 1e3), " away"] })]
273
+ }),
274
+ /* @__PURE__ */ x(re, { items: be })
246
275
  ]
247
276
  }),
248
- /* @__PURE__ */ T("div", {
277
+ /* @__PURE__ */ S("div", {
249
278
  className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
250
279
  children: [
251
- /* @__PURE__ */ w("h3", {
280
+ /* @__PURE__ */ x("h3", {
252
281
  className: "text-base font-semibold text-text-primary mb-3",
253
282
  children: "Order Items"
254
283
  }),
255
- /* @__PURE__ */ w("div", {
284
+ /* @__PURE__ */ x("div", {
256
285
  className: "space-y-2",
257
- children: P.items.map((e, t) => /* @__PURE__ */ T("div", {
286
+ children: O.items.map((e, t) => /* @__PURE__ */ S("div", {
258
287
  className: "flex justify-between items-start pb-2 border-b border-border-subtle last:border-b-0",
259
- children: [/* @__PURE__ */ T("div", {
288
+ children: [/* @__PURE__ */ S("div", {
260
289
  className: "flex-1 pr-2",
261
290
  children: [
262
- /* @__PURE__ */ w("p", {
291
+ /* @__PURE__ */ x("p", {
263
292
  className: "text-sm font-medium text-text-primary",
264
293
  children: e.name
265
294
  }),
266
- e.customizations && e.customizations.length > 0 && /* @__PURE__ */ w("p", {
295
+ e.customizations && e.customizations.length > 0 && /* @__PURE__ */ x("p", {
267
296
  className: "text-xs text-text-secondary",
268
297
  children: e.customizations.join(", ")
269
298
  }),
270
- /* @__PURE__ */ T("p", {
299
+ /* @__PURE__ */ S("p", {
271
300
  className: "text-xs text-text-secondary",
272
301
  children: [
273
302
  s(e.price, { minimumFractionDigits: 0 }),
@@ -276,180 +305,176 @@ function j() {
276
305
  ]
277
306
  })
278
307
  ]
279
- }), /* @__PURE__ */ w("p", {
308
+ }), /* @__PURE__ */ x("p", {
280
309
  className: "text-sm font-medium text-text-primary",
281
310
  children: s(e.price * e.quantity, { minimumFractionDigits: 0 })
282
311
  })]
283
312
  }, t))
284
313
  }),
285
- /* @__PURE__ */ T("div", {
314
+ /* @__PURE__ */ S("div", {
286
315
  className: "mt-4 pt-4 border-t border-border-subtle space-y-2 text-sm",
287
316
  children: [
288
- /* @__PURE__ */ T("div", {
317
+ /* @__PURE__ */ S("div", {
289
318
  className: "flex justify-between text-text-secondary",
290
- children: [/* @__PURE__ */ w("span", { children: "Subtotal" }), /* @__PURE__ */ w("span", { children: s(P.subtotal, { minimumFractionDigits: 0 }) })]
319
+ children: [/* @__PURE__ */ x("span", { children: "Subtotal" }), /* @__PURE__ */ x("span", { children: s(O.subtotal, { minimumFractionDigits: 0 }) })]
291
320
  }),
292
- /* @__PURE__ */ T("div", {
321
+ /* @__PURE__ */ S("div", {
293
322
  className: "flex justify-between text-text-secondary",
294
- children: [/* @__PURE__ */ w("span", { children: "Delivery Fee" }), /* @__PURE__ */ w("span", { children: P.deliveryFee === 0 ? "FREE" : s(P.deliveryFee, { minimumFractionDigits: 0 }) })]
323
+ children: [/* @__PURE__ */ x("span", { children: "Delivery Fee" }), /* @__PURE__ */ x("span", { children: O.deliveryFee === 0 ? "FREE" : s(O.deliveryFee, { minimumFractionDigits: 0 }) })]
295
324
  }),
296
- /* @__PURE__ */ T("div", {
325
+ /* @__PURE__ */ S("div", {
297
326
  className: "flex justify-between text-text-secondary",
298
- children: [/* @__PURE__ */ w("span", { children: "Tax" }), /* @__PURE__ */ w("span", { children: s(P.taxes, { minimumFractionDigits: 0 }) })]
327
+ children: [/* @__PURE__ */ x("span", { children: "Tax" }), /* @__PURE__ */ x("span", { children: s(O.taxes, { minimumFractionDigits: 0 }) })]
299
328
  }),
300
- P.discount && P.discount > 0 && /* @__PURE__ */ T("div", {
329
+ O.discount && O.discount > 0 && /* @__PURE__ */ S("div", {
301
330
  className: "flex justify-between text-status-success-text",
302
- children: [/* @__PURE__ */ w("span", { children: "Discount" }), /* @__PURE__ */ T("span", { children: ["-", s(P.discount, { minimumFractionDigits: 0 })] })]
331
+ children: [/* @__PURE__ */ x("span", { children: "Discount" }), /* @__PURE__ */ S("span", { children: ["-", s(O.discount, { minimumFractionDigits: 0 })] })]
303
332
  }),
304
- /* @__PURE__ */ T("div", {
333
+ /* @__PURE__ */ S("div", {
305
334
  className: "flex justify-between font-semibold pt-2 border-t border-border-subtle text-text-primary",
306
- children: [/* @__PURE__ */ w("span", { children: "Total" }), /* @__PURE__ */ w("span", { children: s(P.total, { minimumFractionDigits: 0 }) })]
335
+ children: [/* @__PURE__ */ x("span", { children: "Total" }), /* @__PURE__ */ x("span", { children: s(O.total, { minimumFractionDigits: 0 }) })]
307
336
  })
308
337
  ]
309
338
  })
310
339
  ]
311
340
  })
312
341
  ]
313
- }), /* @__PURE__ */ T("div", {
342
+ }), /* @__PURE__ */ S("div", {
314
343
  className: "lg:col-span-1 space-y-6",
315
344
  children: [
316
- /* @__PURE__ */ T("div", {
345
+ /* @__PURE__ */ S("div", {
317
346
  className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
318
- children: [/* @__PURE__ */ w("h3", {
347
+ children: [/* @__PURE__ */ x("h3", {
319
348
  className: "text-base font-semibold text-text-primary mb-3",
320
349
  children: "Delivery Details"
321
- }), /* @__PURE__ */ T("div", {
350
+ }), /* @__PURE__ */ S("div", {
322
351
  className: "space-y-3",
323
352
  children: [
324
- /* @__PURE__ */ T("div", {
353
+ /* @__PURE__ */ S("div", {
325
354
  className: "flex items-start gap-2",
326
- children: [/* @__PURE__ */ w(ne, { className: "mt-0.5 h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ T("div", { children: [
327
- /* @__PURE__ */ w("p", {
355
+ children: [/* @__PURE__ */ x(h, { className: "mt-0.5 h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ S("div", { children: [
356
+ /* @__PURE__ */ x("p", {
328
357
  className: "text-xs text-text-secondary",
329
358
  children: "Delivery Address"
330
359
  }),
331
- /* @__PURE__ */ w("p", {
360
+ /* @__PURE__ */ x("p", {
332
361
  className: "text-sm font-medium text-text-primary",
333
- children: P.deliveryAddress.street
362
+ children: O.deliveryAddress.street
334
363
  }),
335
- /* @__PURE__ */ w("p", {
364
+ /* @__PURE__ */ x("p", {
336
365
  className: "text-sm text-text-secondary",
337
- children: P.deliveryAddress.area
366
+ children: O.deliveryAddress.area
338
367
  }),
339
- /* @__PURE__ */ T("p", {
368
+ /* @__PURE__ */ S("p", {
340
369
  className: "text-sm text-text-secondary",
341
370
  children: [
342
- P.deliveryAddress.city,
371
+ O.deliveryAddress.city,
343
372
  ", ",
344
- P.deliveryAddress.pincode
373
+ O.deliveryAddress.pincode
345
374
  ]
346
375
  }),
347
- P.deliveryAddress.landmark && /* @__PURE__ */ T("p", {
376
+ O.deliveryAddress.landmark && /* @__PURE__ */ S("p", {
348
377
  className: "text-xs text-text-secondary mt-0.5",
349
- children: ["Landmark: ", P.deliveryAddress.landmark]
378
+ children: ["Landmark: ", O.deliveryAddress.landmark]
350
379
  })
351
380
  ] })]
352
381
  }),
353
- P.customerNotes && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
382
+ O.customerNotes && /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
354
383
  className: "text-xs text-text-secondary",
355
384
  children: "Customer Notes"
356
- }), /* @__PURE__ */ w("p", {
385
+ }), /* @__PURE__ */ x("p", {
357
386
  className: "text-sm text-text-primary",
358
- children: P.customerNotes
387
+ children: O.customerNotes
359
388
  })] }),
360
- /* @__PURE__ */ T("div", { children: [
361
- /* @__PURE__ */ w("p", {
389
+ /* @__PURE__ */ S("div", { children: [
390
+ /* @__PURE__ */ x("p", {
362
391
  className: "text-xs text-text-secondary",
363
392
  children: "Payment Method"
364
393
  }),
365
- /* @__PURE__ */ w("p", {
394
+ /* @__PURE__ */ x("p", {
366
395
  className: "text-sm font-medium text-text-primary capitalize",
367
- children: P.paymentMethod
396
+ children: O.paymentMethod
368
397
  }),
369
- /* @__PURE__ */ w("p", {
398
+ /* @__PURE__ */ x("p", {
370
399
  className: "text-xs text-text-secondary",
371
- children: P.paymentStatus === "paid" ? "Paid" : P.paymentStatus === "refunded" ? "Refunded" : P.paymentStatus === "failed" ? "Payment Failed" : P.paymentStatus === "processing" ? "Payment Processing" : "Payment Pending"
400
+ children: O.paymentStatus === "paid" ? "Paid" : O.paymentStatus === "refunded" ? "Refunded" : O.paymentStatus === "failed" ? "Payment Failed" : O.paymentStatus === "processing" ? "Payment Processing" : "Payment Pending"
372
401
  })
373
402
  ] })
374
403
  ]
375
404
  })]
376
405
  }),
377
- P.assignedWorker && /* @__PURE__ */ T("div", {
406
+ Q && /* @__PURE__ */ S("div", {
378
407
  className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
379
- children: [/* @__PURE__ */ w("h3", {
408
+ children: [/* @__PURE__ */ x("h3", {
380
409
  className: "text-base font-semibold text-text-primary mb-3",
381
410
  children: "Delivery Partner"
382
- }), /* @__PURE__ */ T("div", {
411
+ }), /* @__PURE__ */ S("div", {
383
412
  className: "space-y-3",
384
- children: [/* @__PURE__ */ T("div", {
413
+ children: [/* @__PURE__ */ S("div", {
385
414
  className: "flex items-center gap-3",
386
- children: [
387
- /* @__PURE__ */ w("div", {
388
- className: "flex h-10 w-10 items-center justify-center rounded-full bg-bg-sunken text-text-secondary",
389
- children: /* @__PURE__ */ w("span", {
390
- className: "text-sm font-semibold",
391
- children: P.assignedWorker.name.charAt(0)
392
- })
393
- }),
394
- /* @__PURE__ */ T("div", {
395
- className: "flex-1 min-w-0",
396
- children: [/* @__PURE__ */ w("p", {
397
- className: "text-sm font-medium text-text-primary",
398
- children: P.assignedWorker.name
399
- }), /* @__PURE__ */ T("div", {
400
- className: "flex items-center gap-1.5 mt-0.5",
401
- children: [/* @__PURE__ */ w(b, { className: "h-3 w-3 fill-status-warning-text text-status-warning-text" }), /* @__PURE__ */ T("span", {
402
- className: "text-xs text-text-secondary",
403
- children: [P.assignedWorker.rating, "/5"]
404
- })]
405
- })]
406
- }),
407
- /* @__PURE__ */ w("a", {
408
- href: `tel:${P.assignedWorker.phone}`,
409
- className: "flex h-9 w-9 items-center justify-center rounded-full bg-bg-sunken text-text-secondary hover:bg-accent hover:text-text-primary transition-colors",
410
- children: /* @__PURE__ */ w(y, { className: "h-4 w-4" })
415
+ children: [/* @__PURE__ */ x("div", {
416
+ className: "flex h-10 w-10 items-center justify-center rounded-full bg-bg-sunken text-text-secondary",
417
+ children: /* @__PURE__ */ x("span", {
418
+ className: "text-sm font-semibold",
419
+ children: Q.name.charAt(0)
411
420
  })
412
- ]
413
- }), /* @__PURE__ */ T("div", {
421
+ }), /* @__PURE__ */ S("div", {
422
+ className: "flex-1 min-w-0",
423
+ children: [/* @__PURE__ */ x("p", {
424
+ className: "text-sm font-medium text-text-primary",
425
+ children: Q.name
426
+ }), Q.rating == null ? $ ? /* @__PURE__ */ x("p", {
427
+ className: "text-xs text-text-secondary mt-0.5",
428
+ children: Q.phone
429
+ }) : null : /* @__PURE__ */ S("div", {
430
+ className: "flex items-center gap-1.5 mt-0.5",
431
+ children: [/* @__PURE__ */ x(y, { className: "h-3 w-3 fill-status-warning-text text-status-warning-text" }), /* @__PURE__ */ S("span", {
432
+ className: "text-xs text-text-secondary",
433
+ children: [Q.rating, "/5"]
434
+ })]
435
+ })]
436
+ })]
437
+ }), $ ? /* @__PURE__ */ S("div", {
414
438
  className: "grid grid-cols-2 gap-2",
415
- children: [/* @__PURE__ */ T("a", {
416
- href: `tel:${P.assignedWorker.phone}`,
439
+ children: [/* @__PURE__ */ S("a", {
440
+ href: `tel:${$}`,
417
441
  className: "flex items-center justify-center gap-2 rounded-lg bg-action-primary-bg px-3 py-2.5 text-sm font-semibold text-action-primary-text hover:bg-action-primary-bg-hover transition-colors",
418
- children: [/* @__PURE__ */ w(y, { className: "h-4 w-4" }), "Call"]
419
- }), /* @__PURE__ */ T("button", {
420
- type: "button",
421
- disabled: !0,
422
- title: "In-app chat is coming soon",
423
- className: "flex items-center justify-center gap-2 rounded-lg border border-border-subtle px-3 py-2.5 text-sm font-medium text-text-secondary cursor-not-allowed opacity-70",
424
- children: [/* @__PURE__ */ w(v, { className: "h-4 w-4" }), "Chat"]
442
+ children: [/* @__PURE__ */ x(_, { className: "h-4 w-4" }), "Call"]
443
+ }), /* @__PURE__ */ S("a", {
444
+ href: `sms:${$}`,
445
+ className: "flex items-center justify-center gap-2 rounded-lg border border-border-subtle px-3 py-2.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
446
+ children: [/* @__PURE__ */ x(g, { className: "h-4 w-4" }), "Message"]
425
447
  })]
448
+ }) : /* @__PURE__ */ x("p", {
449
+ className: "text-xs text-text-secondary",
450
+ children: "The cart has not shared a contact number for this delivery partner."
426
451
  })]
427
452
  })]
428
453
  }),
429
- /* @__PURE__ */ T("div", {
454
+ /* @__PURE__ */ S("div", {
430
455
  className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
431
- children: [/* @__PURE__ */ w("h3", {
456
+ children: [/* @__PURE__ */ x("h3", {
432
457
  className: "text-base font-semibold text-text-primary mb-3",
433
458
  children: "Need Help?"
434
- }), /* @__PURE__ */ T("div", {
459
+ }), /* @__PURE__ */ S("div", {
435
460
  className: "space-y-2",
436
461
  children: [
437
- /* @__PURE__ */ T("a", {
462
+ /* @__PURE__ */ S("a", {
438
463
  href: "mailto:support@kadaikodi.com",
439
464
  className: "w-full flex items-center justify-center gap-2 rounded-lg border border-border-subtle px-3 py-2.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
440
- children: [/* @__PURE__ */ w(v, { className: "h-4 w-4" }), "Email Support"]
465
+ children: [/* @__PURE__ */ x(g, { className: "h-4 w-4" }), "Email Support"]
441
466
  }),
442
- /* @__PURE__ */ T("button", {
467
+ /* @__PURE__ */ S("button", {
443
468
  type: "button",
444
469
  onClick: () => window.location.href = "tel:7012270561",
445
470
  className: "w-full flex items-center justify-center gap-2 rounded-lg border border-border-subtle px-3 py-2.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
446
- children: [/* @__PURE__ */ w(y, { className: "h-4 w-4" }), "Call Support"]
471
+ children: [/* @__PURE__ */ x(_, { className: "h-4 w-4" }), "Call Support"]
447
472
  }),
448
- Q && !P.rating && /* @__PURE__ */ T("button", {
473
+ K && !O.rating && /* @__PURE__ */ S("button", {
449
474
  type: "button",
450
- onClick: () => z(!0),
475
+ onClick: () => P(!0),
451
476
  className: "w-full flex items-center justify-center gap-2 rounded-lg bg-foreground px-3 py-2.5 text-sm font-medium text-background hover:opacity-90 transition-opacity",
452
- children: [/* @__PURE__ */ w(b, { className: "h-4 w-4" }), "Rate Order"]
477
+ children: [/* @__PURE__ */ x(y, { className: "h-4 w-4" }), "Rate Order"]
453
478
  })
454
479
  ]
455
480
  })]
@@ -457,38 +482,38 @@ function j() {
457
482
  ]
458
483
  })]
459
484
  }),
460
- W && /* @__PURE__ */ T("div", {
485
+ z && /* @__PURE__ */ S("div", {
461
486
  className: "fixed bottom-4 left-1/2 z-50 -translate-x-1/2 rounded-lg border border-status-success-text/30 bg-status-success-bg-subtle px-4 py-3 shadow-lg flex items-center gap-2",
462
- children: [/* @__PURE__ */ w(h, { className: "h-4 w-4 text-status-success-text shrink-0" }), /* @__PURE__ */ w("p", {
487
+ children: [/* @__PURE__ */ x(p, { className: "h-4 w-4 text-status-success-text shrink-0" }), /* @__PURE__ */ x("p", {
463
488
  className: "text-sm text-status-success-text",
464
- children: W
489
+ children: z
465
490
  })]
466
491
  }),
467
- R && /* @__PURE__ */ w("div", {
492
+ N && /* @__PURE__ */ x("div", {
468
493
  className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
469
- children: /* @__PURE__ */ w("div", {
494
+ children: /* @__PURE__ */ x("div", {
470
495
  className: "w-full max-w-md rounded-lg border border-border-subtle bg-bg-surface shadow-lg",
471
- children: /* @__PURE__ */ T("div", {
496
+ children: /* @__PURE__ */ S("div", {
472
497
  className: "p-5",
473
498
  children: [
474
- /* @__PURE__ */ T("div", {
499
+ /* @__PURE__ */ S("div", {
475
500
  className: "flex items-center justify-between mb-4",
476
- children: [/* @__PURE__ */ w("h3", {
501
+ children: [/* @__PURE__ */ x("h3", {
477
502
  className: "text-lg font-semibold text-text-primary",
478
503
  children: "Rate your order"
479
- }), /* @__PURE__ */ w("button", {
504
+ }), /* @__PURE__ */ x("button", {
480
505
  type: "button",
481
- onClick: () => z(!1),
506
+ onClick: () => P(!1),
482
507
  className: "rounded-md p-2 text-text-secondary hover:bg-accent hover:text-text-primary transition-colors",
483
- children: /* @__PURE__ */ w(x, { className: "h-4 w-4" })
508
+ children: /* @__PURE__ */ x(ue, { className: "h-4 w-4" })
484
509
  })]
485
510
  }),
486
- /* @__PURE__ */ T("div", {
511
+ /* @__PURE__ */ S("div", {
487
512
  className: "mb-4",
488
- children: [/* @__PURE__ */ w("label", {
513
+ children: [/* @__PURE__ */ x("label", {
489
514
  className: "block text-sm font-medium text-text-primary mb-2",
490
515
  children: "Your rating"
491
- }), /* @__PURE__ */ w("div", {
516
+ }), /* @__PURE__ */ x("div", {
492
517
  className: "flex items-center gap-1",
493
518
  children: [
494
519
  1,
@@ -496,42 +521,42 @@ function j() {
496
521
  3,
497
522
  4,
498
523
  5
499
- ].map((e) => /* @__PURE__ */ w("button", {
524
+ ].map((e) => /* @__PURE__ */ x("button", {
500
525
  type: "button",
501
- onClick: () => V(e),
526
+ onClick: () => I(e),
502
527
  className: "p-0.5",
503
528
  "aria-label": `${e} star${e > 1 ? "s" : ""}`,
504
- children: /* @__PURE__ */ w(b, { className: a("h-7 w-7", e <= B ? "fill-status-warning-text text-status-warning-text" : "fill-none text-text-secondary/40") })
529
+ children: /* @__PURE__ */ x(y, { className: o("h-7 w-7", e <= F ? "fill-status-warning-text text-status-warning-text" : "fill-none text-text-secondary/40") })
505
530
  }, e))
506
531
  })]
507
532
  }),
508
- /* @__PURE__ */ T("div", {
533
+ /* @__PURE__ */ S("div", {
509
534
  className: "mb-5",
510
- children: [/* @__PURE__ */ T("label", {
535
+ children: [/* @__PURE__ */ S("label", {
511
536
  className: "block text-sm font-medium text-text-primary mb-1.5",
512
- children: ["Review ", /* @__PURE__ */ w("span", {
537
+ children: ["Review ", /* @__PURE__ */ x("span", {
513
538
  className: "text-text-secondary font-normal",
514
539
  children: "(optional)"
515
540
  })]
516
- }), /* @__PURE__ */ w("textarea", {
541
+ }), /* @__PURE__ */ x("textarea", {
517
542
  rows: 4,
518
- value: H,
519
- onChange: (e) => U(e.target.value),
543
+ value: L,
544
+ onChange: (e) => R(e.target.value),
520
545
  placeholder: "How was your order?",
521
546
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] resize-none"
522
547
  })]
523
548
  }),
524
- /* @__PURE__ */ T("div", {
549
+ /* @__PURE__ */ S("div", {
525
550
  className: "flex items-center gap-3",
526
- children: [/* @__PURE__ */ T("button", {
551
+ children: [/* @__PURE__ */ S("button", {
527
552
  type: "button",
528
- onClick: ae,
529
- disabled: L.isPending,
530
- className: a("flex-1 inline-flex items-center justify-center gap-2 rounded-lg bg-foreground px-4 py-2.5 text-sm font-medium text-background transition-opacity", L.isPending ? "opacity-60 cursor-not-allowed" : "hover:opacity-90"),
531
- children: [L.isPending && /* @__PURE__ */ w(_, { className: "h-4 w-4 animate-spin" }), "Submit Rating"]
532
- }), /* @__PURE__ */ w("button", {
553
+ onClick: ve,
554
+ disabled: M.isPending,
555
+ className: o("flex-1 inline-flex items-center justify-center gap-2 rounded-lg bg-foreground px-4 py-2.5 text-sm font-medium text-background transition-opacity", M.isPending ? "opacity-60 cursor-not-allowed" : "hover:opacity-90"),
556
+ children: [M.isPending && /* @__PURE__ */ x(se, { className: "h-4 w-4 animate-spin" }), "Submit Rating"]
557
+ }), /* @__PURE__ */ x("button", {
533
558
  type: "button",
534
- onClick: () => z(!1),
559
+ onClick: () => P(!1),
535
560
  className: "rounded-lg border border-border-subtle px-4 py-2.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
536
561
  children: "Cancel"
537
562
  })]
@@ -543,6 +568,6 @@ function j() {
543
568
  ]
544
569
  });
545
570
  }
546
- export { j as OrderTrackingPage };
571
+ export { E as OrderTrackingPage };
547
572
 
548
573
  //# sourceMappingURL=OrderTrackingPage.js.map