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