@burdenoff/microfe-movethewheels 2026.925.3 → 2026.929.2

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