@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,37 +4,38 @@ import { MapPin as n } from "../node_modules/lucide-react/dist/esm/icons/map-pin
4
4
  import { Package as r } from "../node_modules/lucide-react/dist/esm/icons/package.js";
5
5
  import { Plus as i } from "../node_modules/lucide-react/dist/esm/icons/plus.js";
6
6
  import { Route as a } from "../node_modules/lucide-react/dist/esm/icons/route.js";
7
- import { Save as ee } from "../node_modules/lucide-react/dist/esm/icons/save.js";
8
- import { Trash2 as te } from "../node_modules/lucide-react/dist/esm/icons/trash-2.js";
9
- import { Users as ne } from "../node_modules/lucide-react/dist/esm/icons/users.js";
10
- import { buildCustomerCreatePath as re, joinPath as o } from "../utils/navigation.js";
11
- import { useMoveTheWheels as ie } from "../providers/MoveTheWheelsProvider.js";
12
- import { useRoutes as ae } from "../hooks/useRoutes.js";
13
- import { useOrder as oe, useOrders as se } from "../hooks/useOrders.js";
14
- import { useCustomer as ce, useCustomers as le } from "../hooks/useCustomers.js";
15
- import { Button as s, Card as c, CardContent as l, CardHeader as u, CardTitle as d, Input as f, Label as p, Select as m, SelectContent as h, SelectItem as g, SelectTrigger as _, SelectValue as v, Separator as ue, Textarea as de } from "../components/ui.js";
16
- import { EmptyState as fe, PageLayout as y } from "../components/PageLayout.js";
17
- import { FormError as pe } from "../components/FormError.js";
18
- import { useDebouncedValue as me } from "../hooks/useDebouncedValue.js";
19
- import { CustomerPicker as he } from "../components/CustomerPicker.js";
7
+ import { Save as o } from "../node_modules/lucide-react/dist/esm/icons/save.js";
8
+ import { Trash2 as ee } from "../node_modules/lucide-react/dist/esm/icons/trash-2.js";
9
+ import { Users as te } from "../node_modules/lucide-react/dist/esm/icons/users.js";
10
+ import { buildCustomerCreatePath as ne, joinPath as s } from "../utils/navigation.js";
11
+ import { useMoveTheWheels as re } from "../providers/MoveTheWheelsProvider.js";
12
+ import { useRoute as ie, useRoutes as ae } from "../hooks/useRoutes.js";
13
+ import { useOrder as oe, useOrders as c } from "../hooks/useOrders.js";
14
+ import { useCustomer as l, useCustomers as u } from "../hooks/useCustomers.js";
15
+ import { Button as d, Card as f, CardContent as p, CardHeader as m, CardTitle as h, Input as g, Label as _, Select as se, SelectContent as ce, SelectItem as v, SelectTrigger as le, SelectValue as ue, Separator as de, Textarea as y } from "../components/ui.js";
16
+ import { EmptyState as fe, PageLayout as pe } from "../components/PageLayout.js";
17
+ import { FormError as me } from "../components/FormError.js";
18
+ import { EntityCombobox as he } from "../components/EntityCombobox.js";
19
+ import { CustomerPicker as ge } from "../components/CustomerPicker.js";
20
20
  import { useEffect as b, useState as x } from "react";
21
- import { useParams as ge, useSearchParams as S } from "react-router";
22
- import { jsx as C, jsxs as w } from "react/jsx-runtime";
23
- import { EmphasisPanel as _e, NextSteps as ve, PagePurpose as ye } from "@burdenoff/fe-libs/ui";
21
+ import { useParams as _e, useSearchParams as ve } from "react-router";
22
+ import { Fragment as ye, jsx as S, jsxs as C } from "react/jsx-runtime";
23
+ import { EmphasisPanel as be, NextSteps as xe, PagePurpose as Se } from "@burdenoff/fe-libs/ui";
24
24
  //#region src/movethewheels/pages/CreateOrderPage.tsx
25
- function T(e) {
25
+ function w(e) {
26
26
  if (!e || Number.isNaN(e.getTime())) return "";
27
27
  let t = (e) => String(e).padStart(2, "0");
28
28
  return `${e.getFullYear()}-${t(e.getMonth() + 1)}-${t(e.getDate())}T${t(e.getHours())}:${t(e.getMinutes())}`;
29
29
  }
30
- function E() {
31
- let { orderId: E } = ge(), [be] = S(), D = be.get("customerId")?.trim() || void 0, { basePath: O, navigate: k } = ie(), { order: A } = oe(E), { createOrder: j, updateOrder: M } = se(), [N, xe] = x(""), { customers: P, createCustomer: Se, isLoading: F, error: I, refetch: Ce } = le({
30
+ function T() {
31
+ let { orderId: T } = _e(), [E] = ve(), D = E.get("customerId")?.trim() || void 0, { basePath: O, navigate: k } = re(), { order: A } = oe(T), { createOrder: j, updateOrder: Ce } = c(), [we, Te] = x(""), { customers: M, createCustomer: Ee, isLoading: N, error: P, refetch: De } = u({
32
32
  limit: 20,
33
- filters: { search: me(N) || void 0 }
34
- }), { customer: L } = ce(D ?? A?.customerId), { routes: R, isLoading: we, error: Te } = ae({
33
+ filters: { search: we || void 0 }
34
+ }), { customer: F } = l(D ?? A?.customerId), [Oe, ke] = x(""), { routes: I, isLoading: L, error: R, hasMore: Ae, totalRoutes: je } = ae({
35
35
  status: "planned",
36
+ search: Oe || void 0,
36
37
  limit: 20
37
- }), z = !!E && !!A, [B, V] = x(null), [H, U] = x({
38
+ }), z = !!T && !!A, [B, V] = x(null), [H, U] = x({
38
39
  customerId: D || A?.customerId || "",
39
40
  priority: A?.priority || "normal",
40
41
  routeId: A?.routeId || "",
@@ -53,15 +54,15 @@ function E() {
53
54
  country: A?.deliveryAddress.country || "USA"
54
55
  },
55
56
  items: A?.items || [],
56
- scheduledDelivery: T(A?.scheduledDelivery),
57
+ scheduledDelivery: w(A?.scheduledDelivery),
57
58
  specialInstructions: A?.specialInstructions || ""
58
- }), [W, G] = x(!1), [Ee, K] = x(null);
59
+ }), { route: Me, isLoading: Ne } = ie(H.routeId || void 0), [W, G] = x(!1), [Pe, K] = x(null);
59
60
  b(() => {
60
- L && (V((e) => e?.id === L.id ? e : L), U((e) => e.customerId ? e : {
61
+ F && (V((e) => e?.id === F.id ? e : F), U((e) => e.customerId ? e : {
61
62
  ...e,
62
- customerId: L.id
63
+ customerId: F.id
63
64
  }));
64
- }, [L]), b(() => {
65
+ }, [F]), b(() => {
65
66
  A && U({
66
67
  customerId: A.customerId || "",
67
68
  priority: A.priority || "normal",
@@ -81,28 +82,28 @@ function E() {
81
82
  country: A.deliveryAddress.country || "USA"
82
83
  },
83
84
  items: A.items || [],
84
- scheduledDelivery: T(A.scheduledDelivery),
85
+ scheduledDelivery: w(A.scheduledDelivery),
85
86
  specialInstructions: A.specialInstructions || ""
86
87
  });
87
88
  }, [A]);
88
89
  let q = () => {
89
90
  if (k) {
90
91
  if (!z && D) {
91
- k(o(O, `customers/${D}`));
92
+ k(s(O, `customers/${D}`));
92
93
  return;
93
94
  }
94
- k(o(O, "orders"));
95
+ k(s(O, "orders"));
95
96
  }
96
- }, J = () => B ?? P.find((e) => e.id === H.customerId), De = () => !H.customerId || !J() ? I ? "Customers could not be loaded. Retry or create a customer before continuing." : "Select a customer for this order." : H.pickupAddress.street.trim() ? H.deliveryAddress.street.trim() ? H.items.length === 0 ? "Add at least one item to the order." : H.scheduledDelivery && Number.isNaN(Date.parse(H.scheduledDelivery)) ? "Enter a valid scheduled delivery date and time." : null : "Enter a delivery street address." : "Enter a pickup street address.", Y = async (e) => {
97
+ }, J = () => B ?? M.find((e) => e.id === H.customerId), Fe = () => !H.customerId || !J() ? P ? "Customers could not be loaded. Retry or create a customer before continuing." : "Select a customer for this order." : H.pickupAddress.street.trim() ? H.deliveryAddress.street.trim() ? H.items.length === 0 ? "Add at least one item to the order." : H.scheduledDelivery && Number.isNaN(Date.parse(H.scheduledDelivery)) ? "Enter a valid scheduled delivery date and time." : null : "Enter a delivery street address." : "Enter a pickup street address.", Y = async (e) => {
97
98
  e.preventDefault(), K(null);
98
- let t = De();
99
+ let t = Fe();
99
100
  if (t) {
100
101
  K(t);
101
102
  return;
102
103
  }
103
104
  let n = J();
104
105
  if (!n) {
105
- K(I ? "Customers could not be loaded. Retry or create a customer before continuing." : "Select a customer for this order.");
106
+ K(P ? "Customers could not be loaded. Retry or create a customer before continuing." : "Select a customer for this order.");
106
107
  return;
107
108
  }
108
109
  G(!0);
@@ -123,7 +124,7 @@ function E() {
123
124
  routeId: H.routeId || void 0,
124
125
  specialInstructions: H.specialInstructions
125
126
  };
126
- z && E ? (await M(E, e), k && k(o(O, `orders/${E}`))) : (await j(e), q());
127
+ z && T ? (await Ce(T, e), k && k(s(O, `orders/${T}`))) : (await j(e), q());
127
128
  } catch (e) {
128
129
  K(e instanceof Error ? e.message : z ? "Could not update the order. Please try again." : "Could not create the order. Please try again.");
129
130
  } finally {
@@ -142,12 +143,12 @@ function E() {
142
143
  [t]: n
143
144
  }
144
145
  }));
145
- }, Oe = (e) => {
146
- if (e === "none") {
146
+ }, Ie = (e) => {
147
+ if (!e) {
147
148
  X("routeId", "");
148
149
  return;
149
150
  }
150
- let t = R.find((t) => t.id === e);
151
+ let t = I.find((t) => t.id === e);
151
152
  if (!t) return;
152
153
  let n = t.stops.find((e) => e.type === "pickup")?.address, r = [...t.stops].reverse().find((e) => e.type === "delivery")?.address, i = (e, t) => t ? {
153
154
  street: e.street.trim() ? e.street : t.street,
@@ -181,7 +182,7 @@ function E() {
181
182
  sku: ""
182
183
  }]
183
184
  }));
184
- }, ke = (e) => {
185
+ }, Le = (e) => {
185
186
  U((t) => ({
186
187
  ...t,
187
188
  items: t.items.filter((t, n) => n !== e)
@@ -195,35 +196,35 @@ function E() {
195
196
  } : r)
196
197
  }));
197
198
  };
198
- return /* @__PURE__ */ w(y, {
199
+ return /* @__PURE__ */ C(pe, {
199
200
  title: z ? "Edit Order" : "Create Order",
200
201
  subtitle: z ? `Editing ${A?.orderNumber}` : "Create a new delivery order",
201
- icon: /* @__PURE__ */ C(r, { size: 24 }),
202
- headerActions: /* @__PURE__ */ w("div", {
202
+ icon: /* @__PURE__ */ S(r, { size: 24 }),
203
+ headerActions: /* @__PURE__ */ C("div", {
203
204
  className: "flex gap-2",
204
- children: [/* @__PURE__ */ w(s, {
205
+ children: [/* @__PURE__ */ C(d, {
205
206
  variant: "outline",
206
207
  onClick: q,
207
- children: [/* @__PURE__ */ C(e, { size: 16 }), "Cancel"]
208
- }), /* @__PURE__ */ w(s, {
208
+ children: [/* @__PURE__ */ S(e, { size: 16 }), "Cancel"]
209
+ }), /* @__PURE__ */ C(d, {
209
210
  onClick: Y,
210
- disabled: W || F,
211
- children: [/* @__PURE__ */ C(ee, { size: 16 }), W ? "Saving..." : z ? "Save Changes" : "Create Order"]
211
+ disabled: W || N,
212
+ children: [/* @__PURE__ */ S(o, { size: 16 }), W ? "Saving..." : z ? "Save Changes" : "Create Order"]
212
213
  })]
213
214
  }),
214
215
  children: [
215
- /* @__PURE__ */ C(ye, {
216
- icon: /* @__PURE__ */ C(r, { size: 18 }),
216
+ /* @__PURE__ */ S(Se, {
217
+ icon: /* @__PURE__ */ S(r, { size: 18 }),
217
218
  children: z ? "Update this delivery before it goes out — change the customer, addresses, items or handling notes, then save." : "Book a new delivery in a few steps: choose who it’s for, set pickup and drop-off addresses, list what’s being shipped, and add any handling notes. Once created it joins the orders pipeline ready to assign and track."
218
219
  }),
219
- /* @__PURE__ */ C(ve, {
220
+ /* @__PURE__ */ S(xe, {
220
221
  storageKey: "movethewheels-create-order",
221
222
  steps: [
222
223
  {
223
224
  id: "customer",
224
225
  label: "Pick the customer first",
225
226
  description: "Their saved contact details auto-fill the order.",
226
- icon: /* @__PURE__ */ C(ne, { size: 16 }),
227
+ icon: /* @__PURE__ */ S(te, { size: 16 }),
227
228
  done: !!H.customerId,
228
229
  onClick: () => document.getElementById("customer")?.focus()
229
230
  },
@@ -231,7 +232,7 @@ function E() {
231
232
  id: "addresses",
232
233
  label: "Set pickup & delivery addresses",
233
234
  description: "Where the shipment is collected and dropped off.",
234
- icon: /* @__PURE__ */ C(n, { size: 16 }),
235
+ icon: /* @__PURE__ */ S(n, { size: 16 }),
235
236
  done: !!H.pickupAddress.street && !!H.deliveryAddress.street,
236
237
  onClick: () => document.getElementById("pickupStreet")?.focus()
237
238
  },
@@ -239,68 +240,67 @@ function E() {
239
240
  id: "items",
240
241
  label: "Add the items to ship",
241
242
  description: "List each product with its quantity and value.",
242
- icon: /* @__PURE__ */ C(r, { size: 16 }),
243
+ icon: /* @__PURE__ */ S(r, { size: 16 }),
243
244
  done: H.items.length > 0,
244
245
  onClick: Q
245
246
  }
246
247
  ]
247
248
  }),
248
- /* @__PURE__ */ w("form", {
249
+ /* @__PURE__ */ C("form", {
249
250
  onSubmit: Y,
250
251
  className: "space-y-6",
251
252
  children: [
252
- /* @__PURE__ */ C(pe, { message: Ee }),
253
- /* @__PURE__ */ w(_e, { children: [/* @__PURE__ */ C("h2", {
253
+ /* @__PURE__ */ S(me, { message: Pe }),
254
+ /* @__PURE__ */ C(be, { children: [/* @__PURE__ */ S("h2", {
254
255
  className: "text-base font-semibold text-text-primary mb-4",
255
256
  children: "Order Details"
256
- }), /* @__PURE__ */ C("div", {
257
+ }), /* @__PURE__ */ S("div", {
257
258
  className: "space-y-4",
258
- children: /* @__PURE__ */ w("div", {
259
+ children: /* @__PURE__ */ C("div", {
259
260
  className: "grid grid-cols-1 md:grid-cols-2 gap-4",
260
- children: [/* @__PURE__ */ C(he, {
261
- customers: P,
261
+ children: [/* @__PURE__ */ S(ge, {
262
+ customers: M,
262
263
  value: H.customerId,
263
264
  onValueChange: (e) => {
264
- e && (X("customerId", e), V(P.find((t) => t.id === e) ?? (B?.id === e ? B : null)), K(null));
265
+ e && (X("customerId", e), V(M.find((t) => t.id === e) ?? (B?.id === e ? B : null)), K(null));
265
266
  },
266
267
  onCreated: (e) => {
267
268
  V(e), X("customerId", e.id), K(null);
268
269
  },
269
- createCustomer: Se,
270
- isLoading: F,
271
- error: I,
272
- onRetry: Ce,
270
+ createCustomer: Ee,
271
+ isLoading: N,
272
+ error: P,
273
+ onRetry: De,
273
274
  onOpenCustomers: () => {
274
- k && k(o(O, re(z && E ? `orders/${E}/edit` : "orders/new")));
275
+ k && k(s(O, ne(z && T ? `orders/${T}/edit` : "orders/new")));
275
276
  },
276
277
  selectedCustomer: B,
277
- searchQuery: N,
278
- onSearchQueryChange: xe
279
- }), /* @__PURE__ */ w("div", {
278
+ onSearchQueryChange: Te
279
+ }), /* @__PURE__ */ C("div", {
280
280
  className: "space-y-2",
281
- children: [/* @__PURE__ */ C(p, {
281
+ children: [/* @__PURE__ */ S(_, {
282
282
  htmlFor: "priority",
283
283
  children: "Priority"
284
- }), /* @__PURE__ */ w(m, {
284
+ }), /* @__PURE__ */ C(se, {
285
285
  value: H.priority,
286
286
  onValueChange: (e) => X("priority", e),
287
- children: [/* @__PURE__ */ C(_, {
287
+ children: [/* @__PURE__ */ S(le, {
288
288
  id: "priority",
289
- children: /* @__PURE__ */ C(v, {})
290
- }), /* @__PURE__ */ w(h, { children: [
291
- /* @__PURE__ */ C(g, {
289
+ children: /* @__PURE__ */ S(ue, {})
290
+ }), /* @__PURE__ */ C(ce, { children: [
291
+ /* @__PURE__ */ S(v, {
292
292
  value: "low",
293
293
  children: "Low"
294
294
  }),
295
- /* @__PURE__ */ C(g, {
295
+ /* @__PURE__ */ S(v, {
296
296
  value: "normal",
297
297
  children: "Normal"
298
298
  }),
299
- /* @__PURE__ */ C(g, {
299
+ /* @__PURE__ */ S(v, {
300
300
  value: "high",
301
301
  children: "High"
302
302
  }),
303
- /* @__PURE__ */ C(g, {
303
+ /* @__PURE__ */ S(v, {
304
304
  value: "urgent",
305
305
  children: "Urgent"
306
306
  })
@@ -309,70 +309,76 @@ function E() {
309
309
  })]
310
310
  })
311
311
  })] }),
312
- /* @__PURE__ */ w(c, { children: [/* @__PURE__ */ C(u, { children: /* @__PURE__ */ w(d, {
312
+ /* @__PURE__ */ C(f, { children: [/* @__PURE__ */ S(m, { children: /* @__PURE__ */ C(h, {
313
313
  className: "flex items-center gap-2",
314
- children: [/* @__PURE__ */ C(a, { size: 18 }), "Saved Route (Optional)"]
315
- }) }), /* @__PURE__ */ w(l, {
314
+ children: [/* @__PURE__ */ S(a, { size: 18 }), "Saved Route (Optional)"]
315
+ }) }), /* @__PURE__ */ C(p, {
316
316
  className: "space-y-2",
317
- children: [/* @__PURE__ */ w(m, {
318
- value: H.routeId || "none",
319
- onValueChange: Oe,
320
- children: [/* @__PURE__ */ C(_, {
321
- id: "saved-route",
322
- children: /* @__PURE__ */ C(v, { placeholder: "Choose a saved route" })
323
- }), /* @__PURE__ */ w(h, { children: [/* @__PURE__ */ C(g, {
324
- value: "none",
325
- children: "No saved route"
326
- }), R.map((e) => /* @__PURE__ */ w(g, {
327
- value: e.id,
328
- children: [
329
- e.name,
330
- " · ",
331
- e.stops.length,
332
- " stops"
333
- ]
334
- }, e.id))] })]
335
- }), /* @__PURE__ */ C("p", {
317
+ children: [/* @__PURE__ */ S(he, {
318
+ id: "saved-route",
319
+ value: H.routeId,
320
+ onChange: Ie,
321
+ options: I,
322
+ loading: L,
323
+ getId: (e) => e.id,
324
+ getLabel: (e) => `${e.name} · ${e.stops.length} stops`,
325
+ renderOption: (e) => /* @__PURE__ */ C(ye, { children: [
326
+ e.name,
327
+ " · ",
328
+ e.stops.length,
329
+ " stops"
330
+ ] }),
331
+ selectedOption: Me,
332
+ selectedLoading: Ne,
333
+ placeholder: "Choose a saved route",
334
+ searchPlaceholder: "Search saved routes",
335
+ emptyText: "No saved routes found.",
336
+ noneLabel: "No saved route",
337
+ error: R ? "Saved routes are unavailable" : void 0,
338
+ onSearchChange: ke,
339
+ hasMore: Ae,
340
+ totalCount: je
341
+ }), /* @__PURE__ */ S("p", {
336
342
  className: "text-xs text-text-secondary",
337
- children: we ? "Loading planned routes…" : Te ? "Saved routes are unavailable; enter pickup and delivery addresses manually." : "A saved route fills any blank address fields. You can always edit both addresses below."
343
+ children: L ? "Loading planned routes…" : R ? "Saved routes are unavailable; enter pickup and delivery addresses manually." : "A saved route fills any blank address fields. You can always edit both addresses below."
338
344
  })]
339
345
  })] }),
340
- /* @__PURE__ */ w("div", {
346
+ /* @__PURE__ */ C("div", {
341
347
  className: "grid grid-cols-1 md:grid-cols-2 gap-6",
342
- children: [/* @__PURE__ */ w(c, { children: [/* @__PURE__ */ C(u, { children: /* @__PURE__ */ C(d, { children: "Pickup Address" }) }), /* @__PURE__ */ w(l, {
348
+ children: [/* @__PURE__ */ C(f, { children: [/* @__PURE__ */ S(m, { children: /* @__PURE__ */ S(h, { children: "Pickup Address" }) }), /* @__PURE__ */ C(p, {
343
349
  className: "space-y-4",
344
350
  children: [
345
- /* @__PURE__ */ w("div", {
351
+ /* @__PURE__ */ C("div", {
346
352
  className: "space-y-2",
347
- children: [/* @__PURE__ */ C(p, {
353
+ children: [/* @__PURE__ */ S(_, {
348
354
  htmlFor: "pickupStreet",
349
355
  children: "Street Address"
350
- }), /* @__PURE__ */ C(f, {
356
+ }), /* @__PURE__ */ S(g, {
351
357
  id: "pickupStreet",
352
358
  value: H.pickupAddress.street,
353
359
  onChange: (e) => Z("pickupAddress", "street", e.target.value),
354
360
  placeholder: "123 Main St"
355
361
  })]
356
362
  }),
357
- /* @__PURE__ */ w("div", {
363
+ /* @__PURE__ */ C("div", {
358
364
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
359
- children: [/* @__PURE__ */ w("div", {
365
+ children: [/* @__PURE__ */ C("div", {
360
366
  className: "space-y-2",
361
- children: [/* @__PURE__ */ C(p, {
367
+ children: [/* @__PURE__ */ S(_, {
362
368
  htmlFor: "pickupCity",
363
369
  children: "City"
364
- }), /* @__PURE__ */ C(f, {
370
+ }), /* @__PURE__ */ S(g, {
365
371
  id: "pickupCity",
366
372
  value: H.pickupAddress.city,
367
373
  onChange: (e) => Z("pickupAddress", "city", e.target.value),
368
374
  placeholder: "San Francisco"
369
375
  })]
370
- }), /* @__PURE__ */ w("div", {
376
+ }), /* @__PURE__ */ C("div", {
371
377
  className: "space-y-2",
372
- children: [/* @__PURE__ */ C(p, {
378
+ children: [/* @__PURE__ */ S(_, {
373
379
  htmlFor: "pickupState",
374
380
  children: "State"
375
- }), /* @__PURE__ */ C(f, {
381
+ }), /* @__PURE__ */ S(g, {
376
382
  id: "pickupState",
377
383
  value: H.pickupAddress.state,
378
384
  onChange: (e) => Z("pickupAddress", "state", e.target.value),
@@ -380,25 +386,25 @@ function E() {
380
386
  })]
381
387
  })]
382
388
  }),
383
- /* @__PURE__ */ w("div", {
389
+ /* @__PURE__ */ C("div", {
384
390
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
385
- children: [/* @__PURE__ */ w("div", {
391
+ children: [/* @__PURE__ */ C("div", {
386
392
  className: "space-y-2",
387
- children: [/* @__PURE__ */ C(p, {
393
+ children: [/* @__PURE__ */ S(_, {
388
394
  htmlFor: "pickupPostal",
389
395
  children: "Postal Code"
390
- }), /* @__PURE__ */ C(f, {
396
+ }), /* @__PURE__ */ S(g, {
391
397
  id: "pickupPostal",
392
398
  value: H.pickupAddress.postalCode,
393
399
  onChange: (e) => Z("pickupAddress", "postalCode", e.target.value),
394
400
  placeholder: "94103"
395
401
  })]
396
- }), /* @__PURE__ */ w("div", {
402
+ }), /* @__PURE__ */ C("div", {
397
403
  className: "space-y-2",
398
- children: [/* @__PURE__ */ C(p, {
404
+ children: [/* @__PURE__ */ S(_, {
399
405
  htmlFor: "pickupCountry",
400
406
  children: "Country"
401
- }), /* @__PURE__ */ C(f, {
407
+ }), /* @__PURE__ */ S(g, {
402
408
  id: "pickupCountry",
403
409
  value: H.pickupAddress.country,
404
410
  onChange: (e) => Z("pickupAddress", "country", e.target.value),
@@ -407,40 +413,40 @@ function E() {
407
413
  })]
408
414
  })
409
415
  ]
410
- })] }), /* @__PURE__ */ w(c, { children: [/* @__PURE__ */ C(u, { children: /* @__PURE__ */ C(d, { children: "Delivery Address" }) }), /* @__PURE__ */ w(l, {
416
+ })] }), /* @__PURE__ */ C(f, { children: [/* @__PURE__ */ S(m, { children: /* @__PURE__ */ S(h, { children: "Delivery Address" }) }), /* @__PURE__ */ C(p, {
411
417
  className: "space-y-4",
412
418
  children: [
413
- /* @__PURE__ */ w("div", {
419
+ /* @__PURE__ */ C("div", {
414
420
  className: "space-y-2",
415
- children: [/* @__PURE__ */ C(p, {
421
+ children: [/* @__PURE__ */ S(_, {
416
422
  htmlFor: "deliveryStreet",
417
423
  children: "Street Address"
418
- }), /* @__PURE__ */ C(f, {
424
+ }), /* @__PURE__ */ S(g, {
419
425
  id: "deliveryStreet",
420
426
  value: H.deliveryAddress.street,
421
427
  onChange: (e) => Z("deliveryAddress", "street", e.target.value),
422
428
  placeholder: "456 Oak Ave"
423
429
  })]
424
430
  }),
425
- /* @__PURE__ */ w("div", {
431
+ /* @__PURE__ */ C("div", {
426
432
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
427
- children: [/* @__PURE__ */ w("div", {
433
+ children: [/* @__PURE__ */ C("div", {
428
434
  className: "space-y-2",
429
- children: [/* @__PURE__ */ C(p, {
435
+ children: [/* @__PURE__ */ S(_, {
430
436
  htmlFor: "deliveryCity",
431
437
  children: "City"
432
- }), /* @__PURE__ */ C(f, {
438
+ }), /* @__PURE__ */ S(g, {
433
439
  id: "deliveryCity",
434
440
  value: H.deliveryAddress.city,
435
441
  onChange: (e) => Z("deliveryAddress", "city", e.target.value),
436
442
  placeholder: "Los Angeles"
437
443
  })]
438
- }), /* @__PURE__ */ w("div", {
444
+ }), /* @__PURE__ */ C("div", {
439
445
  className: "space-y-2",
440
- children: [/* @__PURE__ */ C(p, {
446
+ children: [/* @__PURE__ */ S(_, {
441
447
  htmlFor: "deliveryState",
442
448
  children: "State"
443
- }), /* @__PURE__ */ C(f, {
449
+ }), /* @__PURE__ */ S(g, {
444
450
  id: "deliveryState",
445
451
  value: H.deliveryAddress.state,
446
452
  onChange: (e) => Z("deliveryAddress", "state", e.target.value),
@@ -448,25 +454,25 @@ function E() {
448
454
  })]
449
455
  })]
450
456
  }),
451
- /* @__PURE__ */ w("div", {
457
+ /* @__PURE__ */ C("div", {
452
458
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
453
- children: [/* @__PURE__ */ w("div", {
459
+ children: [/* @__PURE__ */ C("div", {
454
460
  className: "space-y-2",
455
- children: [/* @__PURE__ */ C(p, {
461
+ children: [/* @__PURE__ */ S(_, {
456
462
  htmlFor: "deliveryPostal",
457
463
  children: "Postal Code"
458
- }), /* @__PURE__ */ C(f, {
464
+ }), /* @__PURE__ */ S(g, {
459
465
  id: "deliveryPostal",
460
466
  value: H.deliveryAddress.postalCode,
461
467
  onChange: (e) => Z("deliveryAddress", "postalCode", e.target.value),
462
468
  placeholder: "90210"
463
469
  })]
464
- }), /* @__PURE__ */ w("div", {
470
+ }), /* @__PURE__ */ C("div", {
465
471
  className: "space-y-2",
466
- children: [/* @__PURE__ */ C(p, {
472
+ children: [/* @__PURE__ */ S(_, {
467
473
  htmlFor: "deliveryCountry",
468
474
  children: "Country"
469
- }), /* @__PURE__ */ C(f, {
475
+ }), /* @__PURE__ */ S(g, {
470
476
  id: "deliveryCountry",
471
477
  value: H.deliveryAddress.country,
472
478
  onChange: (e) => Z("deliveryAddress", "country", e.target.value),
@@ -477,61 +483,61 @@ function E() {
477
483
  ]
478
484
  })] })]
479
485
  }),
480
- /* @__PURE__ */ w(c, { children: [/* @__PURE__ */ w(u, {
486
+ /* @__PURE__ */ C(f, { children: [/* @__PURE__ */ C(m, {
481
487
  className: "flex flex-row items-center justify-between",
482
- children: [/* @__PURE__ */ C(d, { children: "Order Items" }), /* @__PURE__ */ w(s, {
488
+ children: [/* @__PURE__ */ S(h, { children: "Order Items" }), /* @__PURE__ */ C(d, {
483
489
  type: "button",
484
490
  variant: "outline",
485
491
  size: "sm",
486
492
  onClick: Q,
487
- children: [/* @__PURE__ */ C(i, { size: 16 }), "Add Item"]
493
+ children: [/* @__PURE__ */ S(i, { size: 16 }), "Add Item"]
488
494
  })]
489
- }), /* @__PURE__ */ C(l, { children: H.items.length === 0 ? /* @__PURE__ */ C(fe, {
495
+ }), /* @__PURE__ */ S(p, { children: H.items.length === 0 ? /* @__PURE__ */ S(fe, {
490
496
  illustration: "empty-files",
491
497
  title: "No items added yet",
492
498
  description: "Add the products this order will ship — each with a name, SKU, quantity and value.",
493
- action: /* @__PURE__ */ w(s, {
499
+ action: /* @__PURE__ */ C(d, {
494
500
  type: "button",
495
501
  variant: "outline",
496
502
  onClick: Q,
497
- children: [/* @__PURE__ */ C(i, {
503
+ children: [/* @__PURE__ */ S(i, {
498
504
  size: 16,
499
505
  className: "mr-1.5"
500
506
  }), "Add your first item"]
501
507
  })
502
- }) : /* @__PURE__ */ C("div", {
508
+ }) : /* @__PURE__ */ S("div", {
503
509
  className: "space-y-4",
504
- children: H.items.map((e, t) => /* @__PURE__ */ w("div", { children: [t > 0 && /* @__PURE__ */ C(ue, { className: "my-4" }), /* @__PURE__ */ w("div", {
510
+ children: H.items.map((e, t) => /* @__PURE__ */ C("div", { children: [t > 0 && /* @__PURE__ */ S(de, { className: "my-4" }), /* @__PURE__ */ C("div", {
505
511
  className: "grid grid-cols-1 md:grid-cols-7 gap-4",
506
512
  children: [
507
- /* @__PURE__ */ w("div", {
513
+ /* @__PURE__ */ C("div", {
508
514
  className: "md:col-span-2 space-y-2",
509
- children: [/* @__PURE__ */ C(p, { children: "Item Name" }), /* @__PURE__ */ C(f, {
515
+ children: [/* @__PURE__ */ S(_, { children: "Item Name" }), /* @__PURE__ */ S(g, {
510
516
  value: e.name,
511
517
  onChange: (e) => $(t, "name", e.target.value),
512
518
  placeholder: "Product name"
513
519
  })]
514
520
  }),
515
- /* @__PURE__ */ w("div", {
521
+ /* @__PURE__ */ C("div", {
516
522
  className: "space-y-2",
517
- children: [/* @__PURE__ */ C(p, { children: "SKU" }), /* @__PURE__ */ C(f, {
523
+ children: [/* @__PURE__ */ S(_, { children: "SKU" }), /* @__PURE__ */ S(g, {
518
524
  value: e.sku,
519
525
  onChange: (e) => $(t, "sku", e.target.value),
520
526
  placeholder: "SKU-001"
521
527
  })]
522
528
  }),
523
- /* @__PURE__ */ w("div", {
529
+ /* @__PURE__ */ C("div", {
524
530
  className: "space-y-2",
525
- children: [/* @__PURE__ */ C(p, { children: "Quantity" }), /* @__PURE__ */ C(f, {
531
+ children: [/* @__PURE__ */ S(_, { children: "Quantity" }), /* @__PURE__ */ S(g, {
526
532
  type: "number",
527
533
  min: "1",
528
534
  value: e.quantity,
529
535
  onChange: (e) => $(t, "quantity", parseInt(e.target.value) || 1)
530
536
  })]
531
537
  }),
532
- /* @__PURE__ */ w("div", {
538
+ /* @__PURE__ */ C("div", {
533
539
  className: "space-y-2",
534
- children: [/* @__PURE__ */ C(p, { children: "Weight (kg)" }), /* @__PURE__ */ C(f, {
540
+ children: [/* @__PURE__ */ S(_, { children: "Weight (kg)" }), /* @__PURE__ */ S(g, {
535
541
  type: "number",
536
542
  min: "0",
537
543
  step: "0.1",
@@ -539,9 +545,9 @@ function E() {
539
545
  onChange: (e) => $(t, "weight", parseFloat(e.target.value) || 0)
540
546
  })]
541
547
  }),
542
- /* @__PURE__ */ w("div", {
548
+ /* @__PURE__ */ C("div", {
543
549
  className: "space-y-2",
544
- children: [/* @__PURE__ */ C(p, { children: "Value ($)" }), /* @__PURE__ */ C(f, {
550
+ children: [/* @__PURE__ */ S(_, { children: "Value ($)" }), /* @__PURE__ */ S(g, {
545
551
  type: "number",
546
552
  min: "0",
547
553
  step: "0.01",
@@ -549,50 +555,50 @@ function E() {
549
555
  onChange: (e) => $(t, "value", parseFloat(e.target.value) || 0)
550
556
  })]
551
557
  }),
552
- /* @__PURE__ */ C("div", {
558
+ /* @__PURE__ */ S("div", {
553
559
  className: "flex items-end",
554
- children: /* @__PURE__ */ C(s, {
560
+ children: /* @__PURE__ */ S(d, {
555
561
  type: "button",
556
562
  variant: "ghost",
557
563
  size: "icon",
558
564
  className: "text-status-error-text",
559
- onClick: () => ke(t),
560
- children: /* @__PURE__ */ C(te, { size: 16 })
565
+ onClick: () => Le(t),
566
+ children: /* @__PURE__ */ S(ee, { size: 16 })
561
567
  })
562
568
  })
563
569
  ]
564
570
  })] }, e.id))
565
571
  }) })] }),
566
- /* @__PURE__ */ w(c, { children: [/* @__PURE__ */ C(u, { children: /* @__PURE__ */ C(d, { children: "Scheduling & Handling" }) }), /* @__PURE__ */ C(l, { children: /* @__PURE__ */ w("div", {
572
+ /* @__PURE__ */ C(f, { children: [/* @__PURE__ */ S(m, { children: /* @__PURE__ */ S(h, { children: "Scheduling & Handling" }) }), /* @__PURE__ */ S(p, { children: /* @__PURE__ */ C("div", {
567
573
  className: "grid grid-cols-1 md:grid-cols-3 gap-6",
568
- children: [/* @__PURE__ */ w("div", {
574
+ children: [/* @__PURE__ */ C("div", {
569
575
  className: "space-y-2",
570
576
  children: [
571
- /* @__PURE__ */ w(p, {
577
+ /* @__PURE__ */ C(_, {
572
578
  htmlFor: "scheduledDelivery",
573
579
  className: "flex items-center gap-1.5",
574
- children: [/* @__PURE__ */ C(t, {
580
+ children: [/* @__PURE__ */ S(t, {
575
581
  size: 14,
576
582
  className: "text-text-secondary"
577
583
  }), "Scheduled Delivery"]
578
584
  }),
579
- /* @__PURE__ */ C(f, {
585
+ /* @__PURE__ */ S(g, {
580
586
  id: "scheduledDelivery",
581
587
  type: "datetime-local",
582
588
  value: H.scheduledDelivery,
583
589
  onChange: (e) => X("scheduledDelivery", e.target.value)
584
590
  }),
585
- /* @__PURE__ */ C("p", {
591
+ /* @__PURE__ */ S("p", {
586
592
  className: "text-xs text-text-secondary",
587
593
  children: "The delivery window promised to the customer. Leave blank to dispatch as soon as a driver is free."
588
594
  })
589
595
  ]
590
- }), /* @__PURE__ */ w("div", {
596
+ }), /* @__PURE__ */ C("div", {
591
597
  className: "md:col-span-2 space-y-2",
592
- children: [/* @__PURE__ */ C(p, {
598
+ children: [/* @__PURE__ */ S(_, {
593
599
  htmlFor: "specialInstructions",
594
600
  children: "Special Instructions"
595
- }), /* @__PURE__ */ C(de, {
601
+ }), /* @__PURE__ */ S(y, {
596
602
  id: "specialInstructions",
597
603
  value: H.specialInstructions,
598
604
  onChange: (e) => X("specialInstructions", e.target.value),
@@ -607,4 +613,4 @@ function E() {
607
613
  });
608
614
  }
609
615
  //#endregion
610
- export { E as default };
616
+ export { T as default };