@burdenoff/microfe-movethewheels 2026.921.1 → 2026.924.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 (32) hide show
  1. package/dist/components/CustomerPicker.js +94 -101
  2. package/dist/components/EntityCombobox.js +105 -0
  3. package/dist/components/ui.js +2 -2
  4. package/dist/generated/wspace-types.d.ts +1676 -3
  5. package/dist/hooks/index.js +1 -1
  6. package/dist/hooks/useFleet.js +57 -51
  7. package/dist/hooks/useOrders.js +89 -84
  8. package/dist/hooks/useRoutes.js +1 -1
  9. package/dist/index.js +27 -27
  10. package/dist/movethewheels/components/CustomerPicker.d.ts +3 -2
  11. package/dist/movethewheels/components/EntityCombobox.d.ts +40 -0
  12. package/dist/movethewheels/components/ui.d.ts +1 -1
  13. package/dist/movethewheels/hooks/useFleet.d.ts +4 -0
  14. package/dist/movethewheels/hooks/useOrders.d.ts +15 -0
  15. package/dist/movethewheels/hooks/useRoutes.d.ts +16 -0
  16. package/dist/movethewheels/types/index.d.ts +5 -0
  17. package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-up-down.js +11 -0
  18. package/dist/pages/CreateOrderPage.js +196 -134
  19. package/dist/pages/OrderDetailsPage.js +328 -263
  20. package/dist/pages/RouteDetailsPage.js +277 -266
  21. package/package.json +1 -1
  22. package/src/generated/wspace-types.ts +1948 -3
  23. package/src/movethewheels/components/CustomerPicker.tsx +26 -36
  24. package/src/movethewheels/components/EntityCombobox.tsx +237 -0
  25. package/src/movethewheels/components/ui.tsx +9 -0
  26. package/src/movethewheels/hooks/useFleet.ts +19 -6
  27. package/src/movethewheels/hooks/useOrders.ts +35 -0
  28. package/src/movethewheels/hooks/useRoutes.ts +1 -1
  29. package/src/movethewheels/pages/CreateOrderPage.tsx +108 -5
  30. package/src/movethewheels/pages/OrderDetailsPage.tsx +130 -60
  31. package/src/movethewheels/pages/RouteDetailsPage.tsx +57 -47
  32. package/src/movethewheels/types/index.ts +5 -0
@@ -12,32 +12,30 @@ import { SquarePen as l } from "../node_modules/lucide-react/dist/esm/icons/squa
12
12
  import { Trash2 as u } from "../node_modules/lucide-react/dist/esm/icons/trash-2.js";
13
13
  import { Zap as d } from "../node_modules/lucide-react/dist/esm/icons/zap.js";
14
14
  import { joinPath as f } from "../utils/navigation.js";
15
- import { useMoveTheWheels as p } from "../providers/MoveTheWheelsProvider.js";
16
- import { useDriver as m, useFleet as h, useVehicle as g } from "../hooks/useFleet.js";
17
- import { useRoute as _, useRoutes as te } from "../hooks/useRoutes.js";
15
+ import { useMoveTheWheels as te } from "../providers/MoveTheWheelsProvider.js";
16
+ import { useRoute as p, useRoutes as m } from "../hooks/useRoutes.js";
17
+ import { useDriver as h, useDrivers as ne, useVehicle as g, useVehicles as _ } from "../hooks/useFleet.js";
18
18
  import { Badge as v, Button as y, Card as b, CardContent as x, CardHeader as S, CardTitle as C, Input as w, Label as T, Select as E, SelectContent as D, SelectItem as O, SelectTrigger as k, SelectValue as A } from "../components/ui.js";
19
- import { ErrorState as ne, LoadingState as re, PageLayout as ie } from "../components/PageLayout.js";
20
- import { RouteMap as ae } from "../components/maps/RouteMap.js";
19
+ import { ErrorState as re, LoadingState as j, PageLayout as ie } from "../components/PageLayout.js";
20
+ import { RouteMap as M } from "../components/maps/RouteMap.js";
21
21
  import "../components/maps/index.js";
22
- import { ROUTE_STATUS_COLORS as j } from "../constants/index.js";
23
- import { StatusBadge as M } from "../components/StatusBadge.js";
24
- import { FormError as oe } from "../components/FormError.js";
25
- import { Notice as N, useNotice as P } from "../components/Notice.js";
26
- import { formatAddress as F, formatCurrency as I, formatDate as L } from "../utils/formatters.js";
22
+ import { ROUTE_STATUS_COLORS as N } from "../constants/index.js";
23
+ import { StatusBadge as P } from "../components/StatusBadge.js";
24
+ import { FormError as ae } from "../components/FormError.js";
25
+ import { Notice as oe, useNotice as F } from "../components/Notice.js";
26
+ import { formatAddress as I, formatCurrency as se, formatDate as L } from "../utils/formatters.js";
27
27
  import { useDebouncedValue as R } from "../hooks/useDebouncedValue.js";
28
- import { firstRealLatLng as z } from "../utils/mapMarkers.js";
29
- import { useAssignmentSuggestions as B } from "../hooks/useFleetIntelligence.js";
30
- import { AssignmentSuggestions as V } from "../components/AssignmentSuggestions.js";
31
- import { useEffect as H, useState as U } from "react";
32
- import { useLocation as W, useParams as G } from "react-router";
33
- import { jsx as K, jsxs as q } from "react/jsx-runtime";
34
- import { useI18n as se } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
28
+ import { EntityCombobox as z } from "../components/EntityCombobox.js";
29
+ import { firstRealLatLng as B } from "../utils/mapMarkers.js";
30
+ import { useAssignmentSuggestions as V } from "../hooks/useFleetIntelligence.js";
31
+ import { AssignmentSuggestions as H } from "../components/AssignmentSuggestions.js";
32
+ import { useEffect as U, useState as W } from "react";
33
+ import { useLocation as G, useParams as K } from "react-router";
34
+ import { Fragment as q, jsx as J, jsxs as Y } from "react/jsx-runtime";
35
+ import { useI18n as X } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
35
36
  import { EmphasisPanel as ce, NextSteps as le, PagePurpose as ue } from "@burdenoff/fe-libs/ui";
36
37
  //#region src/movethewheels/pages/RouteDetailsPage.tsx
37
- function J(e, t) {
38
- return !t || e.some((e) => e.id === t.id) ? e : [t, ...e];
39
- }
40
- var Y = [
38
+ var de = [
41
39
  {
42
40
  value: "planned",
43
41
  label: "Planned"
@@ -55,11 +53,8 @@ var Y = [
55
53
  label: "Cancelled"
56
54
  }
57
55
  ];
58
- function X({ editId: r }) {
59
- let { basePath: i, navigate: a } = p(), { createRoute: ee, updateRoute: l } = te(), { route: d } = _(r), [v, ne] = U(""), { vehicles: re, drivers: ae } = h({
60
- limit: 20,
61
- filters: { search: R(v) || void 0 }
62
- }), j = !!r, [M, N] = U({
56
+ function Z({ editId: r }) {
57
+ let { basePath: i, navigate: a } = te(), { createRoute: ee, updateRoute: l } = m(), { route: d } = p(r), [v, re] = W(""), j = R(v), M = !!r, [N, P] = W({
63
58
  name: "",
64
59
  status: "planned",
65
60
  vehicleId: "",
@@ -68,15 +63,23 @@ function X({ editId: r }) {
68
63
  address: "",
69
64
  type: "delivery"
70
65
  }]
71
- }), { vehicle: P } = g(M.vehicleId || void 0), { driver: I } = m(M.driverId || void 0), L = J(re, P), z = J(ae, I), [B, V] = U(!1), [W, G] = U(null);
72
- H(() => {
73
- !r || !d || N({
66
+ }), { vehicles: oe, isLoading: F } = _({
67
+ limit: 20,
68
+ search: j || void 0,
69
+ driverId: N.driverId || void 0
70
+ }), { drivers: se, isLoading: L } = ne({
71
+ limit: 20,
72
+ search: j || void 0,
73
+ vehicleId: N.vehicleId || void 0
74
+ }), { vehicle: B, isLoading: V } = g(N.vehicleId || void 0), { driver: H, isLoading: G } = h(N.driverId || void 0), [K, X] = W(!1), [le, Z] = W(null);
75
+ U(() => {
76
+ !r || !d || P({
74
77
  name: d.name || "",
75
78
  status: d.status,
76
79
  vehicleId: d.vehicleId || "",
77
80
  driverId: d.driverId || "",
78
81
  stops: d.stops.length > 0 ? d.stops.map((e) => ({
79
- address: F(e.address) || e.address.street || "",
82
+ address: I(e.address) || e.address.street || "",
80
83
  type: e.type
81
84
  })) : [{
82
85
  address: "",
@@ -84,22 +87,22 @@ function X({ editId: r }) {
84
87
  }]
85
88
  });
86
89
  }, [r, d]);
87
- let se = () => a?.(f(i, "routes")), le = () => N((e) => ({
90
+ let Q = () => a?.(f(i, "routes")), fe = () => P((e) => ({
88
91
  ...e,
89
92
  stops: [...e.stops, {
90
93
  address: "",
91
94
  type: "delivery"
92
95
  }]
93
- })), X = (e) => N((t) => ({
96
+ })), $ = (e) => P((t) => ({
94
97
  ...t,
95
98
  stops: t.stops.filter((t, n) => n !== e)
96
- })), Z = (e, t, n) => N((r) => ({
99
+ })), pe = (e, t, n) => P((r) => ({
97
100
  ...r,
98
101
  stops: r.stops.map((r, i) => i === e ? {
99
102
  ...r,
100
103
  [t]: n
101
104
  } : r)
102
- })), Q = (e, t) => N((n) => {
105
+ })), me = (e, t) => P((n) => {
103
106
  let r = e + t;
104
107
  if (r < 0 || r >= n.stops.length) return n;
105
108
  let i = [...n.stops];
@@ -107,17 +110,17 @@ function X({ editId: r }) {
107
110
  ...n,
108
111
  stops: i
109
112
  };
110
- }), $ = async (e) => {
111
- if (e.preventDefault(), !M.name.trim()) {
112
- G("Route name is required.");
113
+ }), he = async (e) => {
114
+ if (e.preventDefault(), !N.name.trim()) {
115
+ Z("Route name is required.");
113
116
  return;
114
117
  }
115
- let t = M.stops.filter((e) => e.address.trim());
118
+ let t = N.stops.filter((e) => e.address.trim());
116
119
  if (t.length === 0) {
117
- G("Add at least one stop with an address.");
120
+ Z("Add at least one stop with an address.");
118
121
  return;
119
122
  }
120
- V(!0), G(null);
123
+ X(!0), Z(null);
121
124
  try {
122
125
  let e = t.map((e, t) => ({
123
126
  id: `stop-${t + 1}`,
@@ -135,254 +138,262 @@ function X({ editId: r }) {
135
138
  duration: 0,
136
139
  status: "pending"
137
140
  }));
138
- if (j) {
141
+ if (M) {
139
142
  let t = await l(r, {
140
- name: M.name.trim(),
141
- status: M.status,
142
- vehicleId: M.vehicleId || void 0,
143
- driverId: M.driverId || void 0,
143
+ name: N.name.trim(),
144
+ status: N.status,
145
+ vehicleId: N.vehicleId || void 0,
146
+ driverId: N.driverId || void 0,
144
147
  stops: e
145
148
  });
146
149
  a?.(f(i, `routes/${t.id}`));
147
150
  return;
148
151
  }
149
152
  let n = await ee({
150
- name: M.name.trim(),
151
- status: M.status,
152
- vehicleId: M.vehicleId || void 0,
153
- driverId: M.driverId || void 0,
153
+ name: N.name.trim(),
154
+ status: N.status,
155
+ vehicleId: N.vehicleId || void 0,
156
+ driverId: N.driverId || void 0,
154
157
  stops: e
155
158
  });
156
159
  a?.(f(i, `routes/${n.id}`));
157
160
  } catch (e) {
158
- console.error("Failed to create route:", e), G(e instanceof Error ? e.message : "Failed to create route. Please try again."), V(!1);
161
+ console.error("Failed to create route:", e), Z(e instanceof Error ? e.message : "Failed to create route. Please try again."), X(!1);
159
162
  }
160
163
  };
161
- return /* @__PURE__ */ q(ie, {
162
- title: j ? "Edit Route" : "Create Route",
164
+ return /* @__PURE__ */ Y(ie, {
165
+ title: M ? "Edit Route" : "Create Route",
163
166
  subtitle: "Plan a new delivery route",
164
- icon: /* @__PURE__ */ K(o, { size: 24 }),
165
- headerActions: /* @__PURE__ */ q("div", {
167
+ icon: /* @__PURE__ */ J(o, { size: 24 }),
168
+ headerActions: /* @__PURE__ */ Y("div", {
166
169
  className: "flex gap-2",
167
- children: [/* @__PURE__ */ q(y, {
170
+ children: [/* @__PURE__ */ Y(y, {
168
171
  variant: "outline",
169
- onClick: se,
170
- disabled: B,
171
- children: [/* @__PURE__ */ K(t, { size: 16 }), " Cancel"]
172
- }), /* @__PURE__ */ q(y, {
173
- onClick: $,
174
- disabled: B,
172
+ onClick: Q,
173
+ disabled: K,
174
+ children: [/* @__PURE__ */ J(t, { size: 16 }), " Cancel"]
175
+ }), /* @__PURE__ */ Y(y, {
176
+ onClick: he,
177
+ disabled: K,
175
178
  children: [
176
- /* @__PURE__ */ K(c, { size: 16 }),
179
+ /* @__PURE__ */ J(c, { size: 16 }),
177
180
  " ",
178
- j ? B ? "Saving..." : "Save Changes" : B ? "Saving..." : "Create Route"
181
+ M ? K ? "Saving..." : "Save Changes" : K ? "Saving..." : "Create Route"
179
182
  ]
180
183
  })]
181
184
  }),
182
- children: [/* @__PURE__ */ K(ue, {
183
- icon: /* @__PURE__ */ K(o, { size: 18 }),
185
+ children: [/* @__PURE__ */ J(ue, {
186
+ icon: /* @__PURE__ */ J(o, { size: 18 }),
184
187
  children: "Plan a new delivery route — name it, list the stops to visit, and optionally assign a vehicle and driver. Once created you can optimize it to sequence the stops into the shortest run."
185
- }), /* @__PURE__ */ q("form", {
186
- onSubmit: $,
188
+ }), /* @__PURE__ */ Y("form", {
189
+ onSubmit: he,
187
190
  className: "max-w-3xl space-y-6",
188
191
  children: [
189
- /* @__PURE__ */ K(oe, { message: W }),
190
- /* @__PURE__ */ q(ce, { children: [/* @__PURE__ */ K("h2", {
192
+ /* @__PURE__ */ J(ae, { message: le }),
193
+ /* @__PURE__ */ Y(ce, { children: [/* @__PURE__ */ J("h2", {
191
194
  className: "text-base font-semibold text-text-primary mb-4",
192
195
  children: "Route Details"
193
- }), /* @__PURE__ */ q("div", {
196
+ }), /* @__PURE__ */ Y("div", {
194
197
  className: "space-y-4",
195
198
  children: [
196
- /* @__PURE__ */ q("div", {
199
+ /* @__PURE__ */ Y("div", {
197
200
  className: "grid grid-cols-1 md:grid-cols-2 gap-4",
198
- children: [/* @__PURE__ */ q("div", {
201
+ children: [/* @__PURE__ */ Y("div", {
199
202
  className: "space-y-2",
200
- children: [/* @__PURE__ */ q(T, {
203
+ children: [/* @__PURE__ */ Y(T, {
201
204
  htmlFor: "name",
202
- children: ["Route Name ", /* @__PURE__ */ K("span", {
205
+ children: ["Route Name ", /* @__PURE__ */ J("span", {
203
206
  className: "text-status-error-text",
204
207
  children: "*"
205
208
  })]
206
- }), /* @__PURE__ */ K(w, {
209
+ }), /* @__PURE__ */ J(w, {
207
210
  id: "name",
208
- value: M.name,
209
- onChange: (e) => N((t) => ({
211
+ value: N.name,
212
+ onChange: (e) => P((t) => ({
210
213
  ...t,
211
214
  name: e.target.value
212
215
  })),
213
216
  placeholder: "Downtown morning run",
214
217
  required: !0
215
218
  })]
216
- }), /* @__PURE__ */ q("div", {
219
+ }), /* @__PURE__ */ Y("div", {
217
220
  className: "space-y-2",
218
- children: [/* @__PURE__ */ K(T, {
221
+ children: [/* @__PURE__ */ J(T, {
219
222
  htmlFor: "status",
220
223
  children: "Status"
221
- }), /* @__PURE__ */ q(E, {
222
- value: M.status,
223
- onValueChange: (e) => N((t) => ({
224
+ }), /* @__PURE__ */ Y(E, {
225
+ value: N.status,
226
+ onValueChange: (e) => P((t) => ({
224
227
  ...t,
225
228
  status: e
226
229
  })),
227
- children: [/* @__PURE__ */ K(k, {
230
+ children: [/* @__PURE__ */ J(k, {
228
231
  id: "status",
229
- children: /* @__PURE__ */ K(A, {})
230
- }), /* @__PURE__ */ K(D, { children: Y.map((e) => /* @__PURE__ */ K(O, {
232
+ children: /* @__PURE__ */ J(A, {})
233
+ }), /* @__PURE__ */ J(D, { children: de.map((e) => /* @__PURE__ */ J(O, {
231
234
  value: e.value,
232
235
  children: e.label
233
236
  }, e.value)) })]
234
237
  })]
235
238
  })]
236
239
  }),
237
- /* @__PURE__ */ q("div", {
240
+ /* @__PURE__ */ Y("div", {
238
241
  className: "space-y-2",
239
- children: [/* @__PURE__ */ K(T, {
242
+ children: [/* @__PURE__ */ J(T, {
240
243
  htmlFor: "fleet-search",
241
244
  children: "Search fleet"
242
- }), /* @__PURE__ */ K(w, {
245
+ }), /* @__PURE__ */ J(w, {
243
246
  id: "fleet-search",
244
247
  value: v,
245
- onChange: (e) => ne(e.target.value),
248
+ onChange: (e) => re(e.target.value),
246
249
  placeholder: "Vehicle number, driver name or ID"
247
250
  })]
248
251
  }),
249
- /* @__PURE__ */ q("div", {
252
+ /* @__PURE__ */ Y("div", {
250
253
  className: "grid grid-cols-1 md:grid-cols-2 gap-4",
251
- children: [/* @__PURE__ */ q("div", {
254
+ children: [/* @__PURE__ */ Y("div", {
252
255
  className: "space-y-2",
253
- children: [/* @__PURE__ */ K(T, {
256
+ children: [/* @__PURE__ */ J(T, {
254
257
  htmlFor: "vehicle",
255
258
  children: "Vehicle (optional)"
256
- }), /* @__PURE__ */ q(E, {
257
- value: M.vehicleId,
258
- onValueChange: (e) => N((t) => ({
259
+ }), /* @__PURE__ */ J(z, {
260
+ id: "vehicle",
261
+ value: N.vehicleId,
262
+ onChange: (e) => P((t) => ({
259
263
  ...t,
260
264
  vehicleId: e
261
265
  })),
262
- children: [/* @__PURE__ */ K(k, {
263
- id: "vehicle",
264
- children: /* @__PURE__ */ K(A, { placeholder: "Assign later" })
265
- }), /* @__PURE__ */ K(D, { children: L.map((e) => /* @__PURE__ */ q(O, {
266
- value: e.id,
267
- children: [
268
- e.vehicleNumber,
269
- " (",
270
- e.type,
271
- ")"
272
- ]
273
- }, e.id)) })]
266
+ options: oe,
267
+ loading: F,
268
+ getId: (e) => e.id,
269
+ getLabel: (e) => `${e.vehicleNumber} (${e.type})`,
270
+ renderOption: (e) => /* @__PURE__ */ Y(q, { children: [
271
+ e.vehicleNumber,
272
+ " (",
273
+ e.type,
274
+ ")"
275
+ ] }),
276
+ selectedOption: B,
277
+ selectedLoading: V,
278
+ required: !0,
279
+ placeholder: "Assign later",
280
+ emptyText: "No available vehicles."
274
281
  })]
275
- }), /* @__PURE__ */ q("div", {
282
+ }), /* @__PURE__ */ Y("div", {
276
283
  className: "space-y-2",
277
- children: [/* @__PURE__ */ K(T, {
284
+ children: [/* @__PURE__ */ J(T, {
278
285
  htmlFor: "driver",
279
286
  children: "Driver (optional)"
280
- }), /* @__PURE__ */ q(E, {
281
- value: M.driverId,
282
- onValueChange: (e) => N((t) => ({
287
+ }), /* @__PURE__ */ J(z, {
288
+ id: "driver",
289
+ value: N.driverId,
290
+ onChange: (e) => P((t) => ({
283
291
  ...t,
284
292
  driverId: e
285
293
  })),
286
- children: [/* @__PURE__ */ K(k, {
287
- id: "driver",
288
- children: /* @__PURE__ */ K(A, { placeholder: "Assign later" })
289
- }), /* @__PURE__ */ K(D, { children: z.map((e) => /* @__PURE__ */ q(O, {
290
- value: e.id,
291
- children: [
292
- e.fullName,
293
- " (",
294
- e.employeeId,
295
- ")"
296
- ]
297
- }, e.id)) })]
294
+ options: se,
295
+ loading: L,
296
+ getId: (e) => e.id,
297
+ getLabel: (e) => `${e.fullName} (${e.employeeId})`,
298
+ renderOption: (e) => /* @__PURE__ */ Y(q, { children: [
299
+ e.fullName,
300
+ " (",
301
+ e.employeeId,
302
+ ")"
303
+ ] }),
304
+ selectedOption: H,
305
+ selectedLoading: G,
306
+ required: !0,
307
+ placeholder: "Assign later",
308
+ emptyText: "No available drivers."
298
309
  })]
299
310
  })]
300
311
  })
301
312
  ]
302
313
  })] }),
303
- /* @__PURE__ */ q(b, { children: [/* @__PURE__ */ q(S, {
314
+ /* @__PURE__ */ Y(b, { children: [/* @__PURE__ */ Y(S, {
304
315
  className: "flex flex-row items-center justify-between",
305
- children: [/* @__PURE__ */ q(C, { children: ["Stops ", /* @__PURE__ */ K("span", {
316
+ children: [/* @__PURE__ */ Y(C, { children: ["Stops ", /* @__PURE__ */ J("span", {
306
317
  className: "text-status-error-text",
307
318
  children: "*"
308
- })] }), /* @__PURE__ */ q(y, {
319
+ })] }), /* @__PURE__ */ Y(y, {
309
320
  type: "button",
310
321
  variant: "outline",
311
322
  size: "sm",
312
- onClick: le,
313
- children: [/* @__PURE__ */ K(s, { size: 16 }), " Add Stop"]
323
+ onClick: fe,
324
+ children: [/* @__PURE__ */ J(s, { size: 16 }), " Add Stop"]
314
325
  })]
315
- }), /* @__PURE__ */ K(x, {
326
+ }), /* @__PURE__ */ J(x, {
316
327
  className: "space-y-4",
317
- children: M.stops.map((t, r) => /* @__PURE__ */ q("div", {
328
+ children: N.stops.map((t, r) => /* @__PURE__ */ Y("div", {
318
329
  className: "grid grid-cols-1 md:grid-cols-12 gap-3 items-end",
319
330
  children: [
320
- /* @__PURE__ */ q("div", {
331
+ /* @__PURE__ */ Y("div", {
321
332
  className: "md:col-span-7 space-y-2",
322
- children: [/* @__PURE__ */ q(T, {
333
+ children: [/* @__PURE__ */ Y(T, {
323
334
  htmlFor: `stop-address-${r}`,
324
335
  children: [
325
336
  "Stop ",
326
337
  r + 1,
327
338
  " address"
328
339
  ]
329
- }), /* @__PURE__ */ K(w, {
340
+ }), /* @__PURE__ */ J(w, {
330
341
  id: `stop-address-${r}`,
331
342
  value: t.address,
332
- onChange: (e) => Z(r, "address", e.target.value),
343
+ onChange: (e) => pe(r, "address", e.target.value),
333
344
  placeholder: "123 Main St, San Francisco, CA"
334
345
  })]
335
346
  }),
336
- /* @__PURE__ */ q("div", {
347
+ /* @__PURE__ */ Y("div", {
337
348
  className: "md:col-span-4 space-y-2",
338
- children: [/* @__PURE__ */ K(T, {
349
+ children: [/* @__PURE__ */ J(T, {
339
350
  htmlFor: `stop-type-${r}`,
340
351
  children: "Type"
341
- }), /* @__PURE__ */ q(E, {
352
+ }), /* @__PURE__ */ Y(E, {
342
353
  value: t.type,
343
- onValueChange: (e) => Z(r, "type", e),
344
- children: [/* @__PURE__ */ K(k, {
354
+ onValueChange: (e) => pe(r, "type", e),
355
+ children: [/* @__PURE__ */ J(k, {
345
356
  id: `stop-type-${r}`,
346
- children: /* @__PURE__ */ K(A, {})
347
- }), /* @__PURE__ */ q(D, { children: [/* @__PURE__ */ K(O, {
357
+ children: /* @__PURE__ */ J(A, {})
358
+ }), /* @__PURE__ */ Y(D, { children: [/* @__PURE__ */ J(O, {
348
359
  value: "pickup",
349
360
  children: "Pickup"
350
- }), /* @__PURE__ */ K(O, {
361
+ }), /* @__PURE__ */ J(O, {
351
362
  value: "delivery",
352
363
  children: "Delivery"
353
364
  })] })]
354
365
  })]
355
366
  }),
356
- /* @__PURE__ */ q("div", {
367
+ /* @__PURE__ */ Y("div", {
357
368
  className: "md:col-span-1 flex justify-end gap-1",
358
369
  children: [
359
- /* @__PURE__ */ K(y, {
370
+ /* @__PURE__ */ J(y, {
360
371
  type: "button",
361
372
  variant: "ghost",
362
373
  size: "icon",
363
- onClick: () => Q(r, -1),
374
+ onClick: () => me(r, -1),
364
375
  disabled: r === 0,
365
376
  "aria-label": `Move stop ${r + 1} up`,
366
- children: /* @__PURE__ */ K(n, { size: 16 })
377
+ children: /* @__PURE__ */ J(n, { size: 16 })
367
378
  }),
368
- /* @__PURE__ */ K(y, {
379
+ /* @__PURE__ */ J(y, {
369
380
  type: "button",
370
381
  variant: "ghost",
371
382
  size: "icon",
372
- onClick: () => Q(r, 1),
373
- disabled: r === M.stops.length - 1,
383
+ onClick: () => me(r, 1),
384
+ disabled: r === N.stops.length - 1,
374
385
  "aria-label": `Move stop ${r + 1} down`,
375
- children: /* @__PURE__ */ K(e, { size: 16 })
386
+ children: /* @__PURE__ */ J(e, { size: 16 })
376
387
  }),
377
- /* @__PURE__ */ K(y, {
388
+ /* @__PURE__ */ J(y, {
378
389
  type: "button",
379
390
  variant: "ghost",
380
391
  size: "icon",
381
392
  className: "text-status-error-text",
382
- onClick: () => X(r),
383
- disabled: M.stops.length === 1,
393
+ onClick: () => $(r),
394
+ disabled: N.stops.length === 1,
384
395
  "aria-label": `Remove stop ${r + 1}`,
385
- children: /* @__PURE__ */ K(u, { size: 16 })
396
+ children: /* @__PURE__ */ J(u, { size: 16 })
386
397
  })
387
398
  ]
388
399
  })
@@ -393,186 +404,186 @@ function X({ editId: r }) {
393
404
  })]
394
405
  });
395
406
  }
396
- function Z() {
397
- let { routeId: e } = G(), n = W().pathname.endsWith("/edit"), { basePath: s, navigate: c } = p(), { route: u, isLoading: m, error: h, refetch: g } = _(e), { optimizeRoute: w, updateRoute: T } = te(), E = B(e), { t: D } = se(), O = (e, t) => {
398
- let n = D(e);
407
+ function Q() {
408
+ let { routeId: e } = K(), n = G().pathname.endsWith("/edit"), { basePath: s, navigate: c } = te(), { route: u, isLoading: h, error: ne, refetch: g } = p(e), { optimizeRoute: _, updateRoute: w } = m(), T = V(e), { t: E } = X(), D = (e, t) => {
409
+ let n = E(e);
399
410
  return n === e ? t : n;
400
- }, { message: k, notify: A } = P(), [R, H] = U(null), [J, Y] = U(!1), Z = () => c?.(f(s, "routes")), Q = (e) => c?.(f(s, e)), $ = async () => {
411
+ }, { message: O, notify: k } = F(), [A, R] = W(null), [z, U] = W(!1), q = () => c?.(f(s, "routes")), de = (e) => c?.(f(s, e)), Q = async () => {
401
412
  if (e) {
402
- Y(!0), H(null);
413
+ U(!0), R(null);
403
414
  try {
404
- await w(e), A("Route optimized — stops resequenced for the shortest run."), g();
415
+ await _(e), k("Route optimized — stops resequenced for the shortest run."), g();
405
416
  } catch (e) {
406
- H(e instanceof Error ? e.message : "Failed to optimize route.");
417
+ R(e instanceof Error ? e.message : "Failed to optimize route.");
407
418
  } finally {
408
- Y(!1);
419
+ U(!1);
409
420
  }
410
421
  }
411
- }, de = async (t) => {
412
- e && (await T(e, t), A(O("movethewheels.routes.suggest.done", "Assignment saved.")), g(), E.refetch());
422
+ }, fe = async (t) => {
423
+ e && (await w(e, t), k(D("movethewheels.routes.suggest.done", "Assignment saved.")), g(), T.refetch());
413
424
  };
414
- if (!e) return /* @__PURE__ */ K(X, {});
415
- if (n) return /* @__PURE__ */ K(X, { editId: e });
416
- if (m) return /* @__PURE__ */ K(re, { message: "Loading route details..." });
417
- if (h || !u) return /* @__PURE__ */ K(ne, {
425
+ if (!e) return /* @__PURE__ */ J(Z, {});
426
+ if (n) return /* @__PURE__ */ J(Z, { editId: e });
427
+ if (h) return /* @__PURE__ */ J(j, { message: "Loading route details..." });
428
+ if (ne || !u) return /* @__PURE__ */ J(re, {
418
429
  title: "Route not found",
419
430
  onRetry: g
420
431
  });
421
- let fe = u.stops.map((e) => {
422
- let t = z(e.address);
432
+ let $ = u.stops.map((e) => {
433
+ let t = B(e.address);
423
434
  return t ? {
424
435
  lat: t.lat,
425
436
  lng: t.lng,
426
437
  sequence: e.sequence,
427
- label: F(e.address) || `Order #${e.orderId || e.sequence}`
438
+ label: I(e.address) || `Order #${e.orderId || e.sequence}`
428
439
  } : null;
429
440
  }).filter((e) => e !== null);
430
- return /* @__PURE__ */ q(ie, {
441
+ return /* @__PURE__ */ Y(ie, {
431
442
  title: u.name,
432
443
  subtitle: `${u.stops.length} stops - ${u.distance.toFixed(1)} km`,
433
- icon: /* @__PURE__ */ K(o, { size: 24 }),
434
- headerActions: /* @__PURE__ */ q("div", {
444
+ icon: /* @__PURE__ */ J(o, { size: 24 }),
445
+ headerActions: /* @__PURE__ */ Y("div", {
435
446
  className: "flex gap-2",
436
447
  children: [
437
- /* @__PURE__ */ q(y, {
448
+ /* @__PURE__ */ Y(y, {
438
449
  variant: "outline",
439
- onClick: Z,
440
- children: [/* @__PURE__ */ K(t, { size: 16 }), " Back"]
450
+ onClick: q,
451
+ children: [/* @__PURE__ */ J(t, { size: 16 }), " Back"]
441
452
  }),
442
- !u.optimized && /* @__PURE__ */ q(y, {
453
+ !u.optimized && /* @__PURE__ */ Y(y, {
443
454
  variant: "outline",
444
- onClick: $,
445
- disabled: J,
455
+ onClick: Q,
456
+ disabled: z,
446
457
  children: [
447
- /* @__PURE__ */ K(d, { size: 16 }),
458
+ /* @__PURE__ */ J(d, { size: 16 }),
448
459
  " ",
449
- J ? "Optimizing…" : "Optimize"
460
+ z ? "Optimizing…" : "Optimize"
450
461
  ]
451
462
  }),
452
- /* @__PURE__ */ q(y, {
463
+ /* @__PURE__ */ Y(y, {
453
464
  onClick: () => c?.(f(s, `routes/${e}/edit`)),
454
- children: [/* @__PURE__ */ K(l, { size: 16 }), " Edit"]
465
+ children: [/* @__PURE__ */ J(l, { size: 16 }), " Edit"]
455
466
  })
456
467
  ]
457
468
  }),
458
- headerContent: /* @__PURE__ */ q("div", {
469
+ headerContent: /* @__PURE__ */ Y("div", {
459
470
  className: "flex gap-2",
460
- children: [/* @__PURE__ */ K(M, {
471
+ children: [/* @__PURE__ */ J(P, {
461
472
  status: u.status,
462
- customColors: j[u.status]
463
- }), /* @__PURE__ */ K(v, {
473
+ customColors: N[u.status]
474
+ }), /* @__PURE__ */ J(v, {
464
475
  variant: u.optimized ? "default" : "secondary",
465
476
  children: u.optimized ? "Optimized" : "Not Optimized"
466
477
  })]
467
478
  }),
468
479
  children: [
469
- /* @__PURE__ */ K(ue, {
470
- icon: /* @__PURE__ */ K(o, { size: 18 }),
480
+ /* @__PURE__ */ J(ue, {
481
+ icon: /* @__PURE__ */ J(o, { size: 18 }),
471
482
  children: "A single optimized driving plan that chains together this route's stops. Review the sequence, distance and timing here, re-optimize if traffic or stops change, then hand the itinerary to a driver."
472
483
  }),
473
- /* @__PURE__ */ K(le, {
484
+ /* @__PURE__ */ J(le, {
474
485
  storageKey: "movethewheels-route-details",
475
486
  steps: [
476
487
  ...u.optimized ? [] : [{
477
488
  id: "optimize",
478
489
  label: "Optimize this route",
479
490
  description: "Reorder stops to cut distance and driving time.",
480
- icon: /* @__PURE__ */ K(d, { size: 16 }),
481
- onClick: $
491
+ icon: /* @__PURE__ */ J(d, { size: 16 }),
492
+ onClick: Q
482
493
  }],
483
494
  {
484
495
  id: "edit",
485
496
  label: "Adjust stops",
486
497
  description: "Add, remove or reorder the delivery stops.",
487
- icon: /* @__PURE__ */ K(l, { size: 16 }),
498
+ icon: /* @__PURE__ */ J(l, { size: 16 }),
488
499
  onClick: () => {}
489
500
  },
490
501
  {
491
502
  id: "orders",
492
503
  label: "Review the orders on this route",
493
504
  description: "Check the deliveries bundled into this run.",
494
- icon: /* @__PURE__ */ K(ee, { size: 16 }),
495
- onClick: () => Q("orders")
505
+ icon: /* @__PURE__ */ J(ee, { size: 16 }),
506
+ onClick: () => de("orders")
496
507
  }
497
508
  ]
498
509
  }),
499
- R && /* @__PURE__ */ K("div", {
510
+ A && /* @__PURE__ */ J("div", {
500
511
  className: "mb-2",
501
- children: /* @__PURE__ */ K(oe, { message: R })
512
+ children: /* @__PURE__ */ J(ae, { message: A })
502
513
  }),
503
- k && /* @__PURE__ */ K("div", {
514
+ O && /* @__PURE__ */ J("div", {
504
515
  className: "mb-2",
505
- children: /* @__PURE__ */ K(N, { message: k })
516
+ children: /* @__PURE__ */ J(oe, { message: O })
506
517
  }),
507
- /* @__PURE__ */ q("div", {
518
+ /* @__PURE__ */ Y("div", {
508
519
  className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
509
- children: [/* @__PURE__ */ q("div", {
520
+ children: [/* @__PURE__ */ Y("div", {
510
521
  className: "lg:col-span-2 space-y-6",
511
- children: [/* @__PURE__ */ q(b, { children: [/* @__PURE__ */ K(S, { children: /* @__PURE__ */ K(C, { children: "Route Map" }) }), /* @__PURE__ */ K(x, { children: fe.length > 0 ? /* @__PURE__ */ K(ae, {
522
+ children: [/* @__PURE__ */ Y(b, { children: [/* @__PURE__ */ J(S, { children: /* @__PURE__ */ J(C, { children: "Route Map" }) }), /* @__PURE__ */ J(x, { children: $.length > 0 ? /* @__PURE__ */ J(M, {
512
523
  className: "overflow-hidden rounded-lg border border-border-seam",
513
524
  height: 360,
514
- stops: fe
515
- }) : /* @__PURE__ */ q("div", {
525
+ stops: $
526
+ }) : /* @__PURE__ */ Y("div", {
516
527
  className: "rounded-lg border border-border-seam bg-bg-sunken/40 p-4",
517
- children: [/* @__PURE__ */ K("p", {
528
+ children: [/* @__PURE__ */ J("p", {
518
529
  className: "mb-3 text-sm text-text-secondary",
519
530
  children: "These stops don't have map coordinates yet — showing the planned sequence instead."
520
- }), /* @__PURE__ */ K("ol", {
531
+ }), /* @__PURE__ */ J("ol", {
521
532
  className: "space-y-2",
522
- children: u.stops.map((e) => /* @__PURE__ */ q("li", {
533
+ children: u.stops.map((e) => /* @__PURE__ */ Y("li", {
523
534
  className: "flex items-start gap-3",
524
- children: [/* @__PURE__ */ K("span", {
535
+ children: [/* @__PURE__ */ J("span", {
525
536
  className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-action-primary-bg/10 text-xs font-semibold text-primary",
526
537
  children: e.sequence
527
- }), /* @__PURE__ */ K("span", {
538
+ }), /* @__PURE__ */ J("span", {
528
539
  className: "text-sm",
529
- children: F(e.address) || `Order #${e.orderId || e.sequence}`
540
+ children: I(e.address) || `Order #${e.orderId || e.sequence}`
530
541
  })]
531
542
  }, e.id))
532
543
  })]
533
- }) })] }), /* @__PURE__ */ q(b, { children: [/* @__PURE__ */ K(S, { children: /* @__PURE__ */ q(C, { children: [
544
+ }) })] }), /* @__PURE__ */ Y(b, { children: [/* @__PURE__ */ J(S, { children: /* @__PURE__ */ Y(C, { children: [
534
545
  "Stops (",
535
546
  u.stops.length,
536
547
  ")"
537
- ] }) }), /* @__PURE__ */ K(x, { children: /* @__PURE__ */ K("div", {
548
+ ] }) }), /* @__PURE__ */ J(x, { children: /* @__PURE__ */ J("div", {
538
549
  className: "space-y-4",
539
- children: u.stops.map((e, t) => /* @__PURE__ */ q("div", {
550
+ children: u.stops.map((e, t) => /* @__PURE__ */ Y("div", {
540
551
  className: "flex gap-4",
541
- children: [/* @__PURE__ */ q("div", {
552
+ children: [/* @__PURE__ */ Y("div", {
542
553
  className: "relative",
543
- children: [/* @__PURE__ */ K("div", {
554
+ children: [/* @__PURE__ */ J("div", {
544
555
  className: `w-8 h-8 rounded-full flex items-center justify-center ${e.status === "completed" ? "bg-status-success-text text-text-inverse" : "bg-bg-sunken"}`,
545
- children: e.status === "completed" ? /* @__PURE__ */ K(r, { size: 16 }) : e.sequence
546
- }), t < u.stops.length - 1 && /* @__PURE__ */ K("div", { className: "absolute top-8 left-4 w-px h-12 bg-border" })]
547
- }), /* @__PURE__ */ K("div", {
556
+ children: e.status === "completed" ? /* @__PURE__ */ J(r, { size: 16 }) : e.sequence
557
+ }), t < u.stops.length - 1 && /* @__PURE__ */ J("div", { className: "absolute top-8 left-4 w-px h-12 bg-border" })]
558
+ }), /* @__PURE__ */ J("div", {
548
559
  className: "flex-1 pb-4",
549
- children: /* @__PURE__ */ q("div", {
560
+ children: /* @__PURE__ */ Y("div", {
550
561
  className: "flex items-center justify-between",
551
- children: [/* @__PURE__ */ q("div", { children: [/* @__PURE__ */ q("div", {
562
+ children: [/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ Y("div", {
552
563
  className: "flex items-center gap-2",
553
- children: [/* @__PURE__ */ K(v, {
564
+ children: [/* @__PURE__ */ J(v, {
554
565
  variant: e.type === "pickup" ? "secondary" : "default",
555
566
  className: "capitalize",
556
567
  children: e.type
557
- }), /* @__PURE__ */ q("span", {
568
+ }), /* @__PURE__ */ Y("span", {
558
569
  className: "font-medium",
559
570
  children: ["Order #", e.orderId]
560
571
  })]
561
- }), /* @__PURE__ */ K("p", {
572
+ }), /* @__PURE__ */ J("p", {
562
573
  className: "text-sm text-text-secondary mt-1",
563
- children: F(e.address)
564
- })] }), /* @__PURE__ */ q("div", {
574
+ children: I(e.address)
575
+ })] }), /* @__PURE__ */ Y("div", {
565
576
  className: "text-right",
566
577
  children: [
567
- /* @__PURE__ */ q("p", {
578
+ /* @__PURE__ */ Y("p", {
568
579
  className: "text-sm",
569
580
  children: ["Scheduled: ", L(e.scheduledTime, "time")]
570
581
  }),
571
- e.actualTime && /* @__PURE__ */ q("p", {
582
+ e.actualTime && /* @__PURE__ */ Y("p", {
572
583
  className: "text-sm text-status-success-text",
573
584
  children: ["Actual: ", L(e.actualTime, "time")]
574
585
  }),
575
- /* @__PURE__ */ q("p", {
586
+ /* @__PURE__ */ Y("p", {
576
587
  className: "text-xs text-text-secondary",
577
588
  children: [e.duration, " min stop"]
578
589
  })
@@ -582,91 +593,91 @@ function Z() {
582
593
  })]
583
594
  }, e.id))
584
595
  }) })] })]
585
- }), /* @__PURE__ */ q("div", {
596
+ }), /* @__PURE__ */ Y("div", {
586
597
  className: "space-y-6",
587
598
  children: [
588
- (u.status === "planned" || u.status === "in_progress") && /* @__PURE__ */ K(V, {
589
- suggestions: E.data,
590
- isLoading: E.isLoading,
591
- error: E.error,
592
- onRetry: E.refetch,
599
+ (u.status === "planned" || u.status === "in_progress") && /* @__PURE__ */ J(H, {
600
+ suggestions: T.data,
601
+ isLoading: T.isLoading,
602
+ error: T.error,
603
+ onRetry: T.refetch,
593
604
  assignedVehicleId: u.vehicleId || void 0,
594
605
  assignedDriverId: u.driverId || void 0,
595
- onAssign: de,
596
- t: O
606
+ onAssign: fe,
607
+ t: D
597
608
  }),
598
- /* @__PURE__ */ q(ce, {
609
+ /* @__PURE__ */ Y(ce, {
599
610
  className: "space-y-4",
600
611
  children: [
601
- /* @__PURE__ */ K("h2", {
612
+ /* @__PURE__ */ J("h2", {
602
613
  className: "text-base font-semibold text-text-primary",
603
614
  children: "Route Info"
604
615
  }),
605
- /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("p", {
616
+ /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
606
617
  className: "text-sm text-text-secondary",
607
618
  children: "Total Distance"
608
- }), /* @__PURE__ */ q("p", {
619
+ }), /* @__PURE__ */ Y("p", {
609
620
  className: "text-2xl font-bold",
610
- children: [u.distance.toFixed(1), /* @__PURE__ */ K("span", {
621
+ children: [u.distance.toFixed(1), /* @__PURE__ */ J("span", {
611
622
  className: "text-sm font-normal",
612
623
  children: " km"
613
624
  })]
614
625
  })] }),
615
- /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("p", {
626
+ /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
616
627
  className: "text-sm text-text-secondary",
617
628
  children: "Est. Duration"
618
- }), /* @__PURE__ */ q("p", {
629
+ }), /* @__PURE__ */ Y("p", {
619
630
  className: "text-2xl font-bold",
620
- children: [u.estimatedDuration, /* @__PURE__ */ K("span", {
631
+ children: [u.estimatedDuration, /* @__PURE__ */ J("span", {
621
632
  className: "text-sm font-normal",
622
633
  children: " min"
623
634
  })]
624
635
  })] }),
625
- u.fuelCost !== void 0 && /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ q("p", {
636
+ u.fuelCost !== void 0 && /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ Y("p", {
626
637
  className: "text-sm text-text-secondary flex items-center gap-1",
627
- children: [/* @__PURE__ */ K(a, { size: 14 }), " Est. Fuel Cost"]
628
- }), /* @__PURE__ */ K("p", {
638
+ children: [/* @__PURE__ */ J(a, { size: 14 }), " Est. Fuel Cost"]
639
+ }), /* @__PURE__ */ J("p", {
629
640
  className: "text-2xl font-bold",
630
- children: I(u.fuelCost)
641
+ children: se(u.fuelCost)
631
642
  })] }),
632
- u.actualDuration && /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("p", {
643
+ u.actualDuration && /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
633
644
  className: "text-sm text-text-secondary",
634
645
  children: "Actual Duration"
635
- }), /* @__PURE__ */ q("p", {
646
+ }), /* @__PURE__ */ Y("p", {
636
647
  className: "text-2xl font-bold",
637
- children: [u.actualDuration, /* @__PURE__ */ K("span", {
648
+ children: [u.actualDuration, /* @__PURE__ */ J("span", {
638
649
  className: "text-sm font-normal",
639
650
  children: " min"
640
651
  })]
641
652
  })] })
642
653
  ]
643
654
  }),
644
- /* @__PURE__ */ q(b, { children: [/* @__PURE__ */ K(S, { children: /* @__PURE__ */ q(C, {
655
+ /* @__PURE__ */ Y(b, { children: [/* @__PURE__ */ J(S, { children: /* @__PURE__ */ Y(C, {
645
656
  className: "flex items-center gap-2",
646
- children: [/* @__PURE__ */ K(i, { size: 18 }), " Timeline"]
647
- }) }), /* @__PURE__ */ q(x, {
657
+ children: [/* @__PURE__ */ J(i, { size: 18 }), " Timeline"]
658
+ }) }), /* @__PURE__ */ Y(x, {
648
659
  className: "space-y-3",
649
660
  children: [
650
- u.startTime && /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("p", {
661
+ u.startTime && /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
651
662
  className: "text-sm text-text-secondary",
652
663
  children: "Started"
653
- }), /* @__PURE__ */ K("p", { children: L(u.startTime, "full") })] }),
654
- u.endTime && /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("p", {
664
+ }), /* @__PURE__ */ J("p", { children: L(u.startTime, "full") })] }),
665
+ u.endTime && /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
655
666
  className: "text-sm text-text-secondary",
656
667
  children: "Completed"
657
- }), /* @__PURE__ */ K("p", { children: L(u.endTime, "full") })] }),
658
- /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("p", {
668
+ }), /* @__PURE__ */ J("p", { children: L(u.endTime, "full") })] }),
669
+ /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
659
670
  className: "text-sm text-text-secondary",
660
671
  children: "Created"
661
- }), /* @__PURE__ */ K("p", { children: L(u.createdAt, "full") })] })
672
+ }), /* @__PURE__ */ J("p", { children: L(u.createdAt, "full") })] })
662
673
  ]
663
674
  })] }),
664
- u.trafficConditions.length > 0 && /* @__PURE__ */ q(b, { children: [/* @__PURE__ */ K(S, { children: /* @__PURE__ */ K(C, { children: "Traffic Conditions" }) }), /* @__PURE__ */ K(x, { children: u.trafficConditions.map((e, t) => /* @__PURE__ */ q("div", {
675
+ u.trafficConditions.length > 0 && /* @__PURE__ */ Y(b, { children: [/* @__PURE__ */ J(S, { children: /* @__PURE__ */ J(C, { children: "Traffic Conditions" }) }), /* @__PURE__ */ J(x, { children: u.trafficConditions.map((e, t) => /* @__PURE__ */ Y("div", {
665
676
  className: `p-2 rounded mb-2 ${e.condition === "severe" ? "bg-status-error-bg-subtle" : (e.condition, "bg-status-warning-bg-subtle")}`,
666
- children: [/* @__PURE__ */ q("p", {
677
+ children: [/* @__PURE__ */ Y("p", {
667
678
  className: "text-sm font-medium capitalize",
668
679
  children: [e.condition, " traffic"]
669
- }), /* @__PURE__ */ q("p", {
680
+ }), /* @__PURE__ */ Y("p", {
670
681
  className: "text-xs text-text-secondary",
671
682
  children: [
672
683
  e.location,
@@ -683,4 +694,4 @@ function Z() {
683
694
  });
684
695
  }
685
696
  //#endregion
686
- export { Z as default };
697
+ export { Q as default };