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