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