@burdenoff/microfe-kadaikodi 2026.704.2 → 2026.704.4

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 (77) hide show
  1. package/dist/kadaikodi/KadaikodiRoutes.js +30 -26
  2. package/dist/kadaikodi/KadaikodiRoutes.js.map +1 -1
  3. package/dist/kadaikodi/hooks/useKadaikodiApi.js +76 -6
  4. package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
  5. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js +45 -107
  6. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js.map +1 -1
  7. package/dist/kadaikodi/pages/admin/AdminDashboard.js +30 -32
  8. package/dist/kadaikodi/pages/admin/AdminDashboard.js.map +1 -1
  9. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js +137 -120
  10. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js.map +1 -1
  11. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js +2 -2
  12. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js.map +1 -1
  13. package/dist/kadaikodi/pages/admin/AdminProfilePage.js.map +1 -1
  14. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js +332 -276
  15. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js.map +1 -1
  16. package/dist/kadaikodi/pages/admin/CartManagementPage.js +278 -283
  17. package/dist/kadaikodi/pages/admin/CartManagementPage.js.map +1 -1
  18. package/dist/kadaikodi/pages/admin/UserManagementPage.js +310 -366
  19. package/dist/kadaikodi/pages/admin/UserManagementPage.js.map +1 -1
  20. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js +105 -111
  21. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
  22. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js +290 -257
  23. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
  24. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js +84 -70
  25. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
  26. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js +270 -228
  27. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
  28. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js +194 -173
  29. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
  30. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js +202 -139
  31. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js.map +1 -1
  32. package/dist/kadaikodi/pages/cart-owner/InvestmentListingPage.js +232 -0
  33. package/dist/kadaikodi/pages/cart-owner/InvestmentListingPage.js.map +1 -0
  34. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js +84 -79
  35. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js.map +1 -1
  36. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js.map +1 -1
  37. package/dist/kadaikodi/pages/common/HelpSupportPage.js +310 -317
  38. package/dist/kadaikodi/pages/common/HelpSupportPage.js.map +1 -1
  39. package/dist/kadaikodi/pages/common/NotificationCenterPage.js.map +1 -1
  40. package/dist/kadaikodi/pages/common/SettingsPage.js +502 -586
  41. package/dist/kadaikodi/pages/common/SettingsPage.js.map +1 -1
  42. package/dist/kadaikodi/pages/customer/BookingDetailsPage.js +243 -143
  43. package/dist/kadaikodi/pages/customer/BookingDetailsPage.js.map +1 -1
  44. package/dist/kadaikodi/pages/customer/CartDetailPage.js +4 -4
  45. package/dist/kadaikodi/pages/customer/CartDetailPage.js.map +1 -1
  46. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js +2 -2
  47. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js.map +1 -1
  48. package/dist/kadaikodi/pages/customer/CheckoutPage.js +4 -4
  49. package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
  50. package/dist/kadaikodi/pages/customer/CustomerDashboard.js +6 -6
  51. package/dist/kadaikodi/pages/customer/CustomerDashboard.js.map +1 -1
  52. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js +189 -199
  53. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js.map +1 -1
  54. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js +6 -4
  55. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js.map +1 -1
  56. package/dist/kadaikodi/pages/customer/FavoritesPage.js +6 -6
  57. package/dist/kadaikodi/pages/customer/FavoritesPage.js.map +1 -1
  58. package/dist/kadaikodi/pages/customer/OrderHistoryPage.js +4 -4
  59. package/dist/kadaikodi/pages/customer/OrderHistoryPage.js.map +1 -1
  60. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js +409 -304
  61. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
  62. package/dist/kadaikodi/pages/customer/ReviewsPage.js +209 -162
  63. package/dist/kadaikodi/pages/customer/ReviewsPage.js.map +1 -1
  64. package/dist/kadaikodi/pages/customer/SavedAddressesPage.js.map +1 -1
  65. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js.map +1 -1
  66. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
  67. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js.map +1 -1
  68. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js +441 -514
  69. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js.map +1 -1
  70. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +207 -186
  71. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
  72. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js.map +1 -1
  73. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js +340 -272
  74. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js.map +1 -1
  75. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js +122 -75
  76. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js.map +1 -1
  77. package/package.json +1 -1
@@ -3,37 +3,38 @@ import { cn as t } from "../../utils/cn.js";
3
3
  import { PageLayout as n } from "../../components/PageLayout.js";
4
4
  import { StatusBadge as r } from "../../components/StatusBadge.js";
5
5
  import { EmptyState as i } from "../../components/EmptyState.js";
6
- import { useOrder as a } from "../../hooks/useKadaikodiApi.js";
7
- import { formatCurrency as o, formatDate as s } from "../../utils/formatters.js";
8
- import { ArrowLeft as c, CheckCircle2 as l, ChefHat as u, Circle as d, Clock as f, MapPin as p, MessageCircle as m, Package as h, Phone as g, ShoppingBag as _, Star as v, Truck as y, XCircle as b } from "lucide-react";
9
- import { useParams as x } from "react-router-dom";
10
- import { jsx as S, jsxs as C } from "react/jsx-runtime";
11
- import { GlassCard as w, PagePurpose as T } from "@burdenoff/fe-libs/ui";
6
+ import { useCreateReview as a, useOrder as o } from "../../hooks/useKadaikodiApi.js";
7
+ import { formatCurrency as s, formatDate as c } from "../../utils/formatters.js";
8
+ import { useState as l } from "react";
9
+ import { ArrowLeft as u, CheckCircle2 as d, ChefHat as f, Circle as p, Clock as m, Loader2 as h, MapPin as g, MessageCircle as _, Package as v, Phone as y, ShoppingBag as b, Star as x, Truck as S, X as C, XCircle as w } from "lucide-react";
10
+ import { useParams as T } from "react-router-dom";
11
+ import { jsx as E, jsxs as D } from "react/jsx-runtime";
12
+ import { GlassCard as O, PagePurpose as k } from "@burdenoff/fe-libs/ui";
12
13
  //#region src/kadaikodi/pages/customer/OrderTrackingPage.tsx
13
- var E = {
14
- pending: f,
15
- confirmed: l,
16
- preparing: u,
17
- ready: h,
18
- picked_up: h,
19
- out_for_delivery: y,
20
- delivered: l,
21
- cancelled: b
22
- }, D = [
14
+ var A = {
15
+ pending: m,
16
+ confirmed: d,
17
+ preparing: f,
18
+ ready: v,
19
+ picked_up: v,
20
+ out_for_delivery: S,
21
+ delivered: d,
22
+ cancelled: w
23
+ }, j = [
23
24
  "pending",
24
25
  "confirmed",
25
26
  "preparing",
26
27
  "ready",
27
28
  "out_for_delivery",
28
29
  "delivered"
29
- ], O = {
30
+ ], M = {
30
31
  pending: "Order Placed",
31
32
  confirmed: "Confirmed",
32
33
  preparing: "Preparing",
33
34
  ready: "Ready",
34
35
  out_for_delivery: "Out for Delivery",
35
36
  delivered: "Delivered"
36
- }, k = {
37
+ }, N = {
37
38
  pending: "Your order has been received",
38
39
  confirmed: "Cart has accepted your order",
39
40
  preparing: "Your food is being prepared",
@@ -41,348 +42,452 @@ var E = {
41
42
  out_for_delivery: "Your order is on the way",
42
43
  delivered: "Order has been delivered"
43
44
  };
44
- function A() {
45
- let { orderId: u } = x(), { navigateTo: h } = e(), { data: y, isLoading: A } = a(u);
46
- if (A) return /* @__PURE__ */ S(n, {
45
+ function P() {
46
+ let { orderId: f } = T(), { navigateTo: v, currentUser: S } = e(), { data: P, isLoading: F } = o(f), I = a(), [L, R] = l(!1), [z, B] = l(5), [V, H] = l(""), [U, W] = l(null), G = (e) => {
47
+ W(e), setTimeout(() => W(null), 3e3);
48
+ }, K = () => {
49
+ if (!P || !S?.id) {
50
+ G("Please sign in to rate this order.");
51
+ return;
52
+ }
53
+ I.mutate({
54
+ providerId: P.cartId,
55
+ orderId: P.id,
56
+ customerId: S.id,
57
+ rating: z,
58
+ review: V.trim() || void 0
59
+ }, {
60
+ onSuccess: () => {
61
+ R(!1), H(""), G("Thanks! Your rating has been submitted.");
62
+ },
63
+ onError: () => G("Could not submit your rating. Please try again.")
64
+ });
65
+ };
66
+ if (F) return /* @__PURE__ */ E(n, {
47
67
  title: "Track Order",
48
- children: /* @__PURE__ */ C("div", {
68
+ children: /* @__PURE__ */ D("div", {
49
69
  className: "flex flex-col items-center justify-center py-16 text-center",
50
- children: [/* @__PURE__ */ S("div", { className: "animate-spin rounded-full h-12 w-12 border-b-2 border-foreground mx-auto mb-4" }), /* @__PURE__ */ S("p", {
70
+ children: [/* @__PURE__ */ E("div", { className: "animate-spin rounded-full h-12 w-12 border-b-2 border-foreground mx-auto mb-4" }), /* @__PURE__ */ E("p", {
51
71
  className: "text-sm text-text-secondary",
52
72
  children: "Loading order details..."
53
73
  })]
54
74
  })
55
75
  });
56
- if (!y) return /* @__PURE__ */ S(n, {
76
+ if (!P) return /* @__PURE__ */ E(n, {
57
77
  title: "Order Not Found",
58
- children: /* @__PURE__ */ S(i, {
59
- icon: /* @__PURE__ */ S(_, { className: "h-12 w-12" }),
78
+ children: /* @__PURE__ */ E(i, {
79
+ icon: /* @__PURE__ */ E(b, { className: "h-12 w-12" }),
60
80
  title: "Order not found",
61
81
  description: "The order you're looking for doesn't exist.",
62
- action: /* @__PURE__ */ S("button", {
82
+ action: /* @__PURE__ */ E("button", {
63
83
  type: "button",
64
- onClick: () => h("/customer/orders"),
84
+ onClick: () => v("/customer/orders"),
65
85
  className: "rounded-lg bg-foreground px-4 py-2 text-sm font-medium text-background hover:opacity-90 transition-opacity",
66
86
  children: "View All Orders"
67
87
  })
68
88
  })
69
89
  });
70
- let j = D.indexOf(y.status), M = y.status === "cancelled", N = y.status === "delivered", P = (e) => D.indexOf(e) <= j, F = (e) => e === y.status;
71
- return /* @__PURE__ */ C(n, {
72
- title: /* @__PURE__ */ C("div", {
90
+ let q = j.indexOf(P.status), J = P.status === "cancelled", Y = P.status === "delivered", X = (e) => j.indexOf(e) <= q, Z = (e) => e === P.status;
91
+ return /* @__PURE__ */ D(n, {
92
+ title: /* @__PURE__ */ D("div", {
73
93
  className: "flex items-center gap-3",
74
- children: [/* @__PURE__ */ S("button", {
94
+ children: [/* @__PURE__ */ E("button", {
75
95
  type: "button",
76
- onClick: () => h("/customer/orders"),
96
+ onClick: () => v("/customer/orders"),
77
97
  className: "rounded-md p-1 text-text-secondary hover:bg-accent hover:text-text-primary transition-colors",
78
- children: /* @__PURE__ */ S(c, { className: "h-5 w-5" })
79
- }), /* @__PURE__ */ S("span", { children: "Track Order" })]
98
+ children: /* @__PURE__ */ E(u, { className: "h-5 w-5" })
99
+ }), /* @__PURE__ */ E("span", { children: "Track Order" })]
80
100
  }),
81
- actions: /* @__PURE__ */ S(r, { status: y.status }),
82
- children: [/* @__PURE__ */ S(T, {
83
- className: "mb-6",
84
- 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."
85
- }), /* @__PURE__ */ C("div", {
86
- className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
87
- children: [/* @__PURE__ */ C("div", {
88
- className: "lg:col-span-2 space-y-6",
89
- children: [
90
- /* @__PURE__ */ C(w, {
91
- treatment: "glass",
92
- glow: !0,
93
- className: "p-5",
94
- children: [/* @__PURE__ */ C("div", {
95
- className: "flex flex-col sm:flex-row sm:justify-between sm:items-start gap-3",
96
- children: [/* @__PURE__ */ C("div", {
97
- className: "flex-1",
98
- children: [
99
- /* @__PURE__ */ C("h2", {
100
- className: "text-lg font-semibold text-text-primary",
101
- children: ["Order #", y.id]
102
- }),
103
- /* @__PURE__ */ S("p", {
104
- className: "text-sm text-text-secondary",
105
- children: y.cartName
106
- }),
107
- /* @__PURE__ */ S("p", {
108
- className: "text-xs text-text-secondary mt-0.5",
109
- children: s(y.orderDate)
110
- })
111
- ]
112
- }), /* @__PURE__ */ C("div", {
113
- className: "text-left sm:text-right",
114
- children: [/* @__PURE__ */ S("p", {
115
- className: "text-xl font-bold text-text-primary",
116
- children: o(y.total, { minimumFractionDigits: 0 })
117
- }), /* @__PURE__ */ S("p", {
118
- className: "text-xs text-text-secondary uppercase",
119
- children: y.paymentMethod
101
+ actions: /* @__PURE__ */ E(r, { status: P.status }),
102
+ children: [
103
+ /* @__PURE__ */ E(k, {
104
+ className: "mb-6",
105
+ 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."
106
+ }),
107
+ /* @__PURE__ */ D("div", {
108
+ className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
109
+ children: [/* @__PURE__ */ D("div", {
110
+ className: "lg:col-span-2 space-y-6",
111
+ children: [
112
+ /* @__PURE__ */ D(O, {
113
+ treatment: "glass",
114
+ glow: !0,
115
+ className: "p-5",
116
+ children: [/* @__PURE__ */ D("div", {
117
+ className: "flex flex-col sm:flex-row sm:justify-between sm:items-start gap-3",
118
+ children: [/* @__PURE__ */ D("div", {
119
+ className: "flex-1",
120
+ children: [
121
+ /* @__PURE__ */ D("h2", {
122
+ className: "text-lg font-semibold text-text-primary",
123
+ children: ["Order #", P.id]
124
+ }),
125
+ /* @__PURE__ */ E("p", {
126
+ className: "text-sm text-text-secondary",
127
+ children: P.cartName
128
+ }),
129
+ /* @__PURE__ */ E("p", {
130
+ className: "text-xs text-text-secondary mt-0.5",
131
+ children: c(P.orderDate)
132
+ })
133
+ ]
134
+ }), /* @__PURE__ */ D("div", {
135
+ className: "text-left sm:text-right",
136
+ children: [/* @__PURE__ */ E("p", {
137
+ className: "text-xl font-bold text-text-primary",
138
+ children: s(P.total, { minimumFractionDigits: 0 })
139
+ }), /* @__PURE__ */ E("p", {
140
+ className: "text-xs text-text-secondary uppercase",
141
+ children: P.paymentMethod
142
+ })]
143
+ })]
144
+ }), J ? /* @__PURE__ */ D("div", {
145
+ className: "mt-4 flex items-start gap-3 rounded-lg bg-status-error-bg/10 p-4 border border-status-error-border/20",
146
+ children: [/* @__PURE__ */ E(w, { className: "h-5 w-5 text-status-error-text mt-0.5 shrink-0" }), /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
147
+ className: "font-medium text-status-error-text",
148
+ children: "Order Cancelled"
149
+ }), P.cancellationReason && /* @__PURE__ */ E("p", {
150
+ className: "text-sm text-status-error-text/80 mt-0.5",
151
+ children: P.cancellationReason
152
+ })] })]
153
+ }) : /* @__PURE__ */ D("div", {
154
+ className: t("mt-4 flex items-start gap-3 rounded-lg p-4 border", Y ? "bg-status-success-bg-subtle border-status-success-text/20" : "bg-[var(--color-accent-soft)] border-border-focus/20"),
155
+ children: [Y ? /* @__PURE__ */ E(d, { className: "h-5 w-5 text-status-success-text mt-0.5 shrink-0" }) : /* @__PURE__ */ E(m, { className: "h-5 w-5 text-text-primary mt-0.5 shrink-0" }), /* @__PURE__ */ E("p", {
156
+ className: t("text-sm font-medium", Y ? "text-status-success-text" : "text-text-primary"),
157
+ children: Y ? `Delivered at ${c(P.actualDeliveryTime)}` : P.estimatedDeliveryTime ? `Estimated delivery by ${c(P.estimatedDeliveryTime)}` : "Estimated delivery time: TBD"
120
158
  })]
121
159
  })]
122
- }), M ? /* @__PURE__ */ C("div", {
123
- className: "mt-4 flex items-start gap-3 rounded-lg bg-status-error-bg/10 p-4 border border-status-error-border/20",
124
- children: [/* @__PURE__ */ S(b, { className: "h-5 w-5 text-status-error-text mt-0.5 shrink-0" }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
125
- className: "font-medium text-status-error-text",
126
- children: "Order Cancelled"
127
- }), y.cancellationReason && /* @__PURE__ */ S("p", {
128
- className: "text-sm text-status-error-text/80 mt-0.5",
129
- children: y.cancellationReason
130
- })] })]
131
- }) : /* @__PURE__ */ C("div", {
132
- className: t("mt-4 flex items-start gap-3 rounded-lg p-4 border", N ? "bg-status-success-bg-subtle border-status-success-text/20" : "bg-[var(--color-accent-soft)] border-border-focus/20"),
133
- children: [N ? /* @__PURE__ */ S(l, { className: "h-5 w-5 text-status-success-text mt-0.5 shrink-0" }) : /* @__PURE__ */ S(f, { className: "h-5 w-5 text-text-primary mt-0.5 shrink-0" }), /* @__PURE__ */ S("p", {
134
- className: t("text-sm font-medium", N ? "text-status-success-text" : "text-text-primary"),
135
- children: N ? `Delivered at ${s(y.actualDeliveryTime)}` : y.estimatedDeliveryTime ? `Estimated delivery by ${s(y.estimatedDeliveryTime)}` : "Estimated delivery time: TBD"
160
+ }),
161
+ !J && /* @__PURE__ */ D("div", {
162
+ className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
163
+ children: [/* @__PURE__ */ E("h3", {
164
+ className: "text-base font-semibold text-text-primary mb-5",
165
+ children: "Order Status"
166
+ }), /* @__PURE__ */ E("div", {
167
+ className: "relative space-y-0",
168
+ children: j.map((e, n) => {
169
+ let r = X(e), i = Z(e), a = n === j.length - 1, o = A[e] ?? p;
170
+ return /* @__PURE__ */ D("div", {
171
+ className: "flex items-start relative",
172
+ children: [
173
+ !a && /* @__PURE__ */ E("div", { className: t("absolute left-5 top-10 w-0.5 h-8 z-0", r ? "bg-status-success-text" : "bg-border") }),
174
+ /* @__PURE__ */ E("div", {
175
+ className: t("relative z-10 flex h-10 w-10 shrink-0 items-center justify-center rounded-full", r ? "bg-status-success-bg-subtle border-2 border-status-success-text text-status-success-text" : "bg-bg-sunken border-2 border-border-subtle text-text-secondary", i && "ring-4 ring-status-success-text/20"),
176
+ children: /* @__PURE__ */ E(o, { className: "h-4 w-4" })
177
+ }),
178
+ /* @__PURE__ */ D("div", {
179
+ className: "ml-4 flex-1 pb-8",
180
+ children: [
181
+ /* @__PURE__ */ E("h4", {
182
+ className: t("text-sm font-semibold", r ? "text-text-primary" : "text-text-secondary"),
183
+ children: M[e]
184
+ }),
185
+ /* @__PURE__ */ E("p", {
186
+ className: t("text-xs", r ? "text-text-secondary" : "text-text-secondary/50"),
187
+ children: N[e]
188
+ }),
189
+ i && P.assignedWorker && /* @__PURE__ */ D("div", {
190
+ className: "mt-1.5 text-xs text-text-primary",
191
+ children: [/* @__PURE__ */ D("p", { children: ["Driver: ", P.assignedWorker.name] }), /* @__PURE__ */ D("p", { children: ["Contact: ", P.assignedWorker.phone] })]
192
+ })
193
+ ]
194
+ })
195
+ ]
196
+ }, e);
197
+ })
136
198
  })]
137
- })]
138
- }),
139
- !M && /* @__PURE__ */ C("div", {
140
- className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
141
- children: [/* @__PURE__ */ S("h3", {
142
- className: "text-base font-semibold text-text-primary mb-5",
143
- children: "Order Status"
144
- }), /* @__PURE__ */ S("div", {
145
- className: "relative space-y-0",
146
- children: D.map((e, n) => {
147
- let r = P(e), i = F(e), a = n === D.length - 1, o = E[e] ?? d;
148
- return /* @__PURE__ */ C("div", {
149
- className: "flex items-start relative",
150
- children: [
151
- !a && /* @__PURE__ */ S("div", { className: t("absolute left-5 top-10 w-0.5 h-8 z-0", r ? "bg-status-success-text" : "bg-border") }),
152
- /* @__PURE__ */ S("div", {
153
- className: t("relative z-10 flex h-10 w-10 shrink-0 items-center justify-center rounded-full", r ? "bg-status-success-bg-subtle border-2 border-status-success-text text-status-success-text" : "bg-bg-sunken border-2 border-border-subtle text-text-secondary", i && "ring-4 ring-status-success-text/20"),
154
- children: /* @__PURE__ */ S(o, { className: "h-4 w-4" })
155
- }),
156
- /* @__PURE__ */ C("div", {
157
- className: "ml-4 flex-1 pb-8",
199
+ }),
200
+ /* @__PURE__ */ D("div", {
201
+ className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
202
+ children: [
203
+ /* @__PURE__ */ E("h3", {
204
+ className: "text-base font-semibold text-text-primary mb-3",
205
+ children: "Order Items"
206
+ }),
207
+ /* @__PURE__ */ E("div", {
208
+ className: "space-y-2",
209
+ children: P.items.map((e, t) => /* @__PURE__ */ D("div", {
210
+ className: "flex justify-between items-start pb-2 border-b border-border-subtle last:border-b-0",
211
+ children: [/* @__PURE__ */ D("div", {
212
+ className: "flex-1 pr-2",
158
213
  children: [
159
- /* @__PURE__ */ S("h4", {
160
- className: t("text-sm font-semibold", r ? "text-text-primary" : "text-text-secondary"),
161
- children: O[e]
214
+ /* @__PURE__ */ E("p", {
215
+ className: "text-sm font-medium text-text-primary",
216
+ children: e.name
162
217
  }),
163
- /* @__PURE__ */ S("p", {
164
- className: t("text-xs", r ? "text-text-secondary" : "text-text-secondary/50"),
165
- children: k[e]
218
+ e.customizations && e.customizations.length > 0 && /* @__PURE__ */ E("p", {
219
+ className: "text-xs text-text-secondary",
220
+ children: e.customizations.join(", ")
166
221
  }),
167
- i && y.assignedWorker && /* @__PURE__ */ C("div", {
168
- className: "mt-1.5 text-xs text-text-primary",
169
- children: [/* @__PURE__ */ C("p", { children: ["Driver: ", y.assignedWorker.name] }), /* @__PURE__ */ C("p", { children: ["Contact: ", y.assignedWorker.phone] })]
222
+ /* @__PURE__ */ D("p", {
223
+ className: "text-xs text-text-secondary",
224
+ children: [
225
+ s(e.price, { minimumFractionDigits: 0 }),
226
+ " x ",
227
+ e.quantity
228
+ ]
170
229
  })
171
230
  ]
231
+ }), /* @__PURE__ */ E("p", {
232
+ className: "text-sm font-medium text-text-primary",
233
+ children: s(e.price * e.quantity, { minimumFractionDigits: 0 })
234
+ })]
235
+ }, t))
236
+ }),
237
+ /* @__PURE__ */ D("div", {
238
+ className: "mt-4 pt-4 border-t border-border-subtle space-y-2 text-sm",
239
+ children: [
240
+ /* @__PURE__ */ D("div", {
241
+ className: "flex justify-between text-text-secondary",
242
+ children: [/* @__PURE__ */ E("span", { children: "Subtotal" }), /* @__PURE__ */ E("span", { children: s(P.subtotal, { minimumFractionDigits: 0 }) })]
243
+ }),
244
+ /* @__PURE__ */ D("div", {
245
+ className: "flex justify-between text-text-secondary",
246
+ children: [/* @__PURE__ */ E("span", { children: "Delivery Fee" }), /* @__PURE__ */ E("span", { children: P.deliveryFee === 0 ? "FREE" : s(P.deliveryFee, { minimumFractionDigits: 0 }) })]
247
+ }),
248
+ /* @__PURE__ */ D("div", {
249
+ className: "flex justify-between text-text-secondary",
250
+ children: [/* @__PURE__ */ E("span", { children: "Tax" }), /* @__PURE__ */ E("span", { children: s(P.taxes, { minimumFractionDigits: 0 }) })]
251
+ }),
252
+ P.discount && P.discount > 0 && /* @__PURE__ */ D("div", {
253
+ className: "flex justify-between text-status-success-text",
254
+ children: [/* @__PURE__ */ E("span", { children: "Discount" }), /* @__PURE__ */ D("span", { children: ["-", s(P.discount, { minimumFractionDigits: 0 })] })]
255
+ }),
256
+ /* @__PURE__ */ D("div", {
257
+ className: "flex justify-between font-semibold pt-2 border-t border-border-subtle text-text-primary",
258
+ children: [/* @__PURE__ */ E("span", { children: "Total" }), /* @__PURE__ */ E("span", { children: s(P.total, { minimumFractionDigits: 0 }) })]
172
259
  })
173
260
  ]
174
- }, e);
175
- })
176
- })]
177
- }),
178
- /* @__PURE__ */ C("div", {
179
- className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
180
- children: [
181
- /* @__PURE__ */ S("h3", {
261
+ })
262
+ ]
263
+ })
264
+ ]
265
+ }), /* @__PURE__ */ D("div", {
266
+ className: "lg:col-span-1 space-y-6",
267
+ children: [
268
+ /* @__PURE__ */ D("div", {
269
+ className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
270
+ children: [/* @__PURE__ */ E("h3", {
182
271
  className: "text-base font-semibold text-text-primary mb-3",
183
- children: "Order Items"
184
- }),
185
- /* @__PURE__ */ S("div", {
186
- className: "space-y-2",
187
- children: y.items.map((e, t) => /* @__PURE__ */ C("div", {
188
- className: "flex justify-between items-start pb-2 border-b border-border-subtle last:border-b-0",
189
- children: [/* @__PURE__ */ C("div", {
190
- className: "flex-1 pr-2",
191
- children: [
192
- /* @__PURE__ */ S("p", {
272
+ children: "Delivery Details"
273
+ }), /* @__PURE__ */ D("div", {
274
+ className: "space-y-3",
275
+ children: [
276
+ /* @__PURE__ */ D("div", {
277
+ className: "flex items-start gap-2",
278
+ children: [/* @__PURE__ */ E(g, { className: "mt-0.5 h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ D("div", { children: [
279
+ /* @__PURE__ */ E("p", {
280
+ className: "text-xs text-text-secondary",
281
+ children: "Delivery Address"
282
+ }),
283
+ /* @__PURE__ */ E("p", {
193
284
  className: "text-sm font-medium text-text-primary",
194
- children: e.name
285
+ children: P.deliveryAddress.street
195
286
  }),
196
- e.customizations && e.customizations.length > 0 && /* @__PURE__ */ S("p", {
197
- className: "text-xs text-text-secondary",
198
- children: e.customizations.join(", ")
287
+ /* @__PURE__ */ E("p", {
288
+ className: "text-sm text-text-secondary",
289
+ children: P.deliveryAddress.area
199
290
  }),
200
- /* @__PURE__ */ C("p", {
201
- className: "text-xs text-text-secondary",
291
+ /* @__PURE__ */ D("p", {
292
+ className: "text-sm text-text-secondary",
202
293
  children: [
203
- o(e.price, { minimumFractionDigits: 0 }),
204
- " x ",
205
- e.quantity
294
+ P.deliveryAddress.city,
295
+ ", ",
296
+ P.deliveryAddress.pincode
206
297
  ]
298
+ }),
299
+ P.deliveryAddress.landmark && /* @__PURE__ */ D("p", {
300
+ className: "text-xs text-text-secondary mt-0.5",
301
+ children: ["Landmark: ", P.deliveryAddress.landmark]
207
302
  })
208
- ]
209
- }), /* @__PURE__ */ S("p", {
210
- className: "text-sm font-medium text-text-primary",
211
- children: o(e.price * e.quantity, { minimumFractionDigits: 0 })
212
- })]
213
- }, t))
214
- }),
215
- /* @__PURE__ */ C("div", {
216
- className: "mt-4 pt-4 border-t border-border-subtle space-y-2 text-sm",
217
- children: [
218
- /* @__PURE__ */ C("div", {
219
- className: "flex justify-between text-text-secondary",
220
- children: [/* @__PURE__ */ S("span", { children: "Subtotal" }), /* @__PURE__ */ S("span", { children: o(y.subtotal, { minimumFractionDigits: 0 }) })]
221
- }),
222
- /* @__PURE__ */ C("div", {
223
- className: "flex justify-between text-text-secondary",
224
- children: [/* @__PURE__ */ S("span", { children: "Delivery Fee" }), /* @__PURE__ */ S("span", { children: y.deliveryFee === 0 ? "FREE" : o(y.deliveryFee, { minimumFractionDigits: 0 }) })]
225
- }),
226
- /* @__PURE__ */ C("div", {
227
- className: "flex justify-between text-text-secondary",
228
- children: [/* @__PURE__ */ S("span", { children: "Tax" }), /* @__PURE__ */ S("span", { children: o(y.taxes, { minimumFractionDigits: 0 }) })]
303
+ ] })]
229
304
  }),
230
- y.discount && y.discount > 0 && /* @__PURE__ */ C("div", {
231
- className: "flex justify-between text-status-success-text",
232
- children: [/* @__PURE__ */ S("span", { children: "Discount" }), /* @__PURE__ */ C("span", { children: ["-", o(y.discount, { minimumFractionDigits: 0 })] })]
233
- }),
234
- /* @__PURE__ */ C("div", {
235
- className: "flex justify-between font-semibold pt-2 border-t border-border-subtle text-text-primary",
236
- children: [/* @__PURE__ */ S("span", { children: "Total" }), /* @__PURE__ */ S("span", { children: o(y.total, { minimumFractionDigits: 0 }) })]
237
- })
238
- ]
239
- })
240
- ]
241
- })
242
- ]
243
- }), /* @__PURE__ */ C("div", {
244
- className: "lg:col-span-1 space-y-6",
245
- children: [
246
- /* @__PURE__ */ C("div", {
247
- className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
248
- children: [/* @__PURE__ */ S("h3", {
249
- className: "text-base font-semibold text-text-primary mb-3",
250
- children: "Delivery Details"
251
- }), /* @__PURE__ */ C("div", {
252
- className: "space-y-3",
253
- children: [
254
- /* @__PURE__ */ C("div", {
255
- className: "flex items-start gap-2",
256
- children: [/* @__PURE__ */ S(p, { className: "mt-0.5 h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ C("div", { children: [
257
- /* @__PURE__ */ S("p", {
305
+ P.customerNotes && /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
306
+ className: "text-xs text-text-secondary",
307
+ children: "Customer Notes"
308
+ }), /* @__PURE__ */ E("p", {
309
+ className: "text-sm text-text-primary",
310
+ children: P.customerNotes
311
+ })] }),
312
+ /* @__PURE__ */ D("div", { children: [
313
+ /* @__PURE__ */ E("p", {
258
314
  className: "text-xs text-text-secondary",
259
- children: "Delivery Address"
315
+ children: "Payment Method"
260
316
  }),
261
- /* @__PURE__ */ S("p", {
262
- className: "text-sm font-medium text-text-primary",
263
- children: y.deliveryAddress.street
317
+ /* @__PURE__ */ E("p", {
318
+ className: "text-sm font-medium text-text-primary capitalize",
319
+ children: P.paymentMethod
264
320
  }),
265
- /* @__PURE__ */ S("p", {
266
- className: "text-sm text-text-secondary",
267
- children: y.deliveryAddress.area
321
+ /* @__PURE__ */ E("p", {
322
+ className: "text-xs text-text-secondary",
323
+ children: P.paymentStatus === "completed" ? "Paid" : "Payment Pending"
324
+ })
325
+ ] })
326
+ ]
327
+ })]
328
+ }),
329
+ P.assignedWorker && /* @__PURE__ */ D("div", {
330
+ className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
331
+ children: [/* @__PURE__ */ E("h3", {
332
+ className: "text-base font-semibold text-text-primary mb-3",
333
+ children: "Delivery Partner"
334
+ }), /* @__PURE__ */ D("div", {
335
+ className: "space-y-3",
336
+ children: [/* @__PURE__ */ D("div", {
337
+ className: "flex items-center gap-3",
338
+ children: [
339
+ /* @__PURE__ */ E("div", {
340
+ className: "flex h-10 w-10 items-center justify-center rounded-full bg-bg-sunken text-text-secondary",
341
+ children: /* @__PURE__ */ E("span", {
342
+ className: "text-sm font-semibold",
343
+ children: P.assignedWorker.name.charAt(0)
344
+ })
268
345
  }),
269
- /* @__PURE__ */ C("p", {
270
- className: "text-sm text-text-secondary",
271
- children: [
272
- y.deliveryAddress.city,
273
- ", ",
274
- y.deliveryAddress.pincode
275
- ]
346
+ /* @__PURE__ */ D("div", {
347
+ className: "flex-1 min-w-0",
348
+ children: [/* @__PURE__ */ E("p", {
349
+ className: "text-sm font-medium text-text-primary",
350
+ children: P.assignedWorker.name
351
+ }), /* @__PURE__ */ D("div", {
352
+ className: "flex items-center gap-1.5 mt-0.5",
353
+ children: [/* @__PURE__ */ E(x, { className: "h-3 w-3 fill-status-warning-text text-status-warning-text" }), /* @__PURE__ */ D("span", {
354
+ className: "text-xs text-text-secondary",
355
+ children: [P.assignedWorker.rating, "/5"]
356
+ })]
357
+ })]
276
358
  }),
277
- y.deliveryAddress.landmark && /* @__PURE__ */ C("p", {
278
- className: "text-xs text-text-secondary mt-0.5",
279
- children: ["Landmark: ", y.deliveryAddress.landmark]
359
+ /* @__PURE__ */ E("a", {
360
+ href: `tel:${P.assignedWorker.phone}`,
361
+ 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",
362
+ children: /* @__PURE__ */ E(y, { className: "h-4 w-4" })
280
363
  })
281
- ] })]
282
- }),
283
- y.customerNotes && /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
284
- className: "text-xs text-text-secondary",
285
- children: "Customer Notes"
286
- }), /* @__PURE__ */ S("p", {
287
- className: "text-sm text-text-primary",
288
- children: y.customerNotes
289
- })] }),
290
- /* @__PURE__ */ C("div", { children: [
291
- /* @__PURE__ */ S("p", {
292
- className: "text-xs text-text-secondary",
293
- children: "Payment Method"
294
- }),
295
- /* @__PURE__ */ S("p", {
296
- className: "text-sm font-medium text-text-primary capitalize",
297
- children: y.paymentMethod
298
- }),
299
- /* @__PURE__ */ S("p", {
300
- className: "text-xs text-text-secondary",
301
- children: y.paymentStatus === "completed" ? "Paid" : "Payment Pending"
302
- })
303
- ] })
304
- ]
305
- })]
306
- }),
307
- y.assignedWorker && /* @__PURE__ */ C("div", {
308
- className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
309
- children: [/* @__PURE__ */ S("h3", {
310
- className: "text-base font-semibold text-text-primary mb-3",
311
- children: "Delivery Partner"
312
- }), /* @__PURE__ */ C("div", {
313
- className: "space-y-3",
314
- children: [/* @__PURE__ */ C("div", {
315
- className: "flex items-center gap-3",
364
+ ]
365
+ }), /* @__PURE__ */ D("button", {
366
+ type: "button",
367
+ onClick: () => window.location.href = `tel:${P.assignedWorker.phone}`,
368
+ 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",
369
+ children: [/* @__PURE__ */ E(y, { className: "h-4 w-4" }), "Call Driver"]
370
+ })]
371
+ })]
372
+ }),
373
+ /* @__PURE__ */ D("div", {
374
+ className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
375
+ children: [/* @__PURE__ */ E("h3", {
376
+ className: "text-base font-semibold text-text-primary mb-3",
377
+ children: "Need Help?"
378
+ }), /* @__PURE__ */ D("div", {
379
+ className: "space-y-2",
316
380
  children: [
317
- /* @__PURE__ */ S("div", {
318
- className: "flex h-10 w-10 items-center justify-center rounded-full bg-bg-sunken text-text-secondary",
319
- children: /* @__PURE__ */ S("span", {
320
- className: "text-sm font-semibold",
321
- children: y.assignedWorker.name.charAt(0)
322
- })
381
+ /* @__PURE__ */ D("a", {
382
+ href: "mailto:support@kadaikodi.com",
383
+ 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",
384
+ children: [/* @__PURE__ */ E(_, { className: "h-4 w-4" }), "Email Support"]
323
385
  }),
324
- /* @__PURE__ */ C("div", {
325
- className: "flex-1 min-w-0",
326
- children: [/* @__PURE__ */ S("p", {
327
- className: "text-sm font-medium text-text-primary",
328
- children: y.assignedWorker.name
329
- }), /* @__PURE__ */ C("div", {
330
- className: "flex items-center gap-1.5 mt-0.5",
331
- children: [/* @__PURE__ */ S(v, { className: "h-3 w-3 fill-status-warning-text text-status-warning-text" }), /* @__PURE__ */ C("span", {
332
- className: "text-xs text-text-secondary",
333
- children: [y.assignedWorker.rating, "/5"]
334
- })]
335
- })]
386
+ /* @__PURE__ */ D("button", {
387
+ type: "button",
388
+ onClick: () => window.location.href = "tel:7012270561",
389
+ 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",
390
+ children: [/* @__PURE__ */ E(y, { className: "h-4 w-4" }), "Call Support"]
336
391
  }),
337
- /* @__PURE__ */ S("a", {
338
- href: `tel:${y.assignedWorker.phone}`,
339
- 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",
340
- children: /* @__PURE__ */ S(g, { className: "h-4 w-4" })
392
+ Y && !P.rating && /* @__PURE__ */ D("button", {
393
+ type: "button",
394
+ onClick: () => R(!0),
395
+ 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",
396
+ children: [/* @__PURE__ */ E(x, { className: "h-4 w-4" }), "Rate Order"]
341
397
  })
342
398
  ]
343
- }), /* @__PURE__ */ C("button", {
344
- type: "button",
345
- onClick: () => window.location.href = `tel:${y.assignedWorker.phone}`,
346
- 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",
347
- children: [/* @__PURE__ */ S(g, { className: "h-4 w-4" }), "Call Driver"]
348
399
  })]
349
- })]
350
- }),
351
- /* @__PURE__ */ C("div", {
352
- className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
353
- children: [/* @__PURE__ */ S("h3", {
354
- className: "text-base font-semibold text-text-primary mb-3",
355
- children: "Need Help?"
356
- }), /* @__PURE__ */ C("div", {
357
- className: "space-y-2",
358
- children: [
359
- /* @__PURE__ */ C("button", {
400
+ })
401
+ ]
402
+ })]
403
+ }),
404
+ U && /* @__PURE__ */ D("div", {
405
+ 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",
406
+ children: [/* @__PURE__ */ E(d, { className: "h-4 w-4 text-status-success-text shrink-0" }), /* @__PURE__ */ E("p", {
407
+ className: "text-sm text-status-success-text",
408
+ children: U
409
+ })]
410
+ }),
411
+ L && /* @__PURE__ */ E("div", {
412
+ className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
413
+ children: /* @__PURE__ */ E("div", {
414
+ className: "w-full max-w-md rounded-lg border border-border-subtle bg-bg-surface shadow-lg",
415
+ children: /* @__PURE__ */ D("div", {
416
+ className: "p-5",
417
+ children: [
418
+ /* @__PURE__ */ D("div", {
419
+ className: "flex items-center justify-between mb-4",
420
+ children: [/* @__PURE__ */ E("h3", {
421
+ className: "text-lg font-semibold text-text-primary",
422
+ children: "Rate your order"
423
+ }), /* @__PURE__ */ E("button", {
360
424
  type: "button",
361
- onClick: () => alert("Chat support coming soon!"),
362
- 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",
363
- children: [/* @__PURE__ */ S(m, { className: "h-4 w-4" }), "Chat Support"]
364
- }),
365
- /* @__PURE__ */ C("button", {
425
+ onClick: () => R(!1),
426
+ className: "rounded-md p-2 text-text-secondary hover:bg-accent hover:text-text-primary transition-colors",
427
+ children: /* @__PURE__ */ E(C, { className: "h-4 w-4" })
428
+ })]
429
+ }),
430
+ /* @__PURE__ */ D("div", {
431
+ className: "mb-4",
432
+ children: [/* @__PURE__ */ E("label", {
433
+ className: "block text-sm font-medium text-text-primary mb-2",
434
+ children: "Your rating"
435
+ }), /* @__PURE__ */ E("div", {
436
+ className: "flex items-center gap-1",
437
+ children: [
438
+ 1,
439
+ 2,
440
+ 3,
441
+ 4,
442
+ 5
443
+ ].map((e) => /* @__PURE__ */ E("button", {
444
+ type: "button",
445
+ onClick: () => B(e),
446
+ className: "p-0.5",
447
+ "aria-label": `${e} star${e > 1 ? "s" : ""}`,
448
+ children: /* @__PURE__ */ E(x, { className: t("h-7 w-7", e <= z ? "fill-status-warning-text text-status-warning-text" : "fill-none text-text-secondary/40") })
449
+ }, e))
450
+ })]
451
+ }),
452
+ /* @__PURE__ */ D("div", {
453
+ className: "mb-5",
454
+ children: [/* @__PURE__ */ D("label", {
455
+ className: "block text-sm font-medium text-text-primary mb-1.5",
456
+ children: ["Review ", /* @__PURE__ */ E("span", {
457
+ className: "text-text-secondary font-normal",
458
+ children: "(optional)"
459
+ })]
460
+ }), /* @__PURE__ */ E("textarea", {
461
+ rows: 4,
462
+ value: V,
463
+ onChange: (e) => H(e.target.value),
464
+ placeholder: "How was your order?",
465
+ 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"
466
+ })]
467
+ }),
468
+ /* @__PURE__ */ D("div", {
469
+ className: "flex items-center gap-3",
470
+ children: [/* @__PURE__ */ D("button", {
366
471
  type: "button",
367
- onClick: () => window.location.href = "tel:7012270561",
368
- 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",
369
- children: [/* @__PURE__ */ S(g, { className: "h-4 w-4" }), "Call Support"]
370
- }),
371
- N && !y.rating && /* @__PURE__ */ C("button", {
472
+ onClick: K,
473
+ disabled: I.isPending,
474
+ className: t("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", I.isPending ? "opacity-60 cursor-not-allowed" : "hover:opacity-90"),
475
+ children: [I.isPending && /* @__PURE__ */ E(h, { className: "h-4 w-4 animate-spin" }), "Submit Rating"]
476
+ }), /* @__PURE__ */ E("button", {
372
477
  type: "button",
373
- onClick: () => h(`/customer/orders/${y.id}/rate`),
374
- 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",
375
- children: [/* @__PURE__ */ S(v, { className: "h-4 w-4" }), "Rate Order"]
376
- })
377
- ]
378
- })]
478
+ onClick: () => R(!1),
479
+ className: "rounded-lg border border-border-subtle px-4 py-2.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
480
+ children: "Cancel"
481
+ })]
482
+ })
483
+ ]
379
484
  })
380
- ]
381
- })]
382
- })]
485
+ })
486
+ })
487
+ ]
383
488
  });
384
489
  }
385
490
  //#endregion
386
- export { A as OrderTrackingPage };
491
+ export { P as OrderTrackingPage };
387
492
 
388
493
  //# sourceMappingURL=OrderTrackingPage.js.map