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