@burdenoff/microfe-devportal 2026.1112.2 → 2026.1113.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/devportal/components/AppCard.js +73 -70
  2. package/dist/devportal/components/AppCard.js.map +1 -1
  3. package/dist/devportal/components/ImageUploadField.js +82 -80
  4. package/dist/devportal/components/ImageUploadField.js.map +1 -1
  5. package/dist/devportal/components/StoreImage.d.ts +15 -0
  6. package/dist/devportal/components/StoreImage.js +30 -0
  7. package/dist/devportal/components/StoreImage.js.map +1 -0
  8. package/dist/devportal/components/index.d.ts +1 -0
  9. package/dist/devportal/components/index.js +17 -16
  10. package/dist/devportal/hooks/usePackageUpload.d.ts +46 -4
  11. package/dist/devportal/hooks/usePackageUpload.js +90 -36
  12. package/dist/devportal/hooks/usePackageUpload.js.map +1 -1
  13. package/dist/devportal/pages/AdminReviewPage.js +205 -202
  14. package/dist/devportal/pages/AdminReviewPage.js.map +1 -1
  15. package/dist/devportal/pages/ApplicationDetailPage.js +2 -2
  16. package/dist/devportal/pages/ApplicationDetailPage.js.map +1 -1
  17. package/dist/devportal/pages/ApplicationsPage.js +201 -199
  18. package/dist/devportal/pages/ApplicationsPage.js.map +1 -1
  19. package/dist/devportal/pages/CreatePhysicalItemPage.js +2 -2
  20. package/dist/devportal/pages/CreatePhysicalItemPage.js.map +1 -1
  21. package/dist/devportal/pages/EditPhysicalItemPage.js +312 -307
  22. package/dist/devportal/pages/EditPhysicalItemPage.js.map +1 -1
  23. package/dist/devportal/pages/ListingPreviewPage.js +175 -171
  24. package/dist/devportal/pages/ListingPreviewPage.js.map +1 -1
  25. package/dist/devportal/pages/SellerDashboardPage.js +118 -116
  26. package/dist/devportal/pages/SellerDashboardPage.js.map +1 -1
  27. package/dist/devportal/pages/SellerItemsPage.js +202 -199
  28. package/dist/devportal/pages/SellerItemsPage.js.map +1 -1
  29. package/dist/devportal/pages/StoreSubmissionPage.js +133 -131
  30. package/dist/devportal/pages/StoreSubmissionPage.js.map +1 -1
  31. package/package.json +1 -1
@@ -3,14 +3,15 @@ import { CheckboxField as n, InputField as r, SelectField as i, TextareaField as
3
3
  import { ImageUploadField as o, ScreenshotGallery as ee } from "../components/ImageUploadField.js";
4
4
  import { DetailList as s } from "../components/DataTable.js";
5
5
  import { useDevportal as te } from "../providers/DevportalProvider.js";
6
- import { usePackageUpload as c } from "../hooks/usePackageUpload.js";
6
+ import { useAssetUpload as c } from "../hooks/usePackageUpload.js";
7
7
  import { cn as l } from "../utils/cn.js";
8
8
  import { resolveGlobalGraphqlEndpoint as ne } from "../utils/graphqlEndpoint.js";
9
- import { useEffect as re, useState as u } from "react";
10
- import { AlertCircle as ie, CheckCircle as ae, Clock as oe, Edit as se, ImageOff as ce, Info as le, Loader2 as d, XCircle as ue } from "lucide-react";
9
+ import { StoreImage as u, StoreImagePlaceholder as d } from "../components/StoreImage.js";
10
+ import { useEffect as re, useState as f } from "react";
11
+ import { AlertCircle as ie, CheckCircle as ae, Clock as oe, Edit as se, ImageOff as ce, Info as le, Loader2 as p, XCircle as ue } from "lucide-react";
11
12
  import { useParams as de } from "react-router";
12
- import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
13
- import { EmphasisPanel as fe, GlassCard as h } from "@burdenoff/fe-libs/ui";
13
+ import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
14
+ import { EmphasisPanel as fe, GlassCard as _ } from "@burdenoff/fe-libs/ui";
14
15
  // src/devportal/pages/EditPhysicalItemPage.tsx
15
16
  var pe = [
16
17
  {
@@ -67,7 +68,7 @@ var pe = [
67
68
  value: "METER",
68
69
  label: "Meters (m)"
69
70
  }
70
- ], g = [
71
+ ], v = [
71
72
  "name",
72
73
  "shortDescription",
73
74
  "price",
@@ -105,23 +106,23 @@ var pe = [
105
106
  }
106
107
  }, ve = "\n query GetPhysicalProduct($id: ID!) {\n product(id: $id) {\n id\n name\n slug\n type\n status\n nature\n description\n longDescription\n price\n currency\n tags\n stockQuantity\n sku\n trackInventory\n allowBackorder\n lowStockThreshold\n requiresShipping\n weight\n weightUnit\n length\n width\n height\n dimensionUnit\n brand\n manufacturer\n countryOfOrigin\n warrantyInfo\n returnPolicy\n icon\n bannerUrl\n screenshots\n category\n viewCount\n rating\n reviewCount\n createdAt\n updatedAt\n submittedAt\n reviewedAt\n reviewNotes\n rejectedReason\n publishedAt\n }\n }\n", ye = "\n mutation UpdatePhysicalProduct(\n $id: ID!\n $input: UpdatePhysicalProductInput!\n ) {\n updatePhysicalProduct(id: $id, input: $input) {\n id\n name\n status\n }\n }\n", be = "\n mutation SubmitProductForReview($id: ID!, $notes: String) {\n submitProduct(id: $id, notes: $notes) {\n id\n status\n }\n }\n";
107
108
  function xe(e) {
108
- return g.every((t) => {
109
+ return v.every((t) => {
109
110
  let n = e[t];
110
111
  return typeof n == "boolean" || String(n).trim() !== "";
111
112
  });
112
113
  }
113
- var _ = ({ label: e, value: t }) => /* @__PURE__ */ m(h, {
114
+ var y = ({ label: e, value: t }) => /* @__PURE__ */ g(_, {
114
115
  treatment: "metric",
115
116
  className: "p-4",
116
- children: [/* @__PURE__ */ p("p", {
117
+ children: [/* @__PURE__ */ h("p", {
117
118
  className: "text-sm text-text-secondary",
118
119
  children: e
119
- }), /* @__PURE__ */ p("p", {
120
+ }), /* @__PURE__ */ h("p", {
120
121
  className: "text-2xl font-bold tabular-nums",
121
122
  children: t
122
123
  })]
123
- }), v = () => {
124
- let { navigate: h, basePath: g, apiGatewayUrl: v, authToken: y, workspacesGatewayUrl: b, workspaceId: x, getWorkspaceToken: S } = te(), { itemId: C } = de(), w = ne(v), [Se, T] = u(!0), [E, D] = u(null), [O, Ce] = u(null), [k, A] = u("overview"), [j, we] = u(null), [M, N] = u({
124
+ }), b = () => {
125
+ let { navigate: _, basePath: v, apiGatewayUrl: b, authToken: x, workspacesGatewayUrl: S, workspaceId: C, getWorkspaceToken: w } = te(), { itemId: T } = de(), E = ne(b), [Se, D] = f(!0), [O, k] = f(null), [A, Ce] = f(null), [j, M] = f("overview"), [N, we] = f(null), [P, F] = f({
125
126
  name: "",
126
127
  shortDescription: "",
127
128
  longDescription: "",
@@ -145,13 +146,13 @@ var _ = ({ label: e, value: t }) => /* @__PURE__ */ m(h, {
145
146
  countryOfOrigin: "",
146
147
  warrantyInfo: "",
147
148
  returnPolicy: ""
148
- }), [P, Te] = u(""), [F, I] = u(""), [L, R] = u([]), { upload: Ee, uploading: z, progress: De, error: Oe } = c(b, y, x, S, "/DevPortal/Assets"), { upload: ke, uploading: B, progress: Ae, error: je } = c(b, y, x, S, "/DevPortal/Assets"), { upload: Me, uploading: V, progress: Ne, error: Pe } = c(b, y, x, S, "/DevPortal/Assets"), [H, U] = u(!1), [W, G] = u(null), [Fe, K] = u(!1), Ie = z || B || V, q = xe(M) && !Ie;
149
- async function J(e, t) {
150
- let n = await (await fetch(w, {
149
+ }), [I, Te] = f(""), [L, R] = f(""), [z, B] = f([]), { upload: Ee, uploading: V, progress: De, error: Oe } = c(S, x, C, w), { upload: ke, uploading: H, progress: Ae, error: je } = c(S, x, C, w), { upload: Me, uploading: U, progress: Ne, error: Pe } = c(S, x, C, w), [W, G] = f(!1), [K, q] = f(null), [Fe, Ie] = f(!1), Le = V || H || U, J = xe(P) && !Le;
150
+ async function Y(e, t) {
151
+ let n = await (await fetch(E, {
151
152
  method: "POST",
152
153
  headers: {
153
154
  "Content-Type": "application/json",
154
- ...y ? { Authorization: `Bearer ${y}` } : {}
155
+ ...x ? { Authorization: `Bearer ${x}` } : {}
155
156
  },
156
157
  credentials: "include",
157
158
  body: JSON.stringify({
@@ -163,18 +164,18 @@ var _ = ({ label: e, value: t }) => /* @__PURE__ */ m(h, {
163
164
  return n.data;
164
165
  }
165
166
  re(() => {
166
- if (!C) return;
167
+ if (!T) return;
167
168
  let e = !1;
168
- return T(!0), D(null), (async () => {
169
+ return D(!0), k(null), (async () => {
169
170
  try {
170
- let t = await J(ve, { id: C });
171
+ let t = await Y(ve, { id: T });
171
172
  if (e) return;
172
173
  let n = t.product;
173
174
  if (!n) {
174
- D("Product not found.");
175
+ k("Product not found.");
175
176
  return;
176
177
  }
177
- Ce(n.status), N({
178
+ Ce(n.status), F({
178
179
  name: n.name,
179
180
  shortDescription: n.description ?? "",
180
181
  longDescription: n.longDescription ?? "",
@@ -212,221 +213,222 @@ var _ = ({ label: e, value: t }) => /* @__PURE__ */ m(h, {
212
213
  reviewNotes: n.reviewNotes,
213
214
  rejectedReason: n.rejectedReason,
214
215
  publishedAt: n.publishedAt
215
- }), Te(n.icon ?? ""), I(n.bannerUrl ?? ""), R(n.screenshots ?? []);
216
+ }), Te(n.icon ?? ""), R(n.bannerUrl ?? ""), B(n.screenshots ?? []);
216
217
  } catch (t) {
217
- e || D(t instanceof Error ? t.message : "Failed to load product");
218
+ e || k(t instanceof Error ? t.message : "Failed to load product");
218
219
  } finally {
219
- e || T(!1);
220
+ e || D(!1);
220
221
  }
221
222
  })(), () => {
222
223
  e = !0;
223
224
  };
224
225
  }, [
225
- C,
226
- w,
227
- y
226
+ T,
227
+ E,
228
+ x
228
229
  ]);
229
- let Y = (e, t) => {
230
- N((n) => ({
230
+ let X = (e, t) => {
231
+ F((n) => ({
231
232
  ...n,
232
233
  [e]: t
233
234
  }));
234
- }, X = (e) => (t) => {
235
- Y(e, t.target.checked);
236
- }, Z = async (e = !1) => {
237
- if (q && !H && C) {
238
- U(!0), G(null), K(!1);
235
+ }, Z = (e) => (t) => {
236
+ X(e, t.target.checked);
237
+ }, Re = async (e = !1) => {
238
+ if (J && !W && T) {
239
+ G(!0), q(null), Ie(!1);
239
240
  try {
240
- let t = M.tags.split(",").map((e) => e.trim()).filter(Boolean), n = M.length.trim() || M.width.trim() || M.height.trim();
241
- await J(ye, {
242
- id: C,
241
+ let t = P.tags.split(",").map((e) => e.trim()).filter(Boolean), n = P.length.trim() || P.width.trim() || P.height.trim();
242
+ await Y(ye, {
243
+ id: T,
243
244
  input: {
244
- name: M.name.trim(),
245
- description: M.shortDescription.trim(),
246
- longDescription: M.longDescription.trim() || null,
247
- price: parseFloat(M.price),
248
- currency: M.currency,
245
+ name: P.name.trim(),
246
+ description: P.shortDescription.trim(),
247
+ longDescription: P.longDescription.trim() || null,
248
+ price: parseFloat(P.price),
249
+ currency: P.currency,
249
250
  tags: t.length > 0 ? t : null,
250
- stockQuantity: parseInt(M.stockQuantity, 10),
251
- sku: M.sku.trim() || null,
252
- trackInventory: M.trackInventory,
253
- allowBackorder: M.allowBackorder,
254
- lowStockThreshold: M.lowStockThreshold.trim() ? parseInt(M.lowStockThreshold, 10) : null,
255
- requiresShipping: M.requiresShipping,
256
- weight: M.requiresShipping && M.weightKg.trim() ? parseFloat(M.weightKg) : null,
257
- weightUnit: M.requiresShipping && M.weightKg.trim() ? M.weightUnit : null,
258
- length: M.requiresShipping && M.length.trim() ? parseFloat(M.length) : null,
259
- width: M.requiresShipping && M.width.trim() ? parseFloat(M.width) : null,
260
- height: M.requiresShipping && M.height.trim() ? parseFloat(M.height) : null,
261
- dimensionUnit: M.requiresShipping && n ? M.dimensionUnit : null,
262
- brand: M.brand.trim() || null,
263
- manufacturer: M.manufacturer.trim() || null,
264
- countryOfOrigin: M.countryOfOrigin.trim() || null,
265
- warrantyInfo: M.warrantyInfo.trim() || null,
266
- returnPolicy: M.returnPolicy.trim() || null,
267
- icon: P || null,
268
- bannerUrl: F || null,
269
- screenshots: L.length > 0 ? L : null
251
+ stockQuantity: parseInt(P.stockQuantity, 10),
252
+ sku: P.sku.trim() || null,
253
+ trackInventory: P.trackInventory,
254
+ allowBackorder: P.allowBackorder,
255
+ lowStockThreshold: P.lowStockThreshold.trim() ? parseInt(P.lowStockThreshold, 10) : null,
256
+ requiresShipping: P.requiresShipping,
257
+ weight: P.requiresShipping && P.weightKg.trim() ? parseFloat(P.weightKg) : null,
258
+ weightUnit: P.requiresShipping && P.weightKg.trim() ? P.weightUnit : null,
259
+ length: P.requiresShipping && P.length.trim() ? parseFloat(P.length) : null,
260
+ width: P.requiresShipping && P.width.trim() ? parseFloat(P.width) : null,
261
+ height: P.requiresShipping && P.height.trim() ? parseFloat(P.height) : null,
262
+ dimensionUnit: P.requiresShipping && n ? P.dimensionUnit : null,
263
+ brand: P.brand.trim() || null,
264
+ manufacturer: P.manufacturer.trim() || null,
265
+ countryOfOrigin: P.countryOfOrigin.trim() || null,
266
+ warrantyInfo: P.warrantyInfo.trim() || null,
267
+ returnPolicy: P.returnPolicy.trim() || null,
268
+ icon: I || null,
269
+ bannerUrl: L || null,
270
+ screenshots: z.length > 0 ? z : null
270
271
  }
271
- }), e && await J(be, {
272
- id: C,
272
+ }), e && await Y(be, {
273
+ id: T,
273
274
  notes: "Resubmitted after edits"
274
- }), K(!0), setTimeout(() => {
275
- h?.(`${g}/seller/items`);
275
+ }), Ie(!0), setTimeout(() => {
276
+ _?.(`${v}/seller/items`);
276
277
  }, 1500);
277
278
  } catch (e) {
278
- G(e instanceof Error ? e.message : "Save failed. Please try again.");
279
+ q(e instanceof Error ? e.message : "Save failed. Please try again.");
279
280
  } finally {
280
- U(!1);
281
+ G(!1);
281
282
  }
282
283
  }
283
284
  };
284
- if (Se) return /* @__PURE__ */ p(e, {
285
+ if (Se) return /* @__PURE__ */ h(e, {
285
286
  title: "Edit Item",
286
287
  backLink: "/seller/items",
287
288
  backLabel: "Back to My Items",
288
- children: /* @__PURE__ */ p("div", {
289
+ children: /* @__PURE__ */ h("div", {
289
290
  className: "flex items-center justify-center py-20",
290
- children: /* @__PURE__ */ p(d, { className: "h-8 w-8 animate-spin text-text-secondary" })
291
+ children: /* @__PURE__ */ h(p, { className: "h-8 w-8 animate-spin text-text-secondary" })
291
292
  })
292
293
  });
293
- if (E) return /* @__PURE__ */ p(e, {
294
+ if (O) return /* @__PURE__ */ h(e, {
294
295
  title: "Edit Item",
295
296
  backLink: "/seller/items",
296
297
  backLabel: "Back to My Items",
297
- children: /* @__PURE__ */ m("div", {
298
+ children: /* @__PURE__ */ g("div", {
298
299
  className: "flex items-center gap-3 rounded-lg border border-status-error-border/50 bg-status-error-bg/10 px-4 py-3 text-sm",
299
- children: [/* @__PURE__ */ p(ie, {
300
+ children: [/* @__PURE__ */ h(ie, {
300
301
  size: 16,
301
302
  className: "shrink-0 text-status-error-text"
302
- }), /* @__PURE__ */ p("span", {
303
+ }), /* @__PURE__ */ h("span", {
303
304
  className: "text-status-error-text",
304
- children: E
305
+ children: O
305
306
  })]
306
307
  })
307
308
  });
308
- let Q = O === "DRAFT" || O === "REJECTED", $ = O ? _e[O] : void 0;
309
- return /* @__PURE__ */ p(e, {
310
- title: /* @__PURE__ */ m("div", {
309
+ let Q = A === "DRAFT" || A === "REJECTED", $ = A ? _e[A] : void 0;
310
+ return /* @__PURE__ */ h(e, {
311
+ title: /* @__PURE__ */ g("div", {
311
312
  className: "flex items-center gap-3",
312
- children: [P ? /* @__PURE__ */ p("img", {
313
- src: P,
313
+ children: [/* @__PURE__ */ h(u, {
314
+ src: I,
314
315
  alt: "",
315
- className: "h-10 w-10 shrink-0 rounded-input border border-border-subtle object-cover"
316
- }) : /* @__PURE__ */ p("div", {
317
- className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-input border border-border-subtle bg-bg-sunken",
318
- children: /* @__PURE__ */ p(ce, {
319
- size: 16,
320
- className: "text-text-muted"
316
+ className: "h-10 w-10 shrink-0 rounded-input border border-border-subtle object-cover",
317
+ fallback: /* @__PURE__ */ h("div", {
318
+ className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-input border border-border-subtle bg-bg-sunken",
319
+ children: /* @__PURE__ */ h(ce, {
320
+ size: 16,
321
+ className: "text-text-muted"
322
+ })
321
323
  })
322
- }), /* @__PURE__ */ p("span", { children: M.name || "Item" })]
324
+ }), /* @__PURE__ */ h("span", { children: P.name || "Item" })]
323
325
  }),
324
- description: M.shortDescription || void 0,
326
+ description: P.shortDescription || void 0,
325
327
  purpose: "Everything about this listing in one place — its performance, its store presence, and its editable details. Use the tabs to review or update it.",
326
328
  backLink: "/seller/items",
327
329
  backLabel: "Back to My Items",
328
- actions: k === "overview" ? /* @__PURE__ */ m("button", {
330
+ actions: j === "overview" ? /* @__PURE__ */ g("button", {
329
331
  type: "button",
330
- onClick: () => A("edit"),
332
+ onClick: () => M("edit"),
331
333
  className: "inline-flex items-center gap-2 rounded-button bg-action-primary-bg px-5 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
332
- children: [/* @__PURE__ */ p(se, { size: 15 }), "Edit Listing"]
334
+ children: [/* @__PURE__ */ h(se, { size: 15 }), "Edit Listing"]
333
335
  }) : void 0,
334
- children: /* @__PURE__ */ m("div", {
336
+ children: /* @__PURE__ */ g("div", {
335
337
  className: "space-y-6",
336
338
  children: [
337
- Fe && /* @__PURE__ */ p("div", {
339
+ Fe && /* @__PURE__ */ h("div", {
338
340
  className: "rounded-card border border-status-success-text/30 bg-status-success-bg-subtle px-4 py-3 text-sm text-status-success-text",
339
341
  children: "Saved successfully! Redirecting to your items..."
340
342
  }),
341
- W && /* @__PURE__ */ p("div", {
343
+ K && /* @__PURE__ */ h("div", {
342
344
  className: "rounded-card border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
343
- children: W
345
+ children: K
344
346
  }),
345
- /* @__PURE__ */ m("div", {
347
+ /* @__PURE__ */ g("div", {
346
348
  className: "flex flex-wrap items-center gap-2",
347
349
  children: [
348
- $ && /* @__PURE__ */ p("span", {
350
+ $ && /* @__PURE__ */ h("span", {
349
351
  className: l("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium", $.className),
350
352
  children: $.label
351
353
  }),
352
- /* @__PURE__ */ p("span", {
354
+ /* @__PURE__ */ h("span", {
353
355
  className: "text-sm text-text-secondary",
354
- children: ge[j?.type ?? ""] || j?.type
356
+ children: ge[N?.type ?? ""] || N?.type
355
357
  }),
356
- j?.category && /* @__PURE__ */ p("span", {
358
+ N?.category && /* @__PURE__ */ h("span", {
357
359
  className: "rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs text-text-secondary",
358
- children: j.category
360
+ children: N.category
359
361
  })
360
362
  ]
361
363
  }),
362
- O === "PENDING_REVIEW" && /* @__PURE__ */ m("div", {
364
+ A === "PENDING_REVIEW" && /* @__PURE__ */ g("div", {
363
365
  className: "flex items-start gap-3 rounded-lg border border-border-subtle bg-status-warning-bg-subtle p-4",
364
- children: [/* @__PURE__ */ p(oe, {
366
+ children: [/* @__PURE__ */ h(oe, {
365
367
  size: 18,
366
368
  className: "text-status-warning-text mt-0.5 flex-shrink-0"
367
- }), /* @__PURE__ */ m("div", {
369
+ }), /* @__PURE__ */ g("div", {
368
370
  className: "text-sm",
369
- children: [/* @__PURE__ */ p("p", {
371
+ children: [/* @__PURE__ */ h("p", {
370
372
  className: "font-medium text-status-warning-text",
371
373
  children: "Under Review"
372
- }), /* @__PURE__ */ m("p", {
374
+ }), /* @__PURE__ */ g("p", {
373
375
  className: "mt-0.5 text-text-secondary",
374
- children: ["Your listing is being reviewed by our team. You'll be notified of the outcome.", j?.submittedAt && /* @__PURE__ */ m("span", {
376
+ children: ["Your listing is being reviewed by our team. You'll be notified of the outcome.", N?.submittedAt && /* @__PURE__ */ g("span", {
375
377
  className: "ml-1",
376
378
  children: [
377
379
  "Submitted",
378
380
  " ",
379
- new Date(j.submittedAt).toLocaleDateString(),
381
+ new Date(N.submittedAt).toLocaleDateString(),
380
382
  "."
381
383
  ]
382
384
  })]
383
385
  })]
384
386
  })]
385
387
  }),
386
- O === "REJECTED" && /* @__PURE__ */ m("div", {
388
+ A === "REJECTED" && /* @__PURE__ */ g("div", {
387
389
  className: "flex items-start gap-3 rounded-lg border border-status-error-bg bg-status-error-bg-subtle p-4",
388
- children: [/* @__PURE__ */ p(ue, {
390
+ children: [/* @__PURE__ */ h(ue, {
389
391
  size: 18,
390
392
  className: "text-status-error-text mt-0.5 flex-shrink-0"
391
- }), /* @__PURE__ */ m("div", {
393
+ }), /* @__PURE__ */ g("div", {
392
394
  className: "text-sm",
393
395
  children: [
394
- /* @__PURE__ */ p("p", {
396
+ /* @__PURE__ */ h("p", {
395
397
  className: "font-medium text-status-error-text",
396
398
  children: "Review Rejected"
397
399
  }),
398
- /* @__PURE__ */ p("p", {
400
+ /* @__PURE__ */ h("p", {
399
401
  className: "mt-0.5 text-text-secondary",
400
- children: j?.rejectedReason || j?.reviewNotes || "Your submission was not approved. Please review the feedback, update your listing, and re-submit."
402
+ children: N?.rejectedReason || N?.reviewNotes || "Your submission was not approved. Please review the feedback, update your listing, and re-submit."
401
403
  }),
402
- /* @__PURE__ */ p("button", {
404
+ /* @__PURE__ */ h("button", {
403
405
  type: "button",
404
- onClick: () => A("edit"),
406
+ onClick: () => M("edit"),
405
407
  className: "mt-2 inline-flex items-center gap-1 text-xs font-medium text-primary underline",
406
408
  children: "Edit listing and re-submit →"
407
409
  })
408
410
  ]
409
411
  })]
410
412
  }),
411
- O === "PUBLISHED" && /* @__PURE__ */ m("div", {
413
+ A === "PUBLISHED" && /* @__PURE__ */ g("div", {
412
414
  className: "flex items-start gap-3 rounded-lg border border-status-success-bg bg-status-success-bg-subtle p-4",
413
- children: [/* @__PURE__ */ p(ae, {
415
+ children: [/* @__PURE__ */ h(ae, {
414
416
  size: 18,
415
417
  className: "text-status-success-text mt-0.5 flex-shrink-0"
416
- }), /* @__PURE__ */ m("div", {
418
+ }), /* @__PURE__ */ g("div", {
417
419
  className: "text-sm",
418
- children: [/* @__PURE__ */ p("p", {
420
+ children: [/* @__PURE__ */ h("p", {
419
421
  className: "font-medium text-status-success-text",
420
422
  children: "Live in the Store"
421
- }), /* @__PURE__ */ p("p", {
423
+ }), /* @__PURE__ */ h("p", {
422
424
  className: "mt-0.5 text-text-secondary",
423
425
  children: "Your listing is published and visible to buyers in the marketplace."
424
426
  })]
425
427
  })]
426
428
  }),
427
- /* @__PURE__ */ p("div", {
429
+ /* @__PURE__ */ h("div", {
428
430
  className: "border-b",
429
- children: /* @__PURE__ */ p("nav", {
431
+ children: /* @__PURE__ */ h("nav", {
430
432
  className: "-mb-px flex gap-4 overflow-x-auto",
431
433
  role: "tablist",
432
434
  "aria-label": "Item sections",
@@ -436,492 +438,495 @@ var _ = ({ label: e, value: t }) => /* @__PURE__ */ m(h, {
436
438
  }, {
437
439
  id: "edit",
438
440
  label: "Edit Listing"
439
- }].map((e) => /* @__PURE__ */ p("button", {
441
+ }].map((e) => /* @__PURE__ */ h("button", {
440
442
  id: `item-tab-${e.id}`,
441
443
  role: "tab",
442
- "aria-selected": k === e.id,
444
+ "aria-selected": j === e.id,
443
445
  "aria-controls": `item-panel-${e.id}`,
444
- onClick: () => A(e.id),
445
- className: l("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors", k === e.id ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary hover:border-muted-foreground"),
446
+ onClick: () => M(e.id),
447
+ className: l("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors", j === e.id ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary hover:border-muted-foreground"),
446
448
  children: e.label
447
449
  }, e.id))
448
450
  })
449
451
  }),
450
- k === "overview" && /* @__PURE__ */ m("div", {
452
+ j === "overview" && /* @__PURE__ */ g("div", {
451
453
  id: "item-panel-overview",
452
454
  role: "tabpanel",
453
455
  "aria-labelledby": "item-tab-overview",
454
456
  className: "grid gap-6 lg:grid-cols-3",
455
- children: [/* @__PURE__ */ m("div", {
457
+ children: [/* @__PURE__ */ g("div", {
456
458
  className: "lg:col-span-2 space-y-6",
457
459
  children: [
458
- /* @__PURE__ */ p(fe, { children: /* @__PURE__ */ m("div", {
460
+ /* @__PURE__ */ h(fe, { children: /* @__PURE__ */ g("div", {
459
461
  className: "grid gap-4 sm:grid-cols-4",
460
462
  children: [
461
- /* @__PURE__ */ p(_, {
463
+ /* @__PURE__ */ h(y, {
462
464
  label: "Price",
463
- value: `${M.currency} ${Number(M.price || 0).toFixed(2)}`
465
+ value: `${P.currency} ${Number(P.price || 0).toFixed(2)}`
464
466
  }),
465
- /* @__PURE__ */ p(_, {
467
+ /* @__PURE__ */ h(y, {
466
468
  label: "Stock",
467
- value: M.stockQuantity || "0"
469
+ value: P.stockQuantity || "0"
468
470
  }),
469
- /* @__PURE__ */ p(_, {
471
+ /* @__PURE__ */ h(y, {
470
472
  label: "Views",
471
- value: (j?.viewCount ?? 0).toLocaleString()
473
+ value: (N?.viewCount ?? 0).toLocaleString()
472
474
  }),
473
- /* @__PURE__ */ p(_, {
475
+ /* @__PURE__ */ h(y, {
474
476
  label: "Rating",
475
- value: j?.rating ? `${j.rating.toFixed(1)} ★` : "N/A"
477
+ value: N?.rating ? `${N.rating.toFixed(1)} ★` : "N/A"
476
478
  })
477
479
  ]
478
480
  }) }),
479
- /* @__PURE__ */ p(t, {
481
+ /* @__PURE__ */ h(t, {
480
482
  title: "Product Images",
481
- children: P || F || L.length > 0 ? /* @__PURE__ */ m("div", {
483
+ children: I || L || z.length > 0 ? /* @__PURE__ */ g("div", {
482
484
  className: "space-y-4",
483
- children: [/* @__PURE__ */ m("div", {
485
+ children: [/* @__PURE__ */ g("div", {
484
486
  className: "flex flex-wrap gap-4",
485
- children: [P && /* @__PURE__ */ m("div", {
487
+ children: [I && /* @__PURE__ */ g("div", {
486
488
  className: "space-y-1",
487
- children: [/* @__PURE__ */ p("img", {
488
- src: P,
489
+ children: [/* @__PURE__ */ h(u, {
490
+ src: I,
489
491
  alt: "Icon",
490
- className: "h-24 w-24 rounded-input border border-border-subtle object-cover"
491
- }), /* @__PURE__ */ p("p", {
492
+ className: "h-24 w-24 rounded-input border border-border-subtle object-cover",
493
+ fallback: /* @__PURE__ */ h(d, { className: "h-24 w-24" })
494
+ }), /* @__PURE__ */ h("p", {
492
495
  className: "text-xs text-text-muted",
493
496
  children: "Icon"
494
497
  })]
495
- }), F && /* @__PURE__ */ m("div", {
498
+ }), L && /* @__PURE__ */ g("div", {
496
499
  className: "space-y-1",
497
- children: [/* @__PURE__ */ p("img", {
498
- src: F,
500
+ children: [/* @__PURE__ */ h(u, {
501
+ src: L,
499
502
  alt: "Banner",
500
- className: "h-24 w-24 rounded-input border border-border-subtle object-cover"
501
- }), /* @__PURE__ */ p("p", {
503
+ className: "h-24 w-24 rounded-input border border-border-subtle object-cover",
504
+ fallback: /* @__PURE__ */ h(d, { className: "h-24 w-24" })
505
+ }), /* @__PURE__ */ h("p", {
502
506
  className: "text-xs text-text-muted",
503
507
  children: "Banner"
504
508
  })]
505
509
  })]
506
- }), L.length > 0 && /* @__PURE__ */ m("div", {
510
+ }), z.length > 0 && /* @__PURE__ */ g("div", {
507
511
  className: "space-y-1",
508
- children: [/* @__PURE__ */ p("p", {
512
+ children: [/* @__PURE__ */ h("p", {
509
513
  className: "text-xs text-text-muted",
510
514
  children: "Screenshots"
511
- }), /* @__PURE__ */ p("div", {
515
+ }), /* @__PURE__ */ h("div", {
512
516
  className: "flex flex-wrap gap-3",
513
- children: L.map((e, t) => /* @__PURE__ */ p("img", {
517
+ children: z.map((e, t) => /* @__PURE__ */ h(u, {
514
518
  src: e,
515
519
  alt: `Screenshot ${t + 1}`,
516
- className: "h-24 w-36 rounded-input border border-border-subtle object-cover"
520
+ className: "h-24 w-36 rounded-input border border-border-subtle object-cover",
521
+ fallback: /* @__PURE__ */ h(d, { className: "h-24 w-36" })
517
522
  }, e))
518
523
  })]
519
524
  })]
520
- }) : /* @__PURE__ */ p("p", {
525
+ }) : /* @__PURE__ */ h("p", {
521
526
  className: "text-sm text-text-secondary",
522
527
  children: "No images uploaded yet."
523
528
  })
524
529
  }),
525
- /* @__PURE__ */ m(t, {
530
+ /* @__PURE__ */ g(t, {
526
531
  title: "Description",
527
- children: [M.shortDescription && /* @__PURE__ */ p("p", {
532
+ children: [P.shortDescription && /* @__PURE__ */ h("p", {
528
533
  className: "text-sm font-medium text-text-primary",
529
- children: M.shortDescription
530
- }), M.longDescription ? /* @__PURE__ */ p("p", {
534
+ children: P.shortDescription
535
+ }), P.longDescription ? /* @__PURE__ */ h("p", {
531
536
  className: "mt-2 whitespace-pre-wrap text-sm text-text-secondary",
532
- children: M.longDescription
533
- }) : !M.shortDescription && /* @__PURE__ */ p("p", {
537
+ children: P.longDescription
538
+ }) : !P.shortDescription && /* @__PURE__ */ h("p", {
534
539
  className: "text-sm text-text-secondary",
535
540
  children: "No description provided."
536
541
  })]
537
542
  }),
538
- M.tags && /* @__PURE__ */ p(t, {
543
+ P.tags && /* @__PURE__ */ h(t, {
539
544
  title: "Tags",
540
- children: /* @__PURE__ */ p("div", {
545
+ children: /* @__PURE__ */ h("div", {
541
546
  className: "flex flex-wrap gap-2",
542
- children: M.tags.split(",").map((e) => e.trim()).filter(Boolean).map((e) => /* @__PURE__ */ p("span", {
547
+ children: P.tags.split(",").map((e) => e.trim()).filter(Boolean).map((e) => /* @__PURE__ */ h("span", {
543
548
  className: "rounded-full bg-action-primary-bg/10 px-3 py-1 text-xs font-medium text-primary",
544
549
  children: e
545
550
  }, e))
546
551
  })
547
552
  })
548
553
  ]
549
- }), /* @__PURE__ */ m("div", {
554
+ }), /* @__PURE__ */ g("div", {
550
555
  className: "space-y-6",
551
- children: [/* @__PURE__ */ p(t, {
556
+ children: [/* @__PURE__ */ h(t, {
552
557
  title: "Details",
553
- children: /* @__PURE__ */ p(s, { items: [
558
+ children: /* @__PURE__ */ h(s, { items: [
554
559
  {
555
560
  label: "Item ID",
556
- value: /* @__PURE__ */ p("code", {
561
+ value: /* @__PURE__ */ h("code", {
557
562
  className: "text-xs",
558
- children: C
563
+ children: T
559
564
  })
560
565
  },
561
566
  {
562
567
  label: "Slug",
563
- value: j?.slug ?? "—"
568
+ value: N?.slug ?? "—"
564
569
  },
565
570
  {
566
571
  label: "SKU",
567
- value: M.sku || "—"
572
+ value: P.sku || "—"
568
573
  },
569
574
  {
570
575
  label: "Brand",
571
- value: M.brand || "—"
576
+ value: P.brand || "—"
572
577
  },
573
578
  {
574
579
  label: "Created",
575
- value: j?.createdAt ? new Date(j.createdAt).toLocaleDateString() : "—"
580
+ value: N?.createdAt ? new Date(N.createdAt).toLocaleDateString() : "—"
576
581
  },
577
582
  {
578
583
  label: "Updated",
579
- value: j?.updatedAt ? new Date(j.updatedAt).toLocaleDateString() : "—"
584
+ value: N?.updatedAt ? new Date(N.updatedAt).toLocaleDateString() : "—"
580
585
  },
581
- ...j?.publishedAt ? [{
586
+ ...N?.publishedAt ? [{
582
587
  label: "Published",
583
- value: new Date(j.publishedAt).toLocaleDateString()
588
+ value: new Date(N.publishedAt).toLocaleDateString()
584
589
  }] : []
585
590
  ] })
586
- }), /* @__PURE__ */ p(t, {
591
+ }), /* @__PURE__ */ h(t, {
587
592
  title: "Inventory & Shipping",
588
- children: /* @__PURE__ */ p(s, { items: [
593
+ children: /* @__PURE__ */ h(s, { items: [
589
594
  {
590
595
  label: "Stock quantity",
591
- value: M.stockQuantity || "0"
596
+ value: P.stockQuantity || "0"
592
597
  },
593
598
  {
594
599
  label: "Track inventory",
595
- value: M.trackInventory ? "Yes" : "No"
600
+ value: P.trackInventory ? "Yes" : "No"
596
601
  },
597
602
  {
598
603
  label: "Requires shipping",
599
- value: M.requiresShipping ? "Yes" : "No"
604
+ value: P.requiresShipping ? "Yes" : "No"
600
605
  },
601
- ...M.requiresShipping && M.weightKg ? [{
606
+ ...P.requiresShipping && P.weightKg ? [{
602
607
  label: "Weight",
603
- value: `${M.weightKg} ${M.weightUnit.toLowerCase()}`
608
+ value: `${P.weightKg} ${P.weightUnit.toLowerCase()}`
604
609
  }] : []
605
610
  ] })
606
611
  })]
607
612
  })]
608
613
  }),
609
- k === "edit" && /* @__PURE__ */ m("div", {
614
+ j === "edit" && /* @__PURE__ */ g("div", {
610
615
  id: "item-panel-edit",
611
616
  role: "tabpanel",
612
617
  "aria-labelledby": "item-tab-edit",
613
618
  className: "space-y-8 max-w-3xl",
614
619
  children: [
615
- O && /* @__PURE__ */ m("div", {
620
+ A && /* @__PURE__ */ g("div", {
616
621
  className: "flex items-start gap-2 rounded-input border border-border-subtle bg-bg-sunken px-3 py-2 text-xs text-text-secondary",
617
622
  children: [
618
- /* @__PURE__ */ p(le, {
623
+ /* @__PURE__ */ h(le, {
619
624
  size: 13,
620
625
  className: "mt-0.5 shrink-0 text-text-muted"
621
626
  }),
622
627
  "Current status:",
623
628
  " ",
624
- /* @__PURE__ */ p("span", {
629
+ /* @__PURE__ */ h("span", {
625
630
  className: "font-medium text-text-primary",
626
- children: O.replace(/_/g, " ")
631
+ children: A.replace(/_/g, " ")
627
632
  }),
628
- Q && /* @__PURE__ */ p("span", {
633
+ Q && /* @__PURE__ */ h("span", {
629
634
  className: "ml-1",
630
635
  children: "— use \"Save & Resubmit\" to send it for review again."
631
636
  })
632
637
  ]
633
638
  }),
634
- /* @__PURE__ */ p(t, {
639
+ /* @__PURE__ */ h(t, {
635
640
  title: "Basic Information",
636
641
  description: "Core details shown in the store listing.",
637
- children: /* @__PURE__ */ m("div", {
642
+ children: /* @__PURE__ */ g("div", {
638
643
  className: "rounded-card border border-border-seam bg-bg-surface p-6 space-y-5",
639
644
  children: [
640
- /* @__PURE__ */ p(r, {
645
+ /* @__PURE__ */ h(r, {
641
646
  label: "Name",
642
647
  required: !0,
643
- value: M.name,
644
- onChange: (e) => Y("name", e.target.value),
648
+ value: P.name,
649
+ onChange: (e) => X("name", e.target.value),
645
650
  placeholder: "e.g. Wireless Ergonomic Keyboard",
646
651
  maxLength: 120
647
652
  }),
648
- /* @__PURE__ */ p(r, {
653
+ /* @__PURE__ */ h(r, {
649
654
  label: "Short Description",
650
655
  required: !0,
651
- value: M.shortDescription,
652
- onChange: (e) => Y("shortDescription", e.target.value),
656
+ value: P.shortDescription,
657
+ onChange: (e) => X("shortDescription", e.target.value),
653
658
  placeholder: "One-line summary shown on the store card",
654
659
  maxLength: 160,
655
- hint: `${M.shortDescription.length}/160`
660
+ hint: `${P.shortDescription.length}/160`
656
661
  }),
657
- /* @__PURE__ */ p(a, {
662
+ /* @__PURE__ */ h(a, {
658
663
  label: "Long Description",
659
- value: M.longDescription,
660
- onChange: (e) => Y("longDescription", e.target.value),
664
+ value: P.longDescription,
665
+ onChange: (e) => X("longDescription", e.target.value),
661
666
  rows: 5,
662
667
  placeholder: "Detailed product description, features, specs…"
663
668
  })
664
669
  ]
665
670
  })
666
671
  }),
667
- /* @__PURE__ */ p(t, {
672
+ /* @__PURE__ */ h(t, {
668
673
  title: "Product Images",
669
674
  description: "Visual assets shown to buyers browsing the store.",
670
- children: /* @__PURE__ */ m("div", {
675
+ children: /* @__PURE__ */ g("div", {
671
676
  className: "rounded-card border border-border-seam bg-bg-surface p-6 space-y-5",
672
- children: [/* @__PURE__ */ m("div", {
677
+ children: [/* @__PURE__ */ g("div", {
673
678
  className: "grid gap-5 sm:grid-cols-2",
674
- children: [/* @__PURE__ */ p(o, {
679
+ children: [/* @__PURE__ */ h(o, {
675
680
  label: "Icon",
676
- value: P,
681
+ value: I,
677
682
  onChange: Te,
678
683
  hint: "Shown in marketplace cards and search — square proportions (1:1)",
679
684
  aspectClass: "aspect-square",
680
685
  upload: Ee,
681
- uploading: z,
686
+ uploading: V,
682
687
  progress: De,
683
688
  error: Oe
684
- }), /* @__PURE__ */ p(o, {
689
+ }), /* @__PURE__ */ h(o, {
685
690
  label: "Banner",
686
- value: F,
687
- onChange: I,
691
+ value: L,
692
+ onChange: R,
688
693
  hint: "Fills the right panel on the product page — square or portrait works best on all screen sizes (1:1)",
689
694
  aspectClass: "aspect-square",
690
695
  upload: ke,
691
- uploading: B,
696
+ uploading: H,
692
697
  progress: Ae,
693
698
  error: je
694
699
  })]
695
- }), /* @__PURE__ */ p(ee, {
696
- urls: L,
697
- onChange: R,
700
+ }), /* @__PURE__ */ h(ee, {
701
+ urls: z,
702
+ onChange: B,
698
703
  upload: Me,
699
- uploading: V,
704
+ uploading: U,
700
705
  progress: Ne,
701
706
  error: Pe
702
707
  })]
703
708
  })
704
709
  }),
705
- /* @__PURE__ */ p(t, {
710
+ /* @__PURE__ */ h(t, {
706
711
  title: "Pricing",
707
- children: /* @__PURE__ */ m("div", {
712
+ children: /* @__PURE__ */ g("div", {
708
713
  className: "rounded-card border border-border-seam bg-bg-surface p-6 space-y-5",
709
- children: [/* @__PURE__ */ m("div", {
714
+ children: [/* @__PURE__ */ g("div", {
710
715
  className: "grid grid-cols-1 gap-5 sm:grid-cols-2",
711
- children: [/* @__PURE__ */ p(r, {
716
+ children: [/* @__PURE__ */ h(r, {
712
717
  label: "Price",
713
718
  required: !0,
714
719
  type: "number",
715
- value: M.price,
716
- onChange: (e) => Y("price", e.target.value),
720
+ value: P.price,
721
+ onChange: (e) => X("price", e.target.value),
717
722
  placeholder: "0.00",
718
723
  min: .01,
719
724
  step: "0.01"
720
- }), /* @__PURE__ */ p(i, {
725
+ }), /* @__PURE__ */ h(i, {
721
726
  label: "Currency",
722
727
  required: !0,
723
- value: M.currency,
724
- onChange: (e) => Y("currency", e.target.value),
728
+ value: P.currency,
729
+ onChange: (e) => X("currency", e.target.value),
725
730
  options: pe,
726
731
  placeholder: "Select currency"
727
732
  })]
728
- }), /* @__PURE__ */ p(r, {
733
+ }), /* @__PURE__ */ h(r, {
729
734
  label: "Tags",
730
- value: M.tags,
731
- onChange: (e) => Y("tags", e.target.value),
735
+ value: P.tags,
736
+ onChange: (e) => X("tags", e.target.value),
732
737
  placeholder: "mechanical, wireless, ergonomic",
733
738
  hint: "Comma-separated keywords."
734
739
  })]
735
740
  })
736
741
  }),
737
- /* @__PURE__ */ p(t, {
742
+ /* @__PURE__ */ h(t, {
738
743
  title: "Inventory",
739
- children: /* @__PURE__ */ m("div", {
744
+ children: /* @__PURE__ */ g("div", {
740
745
  className: "rounded-card border border-border-seam bg-bg-surface p-6 space-y-5",
741
746
  children: [
742
- /* @__PURE__ */ m("div", {
747
+ /* @__PURE__ */ g("div", {
743
748
  className: "grid grid-cols-1 gap-5 sm:grid-cols-2",
744
- children: [/* @__PURE__ */ p(r, {
749
+ children: [/* @__PURE__ */ h(r, {
745
750
  label: "Stock Quantity",
746
751
  required: !0,
747
752
  type: "number",
748
- value: M.stockQuantity,
749
- onChange: (e) => Y("stockQuantity", e.target.value),
753
+ value: P.stockQuantity,
754
+ onChange: (e) => X("stockQuantity", e.target.value),
750
755
  min: 0,
751
756
  step: 1
752
- }), /* @__PURE__ */ p(r, {
757
+ }), /* @__PURE__ */ h(r, {
753
758
  label: "SKU",
754
- value: M.sku,
755
- onChange: (e) => Y("sku", e.target.value),
759
+ value: P.sku,
760
+ onChange: (e) => X("sku", e.target.value),
756
761
  placeholder: "e.g. KB-WL-001",
757
762
  hint: "Your internal stock-keeping unit reference."
758
763
  })]
759
764
  }),
760
- /* @__PURE__ */ p(r, {
765
+ /* @__PURE__ */ h(r, {
761
766
  label: "Low Stock Threshold",
762
767
  type: "number",
763
- value: M.lowStockThreshold,
764
- onChange: (e) => Y("lowStockThreshold", e.target.value),
768
+ value: P.lowStockThreshold,
769
+ onChange: (e) => X("lowStockThreshold", e.target.value),
765
770
  placeholder: "e.g. 5",
766
771
  min: 0,
767
772
  step: 1,
768
773
  hint: "Get flagged when stock falls to or below this number."
769
774
  }),
770
- /* @__PURE__ */ p(n, {
775
+ /* @__PURE__ */ h(n, {
771
776
  label: "Track Inventory",
772
777
  description: "Automatically reduce stock when orders are placed.",
773
- checked: M.trackInventory,
774
- onChange: X("trackInventory")
778
+ checked: P.trackInventory,
779
+ onChange: Z("trackInventory")
775
780
  }),
776
- /* @__PURE__ */ p(n, {
781
+ /* @__PURE__ */ h(n, {
777
782
  label: "Allow Backorder",
778
783
  description: "Let buyers order even when stock quantity is zero.",
779
- checked: M.allowBackorder,
780
- onChange: X("allowBackorder")
784
+ checked: P.allowBackorder,
785
+ onChange: Z("allowBackorder")
781
786
  })
782
787
  ]
783
788
  })
784
789
  }),
785
- /* @__PURE__ */ p(t, {
790
+ /* @__PURE__ */ h(t, {
786
791
  title: "Shipping",
787
- children: /* @__PURE__ */ m("div", {
792
+ children: /* @__PURE__ */ g("div", {
788
793
  className: "rounded-card border border-border-seam bg-bg-surface p-6 space-y-5",
789
- children: [/* @__PURE__ */ p(n, {
794
+ children: [/* @__PURE__ */ h(n, {
790
795
  label: "Requires Shipping",
791
796
  description: "This item will be physically shipped to the buyer.",
792
- checked: M.requiresShipping,
793
- onChange: X("requiresShipping")
794
- }), M.requiresShipping && /* @__PURE__ */ m(f, { children: [
795
- /* @__PURE__ */ m("div", {
797
+ checked: P.requiresShipping,
798
+ onChange: Z("requiresShipping")
799
+ }), P.requiresShipping && /* @__PURE__ */ g(m, { children: [
800
+ /* @__PURE__ */ g("div", {
796
801
  className: "grid grid-cols-1 gap-5 sm:grid-cols-2",
797
- children: [/* @__PURE__ */ p(r, {
802
+ children: [/* @__PURE__ */ h(r, {
798
803
  label: "Weight",
799
804
  type: "number",
800
- value: M.weightKg,
801
- onChange: (e) => Y("weightKg", e.target.value),
805
+ value: P.weightKg,
806
+ onChange: (e) => X("weightKg", e.target.value),
802
807
  placeholder: "0.0",
803
808
  min: 0,
804
809
  step: "0.01",
805
810
  hint: "Used to calculate shipping costs."
806
- }), /* @__PURE__ */ p(i, {
811
+ }), /* @__PURE__ */ h(i, {
807
812
  label: "Weight Unit",
808
- value: M.weightUnit,
809
- onChange: (e) => Y("weightUnit", e.target.value),
813
+ value: P.weightUnit,
814
+ onChange: (e) => X("weightUnit", e.target.value),
810
815
  options: me
811
816
  })]
812
817
  }),
813
- /* @__PURE__ */ m("div", {
818
+ /* @__PURE__ */ g("div", {
814
819
  className: "grid grid-cols-1 gap-5 sm:grid-cols-3",
815
820
  children: [
816
- /* @__PURE__ */ p(r, {
821
+ /* @__PURE__ */ h(r, {
817
822
  label: "Length",
818
823
  type: "number",
819
- value: M.length,
820
- onChange: (e) => Y("length", e.target.value),
824
+ value: P.length,
825
+ onChange: (e) => X("length", e.target.value),
821
826
  placeholder: "0.0",
822
827
  min: 0,
823
828
  step: "0.01"
824
829
  }),
825
- /* @__PURE__ */ p(r, {
830
+ /* @__PURE__ */ h(r, {
826
831
  label: "Width",
827
832
  type: "number",
828
- value: M.width,
829
- onChange: (e) => Y("width", e.target.value),
833
+ value: P.width,
834
+ onChange: (e) => X("width", e.target.value),
830
835
  placeholder: "0.0",
831
836
  min: 0,
832
837
  step: "0.01"
833
838
  }),
834
- /* @__PURE__ */ p(r, {
839
+ /* @__PURE__ */ h(r, {
835
840
  label: "Height",
836
841
  type: "number",
837
- value: M.height,
838
- onChange: (e) => Y("height", e.target.value),
842
+ value: P.height,
843
+ onChange: (e) => X("height", e.target.value),
839
844
  placeholder: "0.0",
840
845
  min: 0,
841
846
  step: "0.01"
842
847
  })
843
848
  ]
844
849
  }),
845
- /* @__PURE__ */ p(i, {
850
+ /* @__PURE__ */ h(i, {
846
851
  label: "Dimension Unit",
847
- value: M.dimensionUnit,
848
- onChange: (e) => Y("dimensionUnit", e.target.value),
852
+ value: P.dimensionUnit,
853
+ onChange: (e) => X("dimensionUnit", e.target.value),
849
854
  options: he,
850
855
  hint: "Applies to length, width, and height above."
851
856
  })
852
857
  ] })]
853
858
  })
854
859
  }),
855
- /* @__PURE__ */ p(t, {
860
+ /* @__PURE__ */ h(t, {
856
861
  title: "Product Details",
857
862
  description: "Optional supplemental information for buyers.",
858
- children: /* @__PURE__ */ m("div", {
863
+ children: /* @__PURE__ */ g("div", {
859
864
  className: "rounded-card border border-border-seam bg-bg-surface p-6 space-y-5",
860
865
  children: [
861
- /* @__PURE__ */ m("div", {
866
+ /* @__PURE__ */ g("div", {
862
867
  className: "grid grid-cols-1 gap-5 sm:grid-cols-2",
863
- children: [/* @__PURE__ */ p(r, {
868
+ children: [/* @__PURE__ */ h(r, {
864
869
  label: "Brand",
865
- value: M.brand,
866
- onChange: (e) => Y("brand", e.target.value),
870
+ value: P.brand,
871
+ onChange: (e) => X("brand", e.target.value),
867
872
  placeholder: "e.g. Logitech"
868
- }), /* @__PURE__ */ p(r, {
873
+ }), /* @__PURE__ */ h(r, {
869
874
  label: "Manufacturer",
870
- value: M.manufacturer,
871
- onChange: (e) => Y("manufacturer", e.target.value),
875
+ value: P.manufacturer,
876
+ onChange: (e) => X("manufacturer", e.target.value),
872
877
  placeholder: "e.g. Logitech Manufacturing Ltd."
873
878
  })]
874
879
  }),
875
- /* @__PURE__ */ p(r, {
880
+ /* @__PURE__ */ h(r, {
876
881
  label: "Country of Origin",
877
- value: M.countryOfOrigin,
878
- onChange: (e) => Y("countryOfOrigin", e.target.value),
882
+ value: P.countryOfOrigin,
883
+ onChange: (e) => X("countryOfOrigin", e.target.value),
879
884
  placeholder: "e.g. China"
880
885
  }),
881
- /* @__PURE__ */ p(r, {
886
+ /* @__PURE__ */ h(r, {
882
887
  label: "Warranty Info",
883
- value: M.warrantyInfo,
884
- onChange: (e) => Y("warrantyInfo", e.target.value),
888
+ value: P.warrantyInfo,
889
+ onChange: (e) => X("warrantyInfo", e.target.value),
885
890
  placeholder: "e.g. 1-year limited manufacturer warranty"
886
891
  }),
887
- /* @__PURE__ */ p(a, {
892
+ /* @__PURE__ */ h(a, {
888
893
  label: "Return Policy",
889
- value: M.returnPolicy,
890
- onChange: (e) => Y("returnPolicy", e.target.value),
894
+ value: P.returnPolicy,
895
+ onChange: (e) => X("returnPolicy", e.target.value),
891
896
  rows: 3,
892
897
  placeholder: "e.g. 30-day returns accepted"
893
898
  })
894
899
  ]
895
900
  })
896
901
  }),
897
- /* @__PURE__ */ m("div", {
902
+ /* @__PURE__ */ g("div", {
898
903
  className: "flex flex-wrap items-center gap-3 pb-8",
899
904
  children: [
900
- /* @__PURE__ */ p("button", {
905
+ /* @__PURE__ */ h("button", {
901
906
  type: "button",
902
- onClick: () => h?.(`${g}/seller/items`),
907
+ onClick: () => _?.(`${v}/seller/items`),
903
908
  className: "rounded-button border border-border-strong px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
904
909
  children: "Cancel"
905
910
  }),
906
- /* @__PURE__ */ p("button", {
911
+ /* @__PURE__ */ h("button", {
907
912
  type: "button",
908
- onClick: () => void Z(!1),
909
- disabled: !q || H,
910
- "aria-disabled": !q || H,
911
- title: q ? void 0 : "Fill in all required fields to continue",
913
+ onClick: () => void Re(!1),
914
+ disabled: !J || W,
915
+ "aria-disabled": !J || W,
916
+ title: J ? void 0 : "Fill in all required fields to continue",
912
917
  className: l("inline-flex items-center gap-2 rounded-button px-5 py-2 text-sm font-medium transition-colors", "border border-border-strong bg-bg-surface text-text-primary", "hover:bg-bg-sunken", "disabled:opacity-50 disabled:cursor-not-allowed"),
913
- children: H ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(d, {
918
+ children: W ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(p, {
914
919
  size: 15,
915
920
  className: "animate-spin"
916
921
  }), "Saving..."] }) : "Save Changes"
917
922
  }),
918
- Q && /* @__PURE__ */ p("button", {
923
+ Q && /* @__PURE__ */ h("button", {
919
924
  type: "button",
920
- onClick: () => void Z(!0),
921
- disabled: !q || H,
922
- "aria-disabled": !q || H,
925
+ onClick: () => void Re(!0),
926
+ disabled: !J || W,
927
+ "aria-disabled": !J || W,
923
928
  className: l("inline-flex items-center gap-2 rounded-button px-5 py-2 text-sm font-medium transition-colors", "bg-action-primary-bg text-action-primary-text", "hover:bg-action-primary-bg/90", "disabled:opacity-50 disabled:cursor-not-allowed"),
924
- children: H ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(d, {
929
+ children: W ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(p, {
925
930
  size: 15,
926
931
  className: "animate-spin"
927
932
  }), "Saving..."] }) : "Save & Resubmit for Review"
@@ -934,6 +939,6 @@ var _ = ({ label: e, value: t }) => /* @__PURE__ */ m(h, {
934
939
  })
935
940
  });
936
941
  };
937
- export { v as EditPhysicalItemPage };
942
+ export { b as EditPhysicalItemPage };
938
943
 
939
944
  //# sourceMappingURL=EditPhysicalItemPage.js.map