@burdenoff/microfe-devportal 2026.915.7 → 2026.915.8

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.
@@ -11,19 +11,20 @@ import { DataTable as g, DetailList as _ } from "../components/DataTable.js";
11
11
  import { InputField as v, TextareaField as y } from "../components/FormField.js";
12
12
  import { ConfirmDialog as ee } from "../components/ConfirmDialog.js";
13
13
  import { RegisterPickupLocationModal as te } from "../components/RegisterPickupLocationModal.js";
14
- import { useDevportalPermission as b } from "../hooks/usePermission.js";
15
- import { capitalizeCarrierName as x, useCarrierPickupLocations as ne } from "../hooks/useCarrierPickupLocations.js";
16
- import { DEVPORTAL_PERMISSIONS as S } from "../constants/permissions.js";
14
+ import { useDevportalPermission as ne } from "../hooks/usePermission.js";
15
+ import { capitalizeCarrierName as b, useCarrierPickupLocations as re } from "../hooks/useCarrierPickupLocations.js";
16
+ import { DEVPORTAL_PERMISSIONS as x } from "../constants/permissions.js";
17
+ import { useOrganizationPickupAddresses as S } from "../hooks/useOrganizationPickupAddresses.js";
17
18
  import { useEffect as C, useState as w } from "react";
18
- import { AlertCircle as re, AppWindow as T, ArrowRight as E, BarChart3 as D, Building2 as O, CheckCircle as k, DollarSign as A, ExternalLink as j, Loader2 as M, Plus as N, Settings as P, Shield as F, Trash2 as ie, TrendingUp as I, Users as L } from "lucide-react";
19
- import { useParams as ae } from "react-router";
20
- import { Fragment as R, jsx as z, jsxs as B } from "react/jsx-runtime";
21
- import { useI18n as V } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
22
- import { EmphasisPanel as H, NextSteps as oe } from "@burdenoff/fe-libs/ui";
23
- import { graphqlFetch as U } from "@burdenoff/fe-libs/shared/graphql";
19
+ import { AlertCircle as ie, AppWindow as T, ArrowRight as E, BarChart3 as D, Building2 as O, CheckCircle as k, DollarSign as A, ExternalLink as j, Loader2 as M, Plus as N, Settings as ae, Shield as P, Trash2 as F, TrendingUp as I, Users as L } from "lucide-react";
20
+ import { useParams as R } from "react-router";
21
+ import { Fragment as z, jsx as B, jsxs as V } from "react/jsx-runtime";
22
+ import { useI18n as H } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
23
+ import { EmphasisPanel as U, NextSteps as oe } from "@burdenoff/fe-libs/ui";
24
+ import { graphqlFetch as W } from "@burdenoff/fe-libs/shared/graphql";
24
25
  //#region src/devportal/pages/OrganizationDetailPage.tsx
25
26
  var se = "\n query OrganizationVerificationDetails($id: ID!) {\n developerOrganization(id: $id) {\n id\n verificationMethod\n verificationRequestedAt\n verificationStatus\n verificationRequestNotes\n verificationEvidenceUrl\n verificationDomain\n verificationRequestedBy\n verificationReviewedAt\n verificationReviewedBy\n verificationReviewNotes\n verificationRejectedReason\n }\n }\n", ce = "\n mutation RequestOrgVerificationExtended(\n $id: ID!\n $method: String!\n $notes: String\n $evidenceUrl: String\n $domain: String\n ) {\n requestOrgVerification(\n id: $id\n method: $method\n notes: $notes\n evidenceUrl: $evidenceUrl\n domain: $domain\n ) {\n id\n verificationMethod\n verificationRequestedAt\n verificationStatus\n verificationRequestNotes\n verificationEvidenceUrl\n verificationDomain\n verificationRejectedReason\n }\n }\n";
26
- function W(e) {
27
+ function G(e) {
27
28
  let t = e;
28
29
  return {
29
30
  id: e.id,
@@ -80,7 +81,7 @@ function W(e) {
80
81
  updatedAt: e.updatedAt
81
82
  };
82
83
  }
83
- function le(e) {
84
+ function K(e) {
84
85
  return {
85
86
  id: e.id,
86
87
  organizationId: e.organizationId,
@@ -99,11 +100,11 @@ function le(e) {
99
100
  updatedAt: e.updatedAt
100
101
  };
101
102
  }
102
- function ue(e) {
103
+ function le(e) {
103
104
  let t = e.trim().toLowerCase();
104
105
  return /^[a-z0-9.-]+\.[a-z]{2,}$/i.test(t) && !t.includes("@");
105
106
  }
106
- function G(e) {
107
+ function q(e) {
107
108
  try {
108
109
  let t = new URL(e.trim());
109
110
  return t.protocol === "http:" || t.protocol === "https:";
@@ -111,17 +112,17 @@ function G(e) {
111
112
  return !1;
112
113
  }
113
114
  }
114
- function de(e) {
115
+ function ue(e) {
115
116
  let t = e.trim();
116
117
  return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t);
117
118
  }
118
- var K = {
119
+ var J = {
119
120
  VIEWER: 0,
120
121
  DEVELOPER: 1,
121
122
  ADMIN: 2,
122
123
  OWNER: 3
123
- }, fe = () => {
124
- let { navigate: n, basePath: s, setActiveOrgId: c, setActivePhysicalOrgId: l, currentUser: d } = e(), f = i(), { orgId: p } = ae(), { t: m } = V(), h = (e, t) => {
124
+ }, Y = () => {
125
+ let { navigate: n, basePath: s, setActiveOrgId: c, setActivePhysicalOrgId: l, currentUser: d } = e(), f = i(), { orgId: p } = R(), { t: m } = H(), h = (e, t) => {
125
126
  let n = m(e);
126
127
  return n === e ? t : n;
127
128
  }, [g, _] = w("overview"), v = [
@@ -143,19 +144,19 @@ var K = {
143
144
  {
144
145
  id: "settings",
145
146
  label: h("devportal.settings", "Settings"),
146
- icon: P
147
+ icon: ae
147
148
  }
148
- ], { data: y, previousData: ee, loading: te, error: b } = o({
149
+ ], { data: y, previousData: ee, loading: te, error: ne } = o({
149
150
  variables: { id: p },
150
151
  skip: !p
151
- }), x = y ?? ee, { data: ne } = a({
152
+ }), b = y ?? ee, { data: re } = a({
152
153
  variables: {
153
154
  limit: 50,
154
155
  organizationId: p
155
156
  },
156
157
  skip: !p,
157
158
  fetchPolicy: "cache-and-network"
158
- }), S = (x?.developerOrganization?.members ?? []).map(le), E = (d ? S.find((e) => e.userId === d.id) : void 0)?.role, D = E !== void 0 && K[E] >= K.DEVELOPER, k = E !== void 0 && K[E] >= K.ADMIN, j = k, F = k, ie = v.filter((e) => e.id !== "settings" || k), I = (e) => {
159
+ }), x = (b?.developerOrganization?.members ?? []).map(K), S = (d ? x.find((e) => e.userId === d.id) : void 0)?.role, E = S !== void 0 && J[S] >= J.DEVELOPER, D = S !== void 0 && J[S] >= J.ADMIN, k = D, j = D, P = v.filter((e) => e.id !== "settings" || D), F = (e) => {
159
160
  n?.(`${s}${e}`);
160
161
  };
161
162
  if (C(() => {
@@ -166,217 +167,217 @@ var K = {
166
167
  c,
167
168
  l
168
169
  ]), C(() => {
169
- g === "settings" && !k && _("overview");
170
- }, [g, k]), C(() => {
171
- let e = x?.developerOrganization?.name;
170
+ g === "settings" && !D && _("overview");
171
+ }, [g, D]), C(() => {
172
+ let e = b?.developerOrganization?.name;
172
173
  if (!p || !e) return;
173
174
  let t = window.__breadcrumbRegistry;
174
175
  return t?.register(p, e), () => t?.unregister(p);
175
- }, [p, y?.developerOrganization?.name]), te && !x) return /* @__PURE__ */ z(u, {
176
+ }, [p, y?.developerOrganization?.name]), te && !b) return /* @__PURE__ */ B(u, {
176
177
  title: h("devportal.loadingDots", "Loading..."),
177
178
  backLink: `${s}${r(f)}`,
178
179
  backLabel: h("devportal.backToOrganizations", "Back to Organizations"),
179
- children: /* @__PURE__ */ z("div", {
180
+ children: /* @__PURE__ */ B("div", {
180
181
  className: "flex items-center justify-center py-12",
181
- children: /* @__PURE__ */ z(M, { className: "h-8 w-8 animate-spin text-text-secondary" })
182
+ children: /* @__PURE__ */ B(M, { className: "h-8 w-8 animate-spin text-text-secondary" })
182
183
  })
183
184
  });
184
- if (b || !x?.developerOrganization) return /* @__PURE__ */ z(u, {
185
+ if (ne || !b?.developerOrganization) return /* @__PURE__ */ B(u, {
185
186
  title: h("devportal.organizationNotFound", "Organization Not Found"),
186
187
  backLink: `${s}${r(f)}`,
187
188
  backLabel: h("devportal.backToOrganizations", "Back to Organizations"),
188
- children: /* @__PURE__ */ B("div", {
189
+ children: /* @__PURE__ */ V("div", {
189
190
  className: "flex flex-col items-center justify-center py-12 gap-4",
190
191
  children: [
191
- /* @__PURE__ */ z(re, { className: "h-12 w-12 text-status-error-text" }),
192
- /* @__PURE__ */ z("h2", {
192
+ /* @__PURE__ */ B(ie, { className: "h-12 w-12 text-status-error-text" }),
193
+ /* @__PURE__ */ B("h2", {
193
194
  className: "text-lg font-semibold",
194
195
  children: h("devportal.organizationNotFoundLower", "Organization not found")
195
196
  }),
196
- /* @__PURE__ */ z("p", {
197
+ /* @__PURE__ */ B("p", {
197
198
  className: "text-text-secondary",
198
- children: b?.message || h("devportal.organizationNotFoundDescription", "The organization you're looking for doesn't exist or you don't have access to it.")
199
+ children: ne?.message || h("devportal.organizationNotFoundDescription", "The organization you're looking for doesn't exist or you don't have access to it.")
199
200
  }),
200
- /* @__PURE__ */ z("button", {
201
- onClick: () => I(r(f)),
201
+ /* @__PURE__ */ B("button", {
202
+ onClick: () => F(r(f)),
202
203
  className: "mt-4 inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
203
204
  children: h("devportal.backToOrganizations", "Back to Organizations")
204
205
  })
205
206
  ]
206
207
  })
207
208
  });
208
- let R = W(x.developerOrganization), H = S, U = ne?.applications?.edges?.map((e) => e.node) ?? [];
209
- return /* @__PURE__ */ B(u, {
210
- title: R.name,
211
- description: R.description,
209
+ let I = G(b.developerOrganization), z = x, U = re?.applications?.edges?.map((e) => e.node) ?? [];
210
+ return /* @__PURE__ */ V(u, {
211
+ title: I.name,
212
+ description: I.description,
212
213
  purpose: h("devportal.orgDetailPurpose", "This is the home for one organization — the apps it owns, the people who can work on them, and its store and billing settings. Invite teammates, add apps, and verify the org so your published listings look trustworthy."),
213
214
  backLink: `${s}${r(f)}`,
214
215
  backLabel: h("devportal.backToOrganizations", "Back to Organizations"),
215
- actions: /* @__PURE__ */ z("div", {
216
+ actions: /* @__PURE__ */ B("div", {
216
217
  className: "flex items-center gap-2",
217
- children: j ? /* @__PURE__ */ B("button", {
218
- onClick: () => n?.(`/billing/earnings?developerOrgId=${encodeURIComponent(R.id)}&developerOrgName=${encodeURIComponent(R.name)}`),
218
+ children: k ? /* @__PURE__ */ V("button", {
219
+ onClick: () => n?.(`/billing/earnings?developerOrgId=${encodeURIComponent(I.id)}&developerOrgName=${encodeURIComponent(I.name)}`),
219
220
  className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-bg-sunken transition-colors",
220
- children: [/* @__PURE__ */ z(A, { size: 16 }), h("devportal.revenue", "Revenue")]
221
+ children: [/* @__PURE__ */ B(A, { size: 16 }), h("devportal.revenue", "Revenue")]
221
222
  }) : null
222
223
  }),
223
224
  children: [
224
- /* @__PURE__ */ z("div", {
225
+ /* @__PURE__ */ B("div", {
225
226
  className: "border-b",
226
- children: /* @__PURE__ */ z("nav", {
227
+ children: /* @__PURE__ */ B("nav", {
227
228
  className: "-mb-px flex gap-4 overflow-x-auto",
228
229
  role: "tablist",
229
230
  "aria-label": h("devportal.organizationSections", "Organization sections"),
230
- children: ie.map((e) => {
231
+ children: P.map((e) => {
231
232
  let n = e.icon;
232
- return /* @__PURE__ */ B("button", {
233
+ return /* @__PURE__ */ V("button", {
233
234
  id: `organization-tab-${e.id}`,
234
235
  role: "tab",
235
236
  "aria-selected": g === e.id,
236
237
  "aria-controls": `organization-panel-${e.id}`,
237
238
  onClick: () => _(e.id),
238
239
  className: t("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors", g === e.id ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary hover:border-muted-foreground"),
239
- children: [/* @__PURE__ */ z(n, { size: 16 }), e.label]
240
+ children: [/* @__PURE__ */ B(n, { size: 16 }), e.label]
240
241
  }, e.id);
241
242
  })
242
243
  })
243
244
  }),
244
- /* @__PURE__ */ z(oe, {
245
+ /* @__PURE__ */ B(oe, {
245
246
  className: "mt-6",
246
- storageKey: `devportal-org-${R.id}`,
247
+ storageKey: `devportal-org-${I.id}`,
247
248
  steps: [
248
- ...F ? [{
249
+ ...j ? [{
249
250
  id: "invite-members",
250
251
  label: h("devportal.inviteMembers", "Invite members"),
251
252
  description: h("devportal.orgStepInvite", "Add teammates so they can build alongside you"),
252
- icon: /* @__PURE__ */ z(L, { size: 16 }),
253
+ icon: /* @__PURE__ */ B(L, { size: 16 }),
253
254
  onClick: () => _("members")
254
255
  }] : [],
255
- ...D && !f ? [{
256
+ ...E && !f ? [{
256
257
  id: "create-app",
257
258
  label: h("devportal.createApp", "Create App"),
258
259
  description: h("devportal.orgStepCreateApp", "Build a new application under this organization"),
259
- icon: /* @__PURE__ */ z(T, { size: 16 }),
260
- onClick: () => I("/apps/new")
260
+ icon: /* @__PURE__ */ B(T, { size: 16 }),
261
+ onClick: () => F("/apps/new")
261
262
  }] : [],
262
- ...D && f ? [{
263
+ ...E && f ? [{
263
264
  id: "list-item",
264
265
  label: h("devportal.listAnItem", "List an Item"),
265
266
  description: h("devportal.orgStepListItem", "List a physical product for sale under this organization"),
266
- icon: /* @__PURE__ */ z(N, { size: 16 }),
267
- onClick: () => I("/seller/items/new")
267
+ icon: /* @__PURE__ */ B(N, { size: 16 }),
268
+ onClick: () => F("/seller/items/new")
268
269
  }] : [],
269
- ...k ? [{
270
+ ...D ? [{
270
271
  id: "settings",
271
272
  label: h("devportal.orgStepVerify", "Complete organization profile"),
272
273
  description: h("devportal.orgStepVerifyDesc", "Add a logo and details, then request verification"),
273
- icon: /* @__PURE__ */ z(P, { size: 16 }),
274
+ icon: /* @__PURE__ */ B(ae, { size: 16 }),
274
275
  onClick: () => _("settings"),
275
- done: !!R.isVerified
276
+ done: !!I.isVerified
276
277
  }] : []
277
278
  ]
278
279
  }),
279
- /* @__PURE__ */ B("div", {
280
+ /* @__PURE__ */ V("div", {
280
281
  className: "mt-6",
281
282
  id: `organization-panel-${g}`,
282
283
  role: "tabpanel",
283
284
  "aria-labelledby": `organization-tab-${g}`,
284
285
  tabIndex: 0,
285
286
  children: [
286
- g === "overview" && /* @__PURE__ */ z(q, {
287
- org: R,
287
+ g === "overview" && /* @__PURE__ */ B(de, {
288
+ org: I,
288
289
  apps: U,
289
- members: H,
290
- canCreateApps: D,
291
- canViewRevenue: j,
292
- onNavigate: I,
290
+ members: z,
291
+ canCreateApps: E,
292
+ canViewRevenue: k,
293
+ onNavigate: F,
293
294
  onShowApps: () => _("apps")
294
295
  }),
295
- g === "apps" && /* @__PURE__ */ z(pe, {
296
- org: R,
296
+ g === "apps" && /* @__PURE__ */ B(fe, {
297
+ org: I,
297
298
  apps: U,
298
- onNavigate: I,
299
- canCreateApps: D
299
+ onNavigate: F,
300
+ canCreateApps: E
300
301
  }),
301
- g === "members" && /* @__PURE__ */ z(me, {
302
- members: H,
303
- onNavigate: I,
304
- orgId: R.id,
305
- canInviteMembers: F
302
+ g === "members" && /* @__PURE__ */ B(pe, {
303
+ members: z,
304
+ onNavigate: F,
305
+ orgId: I.id,
306
+ canInviteMembers: j
306
307
  }),
307
- g === "settings" && k && /* @__PURE__ */ z(J, { org: R })
308
+ g === "settings" && D && /* @__PURE__ */ B(X, { org: I })
308
309
  ]
309
310
  })
310
311
  ]
311
312
  });
312
- }, q = ({ org: e, apps: t, members: r, canCreateApps: i, canViewRevenue: a, onNavigate: o, onShowApps: s }) => {
313
- let { t: c } = V(), l = (e, t) => {
313
+ }, de = ({ org: e, apps: t, members: r, canCreateApps: i, canViewRevenue: a, onNavigate: o, onShowApps: s }) => {
314
+ let { t: c } = H(), l = (e, t) => {
314
315
  let n = c(e);
315
316
  return n === e ? t : n;
316
317
  };
317
- return /* @__PURE__ */ B("div", {
318
+ return /* @__PURE__ */ V("div", {
318
319
  className: "grid gap-6 lg:grid-cols-3",
319
- children: [/* @__PURE__ */ B("div", {
320
+ children: [/* @__PURE__ */ V("div", {
320
321
  className: "lg:col-span-2 space-y-6",
321
- children: [/* @__PURE__ */ z(H, { children: /* @__PURE__ */ B(h, {
322
+ children: [/* @__PURE__ */ B(U, { children: /* @__PURE__ */ V(h, {
322
323
  columns: a ? 4 : 3,
323
324
  children: [
324
- /* @__PURE__ */ z(m, {
325
+ /* @__PURE__ */ B(m, {
325
326
  title: l("devportal.publishedApps", "Published Apps"),
326
327
  value: `${e.publishedApps}/${e.totalApps}`,
327
- icon: /* @__PURE__ */ z(T, { size: 20 })
328
+ icon: /* @__PURE__ */ B(T, { size: 20 })
328
329
  }),
329
- /* @__PURE__ */ z(m, {
330
+ /* @__PURE__ */ B(m, {
330
331
  title: l("devportal.totalInstalls", "Total Installs"),
331
332
  value: e.totalInstalls.toLocaleString(),
332
- icon: /* @__PURE__ */ z(I, { size: 20 })
333
+ icon: /* @__PURE__ */ B(I, { size: 20 })
333
334
  }),
334
- a ? /* @__PURE__ */ z(m, {
335
+ a ? /* @__PURE__ */ B(m, {
335
336
  title: l("devportal.totalRevenue", "Total Revenue"),
336
337
  value: `$${e.totalRevenue.toLocaleString()}`,
337
- icon: /* @__PURE__ */ z(A, { size: 20 })
338
+ icon: /* @__PURE__ */ B(A, { size: 20 })
338
339
  }) : null,
339
- /* @__PURE__ */ z(m, {
340
+ /* @__PURE__ */ B(m, {
340
341
  title: l("devportal.avgRating", "Avg Rating"),
341
342
  value: e.averageRating ? `${e.averageRating.toFixed(1)} ★` : l("devportal.notAvailable", "N/A"),
342
- icon: /* @__PURE__ */ z(D, { size: 20 })
343
+ icon: /* @__PURE__ */ B(D, { size: 20 })
343
344
  })
344
345
  ]
345
- }) }), /* @__PURE__ */ z(d, {
346
+ }) }), /* @__PURE__ */ B(d, {
346
347
  title: l("devportal.recentApplications", "Recent Applications"),
347
- actions: /* @__PURE__ */ B("button", {
348
+ actions: /* @__PURE__ */ V("button", {
348
349
  onClick: s,
349
350
  className: "text-sm text-primary hover:underline flex items-center gap-1",
350
351
  children: [
351
352
  l("devportal.viewAll", "View all"),
352
353
  " ",
353
- /* @__PURE__ */ z(E, { size: 14 })
354
+ /* @__PURE__ */ B(E, { size: 14 })
354
355
  ]
355
356
  }),
356
- children: t.length > 0 ? /* @__PURE__ */ z("div", {
357
+ children: t.length > 0 ? /* @__PURE__ */ B("div", {
357
358
  className: "space-y-2",
358
- children: t.slice(0, 3).map((e) => /* @__PURE__ */ z(p, {
359
+ children: t.slice(0, 3).map((e) => /* @__PURE__ */ B(p, {
359
360
  app: e,
360
361
  onClick: () => o(`/apps/${e.id}`)
361
362
  }, e.id))
362
- }) : /* @__PURE__ */ z(n, {
363
+ }) : /* @__PURE__ */ B(n, {
363
364
  illustration: "empty-data",
364
- icon: /* @__PURE__ */ z(T, { size: 24 }),
365
+ icon: /* @__PURE__ */ B(T, { size: 24 }),
365
366
  title: l("devportal.noApplications", "No applications"),
366
367
  description: e.kind === "PHYSICAL" ? l("devportal.createYourFirstItem", "List your first physical item") : l("devportal.createYourFirstApplication", "Create your first application"),
367
- action: i ? /* @__PURE__ */ B("button", {
368
+ action: i ? /* @__PURE__ */ V("button", {
368
369
  onClick: () => o(e.kind === "PHYSICAL" ? "/seller/items/new" : "/apps/new"),
369
370
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
370
- children: [/* @__PURE__ */ z(N, { size: 16 }), e.kind === "PHYSICAL" ? l("devportal.createItem", "Create Item") : l("devportal.createApp", "Create App")]
371
+ children: [/* @__PURE__ */ B(N, { size: 16 }), e.kind === "PHYSICAL" ? l("devportal.createItem", "Create Item") : l("devportal.createApp", "Create App")]
371
372
  }) : void 0
372
373
  })
373
374
  })]
374
- }), /* @__PURE__ */ B("div", {
375
+ }), /* @__PURE__ */ V("div", {
375
376
  className: "space-y-6",
376
377
  children: [
377
- a ? /* @__PURE__ */ z(d, {
378
+ a ? /* @__PURE__ */ B(d, {
378
379
  title: l("devportal.revenueSummary", "Revenue Summary"),
379
- children: /* @__PURE__ */ z(_, { items: [
380
+ children: /* @__PURE__ */ B(_, { items: [
380
381
  {
381
382
  label: l("devportal.totalRevenue", "Total Revenue"),
382
383
  value: `$${e.totalRevenue.toLocaleString()}`
@@ -399,31 +400,31 @@ var K = {
399
400
  }
400
401
  ] })
401
402
  }) : null,
402
- /* @__PURE__ */ z(d, {
403
+ /* @__PURE__ */ B(d, {
403
404
  title: l("devportal.teamMembers", "Team Members"),
404
- actions: /* @__PURE__ */ z("button", {
405
+ actions: /* @__PURE__ */ B("button", {
405
406
  onClick: () => o(`/organizations/${e.id}/members`),
406
407
  className: "text-sm text-primary hover:underline",
407
408
  children: l("devportal.manage", "Manage")
408
409
  }),
409
- children: /* @__PURE__ */ B("div", {
410
+ children: /* @__PURE__ */ V("div", {
410
411
  className: "space-y-2",
411
- children: [r.slice(0, 3).map((e) => /* @__PURE__ */ z("div", {
412
+ children: [r.slice(0, 3).map((e) => /* @__PURE__ */ B("div", {
412
413
  className: "flex items-center justify-between py-2",
413
- children: /* @__PURE__ */ B("div", {
414
+ children: /* @__PURE__ */ V("div", {
414
415
  className: "flex items-center gap-3",
415
- children: [/* @__PURE__ */ z("div", {
416
+ children: [/* @__PURE__ */ B("div", {
416
417
  className: "h-8 w-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-sm font-medium text-primary",
417
418
  children: e.email?.charAt(0).toUpperCase() || "U"
418
- }), /* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("p", {
419
+ }), /* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("p", {
419
420
  className: "text-sm font-medium",
420
421
  children: e.email
421
- }), /* @__PURE__ */ z("p", {
422
+ }), /* @__PURE__ */ B("p", {
422
423
  className: "text-xs text-text-secondary",
423
424
  children: f[e.role]
424
425
  })] })]
425
426
  })
426
- }, e.id)), r.length > 3 && /* @__PURE__ */ B("p", {
427
+ }, e.id)), r.length > 3 && /* @__PURE__ */ V("p", {
427
428
  className: "text-xs text-text-secondary",
428
429
  children: [
429
430
  "+",
@@ -434,99 +435,99 @@ var K = {
434
435
  })]
435
436
  })
436
437
  }),
437
- /* @__PURE__ */ z(d, {
438
+ /* @__PURE__ */ B(d, {
438
439
  title: l("devportal.links", "Links"),
439
- children: /* @__PURE__ */ B("div", {
440
+ children: /* @__PURE__ */ V("div", {
440
441
  className: "space-y-2",
441
- children: [e.websiteUrl && /* @__PURE__ */ B("a", {
442
+ children: [e.websiteUrl && /* @__PURE__ */ V("a", {
442
443
  href: e.websiteUrl,
443
444
  target: "_blank",
444
445
  rel: "noopener noreferrer",
445
446
  className: "flex items-center gap-2 text-sm text-primary hover:underline",
446
- children: [/* @__PURE__ */ z(j, { size: 14 }), l("devportal.website", "Website")]
447
- }), e.contactEmail && /* @__PURE__ */ B("a", {
447
+ children: [/* @__PURE__ */ B(j, { size: 14 }), l("devportal.website", "Website")]
448
+ }), e.contactEmail && /* @__PURE__ */ V("a", {
448
449
  href: `mailto:${e.contactEmail}`,
449
450
  className: "flex items-center gap-2 text-sm text-primary hover:underline",
450
- children: [/* @__PURE__ */ z(j, { size: 14 }), e.contactEmail]
451
+ children: [/* @__PURE__ */ B(j, { size: 14 }), e.contactEmail]
451
452
  })]
452
453
  })
453
454
  })
454
455
  ]
455
456
  })]
456
457
  });
457
- }, pe = ({ org: e, apps: t, onNavigate: r, canCreateApps: i }) => {
458
- let { t: a } = V(), o = (e, t) => {
458
+ }, fe = ({ org: e, apps: t, onNavigate: r, canCreateApps: i }) => {
459
+ let { t: a } = H(), o = (e, t) => {
459
460
  let n = a(e);
460
461
  return n === e ? t : n;
461
462
  }, s = e.kind === "PHYSICAL", c = s ? "/seller/items/new" : "/apps/new", l = s ? o("devportal.createItem", "Create Item") : o("devportal.createApp", "Create App");
462
- return /* @__PURE__ */ B("div", {
463
+ return /* @__PURE__ */ V("div", {
463
464
  className: "space-y-6",
464
- children: [/* @__PURE__ */ B("div", {
465
+ children: [/* @__PURE__ */ V("div", {
465
466
  className: "flex items-center justify-between",
466
- children: [/* @__PURE__ */ B("p", {
467
+ children: [/* @__PURE__ */ V("p", {
467
468
  className: "text-sm text-text-secondary",
468
469
  children: [
469
470
  t.length,
470
471
  " ",
471
472
  t.length === 1 ? o("devportal.application", "application") : o("devportal.applications", "applications")
472
473
  ]
473
- }), i ? /* @__PURE__ */ B("button", {
474
+ }), i ? /* @__PURE__ */ V("button", {
474
475
  onClick: () => r(c),
475
476
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
476
- children: [/* @__PURE__ */ z(N, { size: 16 }), l]
477
+ children: [/* @__PURE__ */ B(N, { size: 16 }), l]
477
478
  }) : null]
478
- }), t.length > 0 ? /* @__PURE__ */ z("div", {
479
+ }), t.length > 0 ? /* @__PURE__ */ B("div", {
479
480
  className: "space-y-2",
480
- children: t.map((e) => /* @__PURE__ */ z(p, {
481
+ children: t.map((e) => /* @__PURE__ */ B(p, {
481
482
  app: e,
482
483
  onClick: () => r(`/apps/${e.id}`)
483
484
  }, e.id))
484
- }) : /* @__PURE__ */ z(n, {
485
+ }) : /* @__PURE__ */ B(n, {
485
486
  illustration: "empty-data",
486
- icon: /* @__PURE__ */ z(T, { size: 32 }),
487
+ icon: /* @__PURE__ */ B(T, { size: 32 }),
487
488
  title: o("devportal.noApplications", "No applications"),
488
489
  description: s ? o("devportal.createFirstItemForOrg", "List your first physical item for this organization") : o("devportal.createFirstAppForOrg", "Create your first application for this organization"),
489
- action: i ? /* @__PURE__ */ B("button", {
490
+ action: i ? /* @__PURE__ */ V("button", {
490
491
  onClick: () => r(c),
491
492
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
492
- children: [/* @__PURE__ */ z(N, { size: 16 }), l]
493
+ children: [/* @__PURE__ */ B(N, { size: 16 }), l]
493
494
  }) : void 0
494
495
  })]
495
496
  });
496
- }, me = ({ members: e, onNavigate: n, orgId: r, canInviteMembers: i }) => {
497
- let { t: a } = V(), o = (e, t) => {
497
+ }, pe = ({ members: e, onNavigate: n, orgId: r, canInviteMembers: i }) => {
498
+ let { t: a } = H(), o = (e, t) => {
498
499
  let n = a(e);
499
500
  return n === e ? t : n;
500
501
  };
501
- return /* @__PURE__ */ B("div", {
502
+ return /* @__PURE__ */ V("div", {
502
503
  className: "space-y-6",
503
- children: [/* @__PURE__ */ B("div", {
504
+ children: [/* @__PURE__ */ V("div", {
504
505
  className: "flex items-center justify-between",
505
- children: [/* @__PURE__ */ B("p", {
506
+ children: [/* @__PURE__ */ V("p", {
506
507
  className: "text-sm text-text-secondary",
507
508
  children: [
508
509
  e.length,
509
510
  " ",
510
511
  e.length === 1 ? o("devportal.memberLower", "member") : o("devportal.membersLower", "members")
511
512
  ]
512
- }), i ? /* @__PURE__ */ B("button", {
513
+ }), i ? /* @__PURE__ */ V("button", {
513
514
  onClick: () => n(`/organizations/${r}/members`),
514
515
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
515
- children: [/* @__PURE__ */ z(N, { size: 16 }), o("devportal.inviteMember", "Invite Member")]
516
+ children: [/* @__PURE__ */ B(N, { size: 16 }), o("devportal.inviteMember", "Invite Member")]
516
517
  }) : null]
517
- }), /* @__PURE__ */ z(g, {
518
+ }), /* @__PURE__ */ B(g, {
518
519
  data: e,
519
520
  keyField: "id",
520
521
  columns: [
521
522
  {
522
523
  key: "email",
523
524
  header: o("devportal.memberColumn", "Member"),
524
- render: (e) => /* @__PURE__ */ B("div", {
525
+ render: (e) => /* @__PURE__ */ V("div", {
525
526
  className: "flex items-center gap-3",
526
- children: [/* @__PURE__ */ z("div", {
527
+ children: [/* @__PURE__ */ B("div", {
527
528
  className: "h-8 w-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-sm font-medium text-primary",
528
529
  children: e.email?.charAt(0).toUpperCase() || "U"
529
- }), /* @__PURE__ */ z("span", {
530
+ }), /* @__PURE__ */ B("span", {
530
531
  className: "font-medium",
531
532
  children: e.email
532
533
  })]
@@ -535,7 +536,7 @@ var K = {
535
536
  {
536
537
  key: "role",
537
538
  header: o("devportal.roleColumn", "Role"),
538
- render: (e) => /* @__PURE__ */ z("span", {
539
+ render: (e) => /* @__PURE__ */ B("span", {
539
540
  className: t("inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium", e.role === "OWNER" ? "bg-accent-purple-subtle text-accent-purple" : e.role === "ADMIN" ? "bg-status-info-bg-subtle text-status-info-text" : e.role === "DEVELOPER" ? "bg-status-success-bg-subtle text-status-success-text" : "bg-bg-sunken text-text-primary"),
540
541
  children: f[e.role]
541
542
  })
@@ -548,11 +549,11 @@ var K = {
548
549
  ]
549
550
  })]
550
551
  });
551
- }, J = ({ org: e }) => {
552
- let { t } = V(), { allowed: n } = b(S.ORG_UPDATE), r = (e, n) => {
553
- let r = t(e);
554
- return r === e ? n : r;
555
- }, [i, a] = w({
552
+ }, X = ({ org: e }) => {
553
+ let { t: n } = H(), { allowed: r } = ne(x.ORG_UPDATE), i = (e, t) => {
554
+ let r = n(e);
555
+ return r === e ? t : r;
556
+ }, [a, o] = w({
556
557
  name: e.name,
557
558
  description: e.description ?? "",
558
559
  websiteUrl: e.websiteUrl ?? "",
@@ -560,25 +561,25 @@ var K = {
560
561
  supportEmail: e.supportEmail ?? "",
561
562
  logoUrl: e.logoUrl ?? "",
562
563
  bannerUrl: e.bannerUrl ?? ""
563
- }), [o, u] = w({
564
+ }), [u, f] = w({
564
565
  legalEntityName: e.legalEntityName ?? "",
565
566
  legalEntityType: e.legalEntityType ?? ""
566
- }), [f, p] = w({
567
+ }), [p, m] = w({
567
568
  taxId: e.taxId ?? "",
568
569
  taxCountry: e.taxCountry ?? ""
569
- }), [m, h] = w({ pickupPostalCode: e.pickupPostalCode ?? "" }), { locations: g, refetch: re } = ne(), [T, E] = w(!1), [D, O] = w(!1), [A, j] = w(null), [N, I] = w(null), [L, ae] = w("manual"), [H, oe] = w(!1), [W, le] = w(""), [K, fe] = w(""), [q, pe] = w(""), [me, J] = w(null), [he, ge] = w(!1), Y = me ?? {
570
+ }), { locations: h } = re(), { addresses: g, loading: ie, refetch: T } = S(e.id), [E, D] = w(!1), [O, A] = w(null), [j, N] = w(null), [I, L] = w(null), [R, U] = w(null), [oe, G] = w(null), [K, J] = w(null), [Y, de] = w("manual"), [fe, pe] = w(!1), [X, me] = w(""), [he, ge] = w(""), [_e, ve] = w(""), [ye, be] = w(null), [xe, Se] = w(!1), Z = ye ?? {
570
571
  verificationMethod: e.verificationMethod,
571
572
  verificationRequestedAt: e.verificationRequestedAt,
572
573
  verificationStatus: e.verificationStatus,
573
574
  verificationRequestNotes: e.verificationRequestNotes,
574
575
  verificationRejectedReason: e.verificationRejectedReason
575
- }, X = [];
576
- i.contactEmail.trim() ? de(i.contactEmail) || X.push(r("devportal.contactEmailInvalid", "Contact email must be valid")) : X.push(r("devportal.contactEmailRequired", "Contact email is required")), i.supportEmail.trim() && !de(i.supportEmail) && X.push(r("devportal.supportEmailInvalid", "Support email must be valid")), i.websiteUrl.trim() ? G(i.websiteUrl) || X.push(r("devportal.websiteInvalid", "Website URL must be valid")) : X.push(r("devportal.websiteRequired", "Website URL is required")), o.legalEntityName.trim() || X.push(r("devportal.legalEntityNameRequired", "Legal entity name is required")), o.legalEntityType.trim() || X.push(r("devportal.legalEntityTypeRequired", "Entity type is required")), f.taxId.trim() || X.push(r("devportal.taxIdRequired", "Tax ID is required")), f.taxCountry.trim() ? /^[A-Za-z]{2}$/.test(f.taxCountry.trim()) || X.push(r("devportal.taxCountryInvalid", "Tax country must be a 2-letter code")) : X.push(r("devportal.taxCountryRequired", "Tax country is required"));
577
- let Z = [];
578
- L === "domain" && !ue(q.trim()) && Z.push(r("devportal.verification.errors.domainRequired", "Enter a valid domain like burdenoff.com")), L === "document" && !G(K.trim()) && Z.push(r("devportal.verification.errors.evidenceUrlRequired", "Enter a valid evidence URL starting with http:// or https://")), L === "manual" && !W.trim() && Z.push(r("devportal.verification.errors.notesRequired", "Add notes so the reviewer knows what to verify"));
579
- let _e = X.length === 0 && Z.length === 0 && !he && n, [Q, { loading: $ }] = l({ refetchQueries: ["GetOrganization"] }), [ve, { loading: ye }] = s({ refetchQueries: ["GetOrganization"] }), [be, { loading: xe }] = c({ refetchQueries: ["GetOrganization"] });
576
+ }, Q = [];
577
+ a.contactEmail.trim() ? ue(a.contactEmail) || Q.push(i("devportal.contactEmailInvalid", "Contact email must be valid")) : Q.push(i("devportal.contactEmailRequired", "Contact email is required")), a.supportEmail.trim() && !ue(a.supportEmail) && Q.push(i("devportal.supportEmailInvalid", "Support email must be valid")), a.websiteUrl.trim() ? q(a.websiteUrl) || Q.push(i("devportal.websiteInvalid", "Website URL must be valid")) : Q.push(i("devportal.websiteRequired", "Website URL is required")), u.legalEntityName.trim() || Q.push(i("devportal.legalEntityNameRequired", "Legal entity name is required")), u.legalEntityType.trim() || Q.push(i("devportal.legalEntityTypeRequired", "Entity type is required")), p.taxId.trim() || Q.push(i("devportal.taxIdRequired", "Tax ID is required")), p.taxCountry.trim() ? /^[A-Za-z]{2}$/.test(p.taxCountry.trim()) || Q.push(i("devportal.taxCountryInvalid", "Tax country must be a 2-letter code")) : Q.push(i("devportal.taxCountryRequired", "Tax country is required"));
578
+ let $ = [];
579
+ Y === "domain" && !le(_e.trim()) && $.push(i("devportal.verification.errors.domainRequired", "Enter a valid domain like burdenoff.com")), Y === "document" && !q(he.trim()) && $.push(i("devportal.verification.errors.evidenceUrlRequired", "Enter a valid evidence URL starting with http:// or https://")), Y === "manual" && !X.trim() && $.push(i("devportal.verification.errors.notesRequired", "Add notes so the reviewer knows what to verify"));
580
+ let Ce = Q.length === 0 && $.length === 0 && !xe && r, [we, { loading: Te }] = l({ refetchQueries: ["GetOrganization"] }), [Ee, { loading: De }] = s({ refetchQueries: ["GetOrganization"] }), [Oe, { loading: ke }] = c({ refetchQueries: ["GetOrganization"] });
580
581
  C(() => {
581
- a({
582
+ o({
582
583
  name: e.name,
583
584
  description: e.description ?? "",
584
585
  websiteUrl: e.websiteUrl ?? "",
@@ -586,558 +587,596 @@ var K = {
586
587
  supportEmail: e.supportEmail ?? "",
587
588
  logoUrl: e.logoUrl ?? "",
588
589
  bannerUrl: e.bannerUrl ?? ""
589
- }), u({
590
+ }), f({
590
591
  legalEntityName: e.legalEntityName ?? "",
591
592
  legalEntityType: e.legalEntityType ?? ""
592
- }), p({
593
+ }), m({
593
594
  taxId: e.taxId ?? "",
594
595
  taxCountry: e.taxCountry ?? ""
595
- }), h({ pickupPostalCode: e.pickupPostalCode ?? "" });
596
+ });
596
597
  }, [e.id]), C(() => {
597
- e.id && U({
598
+ e.id && W({
598
599
  gateway: "global",
599
600
  query: se,
600
601
  variables: { id: e.id }
601
- }).then((e) => J(e.data?.developerOrganization ?? null)).catch(() => J(null));
602
- }, [e.id, H]);
603
- let Se = async () => {
604
- I(null), j(null);
602
+ }).then((e) => be(e.data?.developerOrganization ?? null)).catch(() => be(null));
603
+ }, [e.id, fe]);
604
+ let Ae = async () => {
605
+ J(null), G(null);
605
606
  try {
606
- await Q({ variables: {
607
+ await we({ variables: {
607
608
  id: e.id,
608
609
  input: {
609
- name: i.name.trim() || void 0,
610
- description: i.description.trim() || null,
611
- websiteUrl: i.websiteUrl.trim() || null,
612
- contactEmail: i.contactEmail.trim() || null,
613
- supportEmail: i.supportEmail.trim() || null,
614
- logoUrl: i.logoUrl.trim() || null,
615
- bannerUrl: i.bannerUrl.trim() || null
610
+ name: a.name.trim() || void 0,
611
+ description: a.description.trim() || null,
612
+ websiteUrl: a.websiteUrl.trim() || null,
613
+ contactEmail: a.contactEmail.trim() || null,
614
+ supportEmail: a.supportEmail.trim() || null,
615
+ logoUrl: a.logoUrl.trim() || null,
616
+ bannerUrl: a.bannerUrl.trim() || null
616
617
  }
617
- } }), j(r("devportal.organizationUpdated", "Organization details updated"));
618
+ } }), G(i("devportal.organizationUpdated", "Organization details updated"));
618
619
  } catch (e) {
619
- I(e instanceof Error ? e.message : r("devportal.failedToUpdateOrganization", "Failed to update organization"));
620
+ J(e instanceof Error ? e.message : i("devportal.failedToUpdateOrganization", "Failed to update organization"));
620
621
  }
621
- }, Ce = async () => {
622
- I(null), j(null);
622
+ }, je = async () => {
623
+ J(null), G(null);
623
624
  try {
624
- await ve({ variables: {
625
+ await Ee({ variables: {
625
626
  id: e.id,
626
627
  input: {
627
- legalEntityName: o.legalEntityName.trim() || null,
628
- legalEntityType: o.legalEntityType.trim() || null
628
+ legalEntityName: u.legalEntityName.trim() || null,
629
+ legalEntityType: u.legalEntityType.trim() || null
629
630
  }
630
- } }), j(r("devportal.legalInfoUpdated", "Legal information updated"));
631
+ } }), G(i("devportal.legalInfoUpdated", "Legal information updated"));
631
632
  } catch (e) {
632
- I(e instanceof Error ? e.message : r("devportal.failedToUpdateLegalInfo", "Failed to update legal information"));
633
+ J(e instanceof Error ? e.message : i("devportal.failedToUpdateLegalInfo", "Failed to update legal information"));
633
634
  }
634
- }, we = async () => {
635
- I(null), j(null);
635
+ }, Me = async () => {
636
+ J(null), G(null);
636
637
  try {
637
- await be({ variables: {
638
+ await Oe({ variables: {
638
639
  id: e.id,
639
640
  input: {
640
- taxId: f.taxId.trim() || null,
641
- taxCountry: f.taxCountry.trim() || null
641
+ taxId: p.taxId.trim() || null,
642
+ taxCountry: p.taxCountry.trim() || null
642
643
  }
643
- } }), j(r("devportal.taxInfoUpdated", "Tax information updated"));
644
+ } }), G(i("devportal.taxInfoUpdated", "Tax information updated"));
644
645
  } catch (e) {
645
- I(e instanceof Error ? e.message : r("devportal.failedToUpdateTaxInfo", "Failed to update tax information"));
646
+ J(e instanceof Error ? e.message : i("devportal.failedToUpdateTaxInfo", "Failed to update tax information"));
646
647
  }
647
- }, Te = async (t) => {
648
- I(null), j(null);
648
+ }, Ne = async (e) => {
649
+ U(null), L(null), N(e);
649
650
  try {
650
- await Q({ variables: {
651
- id: e.id,
652
- input: { pickupPostalCode: t.trim() || null }
653
- } }), h({ pickupPostalCode: t.trim() }), j(r("devportal.fulfillmentInfoUpdated", "Fulfillment settings updated"));
651
+ let t = await W({
652
+ gateway: "global",
653
+ query: "\n mutation DevportalSetDefaultPickupAddress($id: ID!) {\n setDefaultPickupAddress(id: $id) {\n id\n }\n }\n ",
654
+ variables: { id: e }
655
+ });
656
+ if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Failed to switch pickup address");
657
+ T(), L(i("devportal.pickupAddressSetActive", "Pickup address updated"));
654
658
  } catch (e) {
655
- I(e instanceof Error ? e.message : r("devportal.failedToUpdateFulfillmentInfo", "Failed to update fulfillment settings"));
659
+ U(e instanceof Error ? e.message : i("devportal.failedToSwitchPickupAddress", "Failed to switch pickup address"));
660
+ } finally {
661
+ N(null);
662
+ }
663
+ }, Pe = async (e) => {
664
+ U(null), L(null), N(e);
665
+ try {
666
+ let t = await W({
667
+ gateway: "global",
668
+ query: "\n mutation DevportalRemoveOrgPickupAddress($id: ID!) {\n removeDeveloperOrgPickupAddress(id: $id)\n }\n ",
669
+ variables: { id: e }
670
+ });
671
+ if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Failed to remove pickup address");
672
+ T(), L(i("devportal.pickupAddressRemoved", "Pickup address removed"));
673
+ } catch (e) {
674
+ U(e instanceof Error ? e.message : i("devportal.failedToRemovePickupAddress", "Failed to remove pickup address"));
675
+ } finally {
676
+ N(null), A(null);
656
677
  }
657
678
  };
658
- return /* @__PURE__ */ B("div", {
679
+ return /* @__PURE__ */ V("div", {
659
680
  className: "space-y-6 max-w-2xl",
660
681
  children: [
661
- N && /* @__PURE__ */ z("div", {
682
+ K && /* @__PURE__ */ B("div", {
662
683
  className: "rounded-md border border-status-error-bg bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
663
- children: N
684
+ children: K
664
685
  }),
665
- A && /* @__PURE__ */ z("div", {
686
+ oe && /* @__PURE__ */ B("div", {
666
687
  className: "rounded-md border border-status-success-bg bg-status-success-bg-subtle px-4 py-3 text-sm text-status-success-text",
667
- children: A
688
+ children: oe
668
689
  }),
669
- /* @__PURE__ */ z(d, {
670
- title: r("devportal.organizationDetails", "Organization Details"),
671
- children: /* @__PURE__ */ B("div", {
690
+ /* @__PURE__ */ B(d, {
691
+ title: i("devportal.organizationDetails", "Organization Details"),
692
+ children: /* @__PURE__ */ V("div", {
672
693
  className: "space-y-4",
673
694
  children: [
674
- /* @__PURE__ */ B("div", {
695
+ /* @__PURE__ */ V("div", {
675
696
  className: "grid gap-4 sm:grid-cols-2",
676
- children: [/* @__PURE__ */ z(v, {
677
- label: r("devportal.organizationName", "Organization Name"),
678
- value: i.name,
679
- onChange: (e) => a((t) => ({
697
+ children: [/* @__PURE__ */ B(v, {
698
+ label: i("devportal.organizationName", "Organization Name"),
699
+ value: a.name,
700
+ onChange: (e) => o((t) => ({
680
701
  ...t,
681
702
  name: e.target.value
682
703
  })),
683
- disabled: !n,
704
+ disabled: !r,
684
705
  required: !0
685
- }), /* @__PURE__ */ z(v, {
686
- label: r("devportal.slug", "Slug"),
706
+ }), /* @__PURE__ */ B(v, {
707
+ label: i("devportal.slug", "Slug"),
687
708
  value: e.slug,
688
709
  disabled: !0,
689
- hint: r("devportal.slugReadOnly", "Slug cannot be changed here")
710
+ hint: i("devportal.slugReadOnly", "Slug cannot be changed here")
690
711
  })]
691
712
  }),
692
- /* @__PURE__ */ z(y, {
693
- label: r("devportal.description", "Description"),
694
- value: i.description,
695
- onChange: (e) => a((t) => ({
713
+ /* @__PURE__ */ B(y, {
714
+ label: i("devportal.description", "Description"),
715
+ value: a.description,
716
+ onChange: (e) => o((t) => ({
696
717
  ...t,
697
718
  description: e.target.value
698
719
  })),
699
- disabled: !n,
720
+ disabled: !r,
700
721
  rows: 4
701
722
  }),
702
- /* @__PURE__ */ B("div", {
723
+ /* @__PURE__ */ V("div", {
703
724
  className: "grid gap-4 sm:grid-cols-2",
704
725
  children: [
705
- /* @__PURE__ */ z(v, {
706
- label: r("devportal.website", "Website"),
726
+ /* @__PURE__ */ B(v, {
727
+ label: i("devportal.website", "Website"),
707
728
  type: "url",
708
- value: i.websiteUrl,
709
- onChange: (e) => a((t) => ({
729
+ value: a.websiteUrl,
730
+ onChange: (e) => o((t) => ({
710
731
  ...t,
711
732
  websiteUrl: e.target.value
712
733
  })),
713
- disabled: !n
734
+ disabled: !r
714
735
  }),
715
- /* @__PURE__ */ z(v, {
716
- label: r("devportal.contactEmail", "Contact Email"),
736
+ /* @__PURE__ */ B(v, {
737
+ label: i("devportal.contactEmail", "Contact Email"),
717
738
  type: "email",
718
- value: i.contactEmail,
719
- onChange: (e) => a((t) => ({
739
+ value: a.contactEmail,
740
+ onChange: (e) => o((t) => ({
720
741
  ...t,
721
742
  contactEmail: e.target.value
722
743
  })),
723
- disabled: !n
744
+ disabled: !r
724
745
  }),
725
- /* @__PURE__ */ z(v, {
726
- label: r("devportal.supportEmail", "Support Email"),
746
+ /* @__PURE__ */ B(v, {
747
+ label: i("devportal.supportEmail", "Support Email"),
727
748
  type: "email",
728
- value: i.supportEmail,
729
- onChange: (e) => a((t) => ({
749
+ value: a.supportEmail,
750
+ onChange: (e) => o((t) => ({
730
751
  ...t,
731
752
  supportEmail: e.target.value
732
753
  })),
733
- disabled: !n
754
+ disabled: !r
734
755
  }),
735
- /* @__PURE__ */ z(v, {
736
- label: r("devportal.logoUrl", "Logo URL"),
756
+ /* @__PURE__ */ B(v, {
757
+ label: i("devportal.logoUrl", "Logo URL"),
737
758
  type: "url",
738
- value: i.logoUrl,
739
- onChange: (e) => a((t) => ({
759
+ value: a.logoUrl,
760
+ onChange: (e) => o((t) => ({
740
761
  ...t,
741
762
  logoUrl: e.target.value
742
763
  })),
743
- disabled: !n
764
+ disabled: !r
744
765
  })
745
766
  ]
746
767
  }),
747
- /* @__PURE__ */ z(v, {
748
- label: r("devportal.bannerUrl", "Banner URL"),
768
+ /* @__PURE__ */ B(v, {
769
+ label: i("devportal.bannerUrl", "Banner URL"),
749
770
  type: "url",
750
- value: i.bannerUrl,
751
- onChange: (e) => a((t) => ({
771
+ value: a.bannerUrl,
772
+ onChange: (e) => o((t) => ({
752
773
  ...t,
753
774
  bannerUrl: e.target.value
754
775
  })),
755
- disabled: !n
776
+ disabled: !r
756
777
  }),
757
- /* @__PURE__ */ z(_, { items: [
778
+ /* @__PURE__ */ B(_, { items: [
758
779
  {
759
- label: r("devportal.organizationId", "Organization ID"),
760
- value: /* @__PURE__ */ z("code", {
780
+ label: i("devportal.organizationId", "Organization ID"),
781
+ value: /* @__PURE__ */ B("code", {
761
782
  className: "text-xs",
762
783
  children: e.id
763
784
  })
764
785
  },
765
786
  {
766
- label: r("devportal.tier", "Tier"),
787
+ label: i("devportal.tier", "Tier"),
767
788
  value: e.tier
768
789
  },
769
790
  {
770
- label: r("devportal.partnerTier", "Partner Tier"),
771
- value: e.partnerTier || r("devportal.none", "None")
791
+ label: i("devportal.partnerTier", "Partner Tier"),
792
+ value: e.partnerTier || i("devportal.none", "None")
772
793
  },
773
794
  {
774
- label: r("devportal.created", "Created"),
795
+ label: i("devportal.created", "Created"),
775
796
  value: new Date(e.createdAt).toLocaleDateString()
776
797
  },
777
798
  {
778
- label: r("devportal.platformFeeRate", "Platform Fee Rate"),
799
+ label: i("devportal.platformFeeRate", "Platform Fee Rate"),
779
800
  value: `${(e.platformFeeRate * 100).toFixed(0)}%`
780
801
  }
781
802
  ] }),
782
- /* @__PURE__ */ z("div", {
803
+ /* @__PURE__ */ B("div", {
783
804
  className: "flex justify-end",
784
- children: /* @__PURE__ */ B("button", {
805
+ children: /* @__PURE__ */ V("button", {
785
806
  type: "button",
786
- disabled: !n || $,
787
- onClick: () => void Se(),
807
+ disabled: !r || Te,
808
+ onClick: () => void Ae(),
788
809
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
789
- children: [$ ? /* @__PURE__ */ z(M, {
810
+ children: [Te ? /* @__PURE__ */ B(M, {
790
811
  size: 14,
791
812
  className: "animate-spin"
792
- }) : /* @__PURE__ */ z(P, { size: 14 }), r("devportal.saveChanges", "Save Changes")]
813
+ }) : /* @__PURE__ */ B(ae, { size: 14 }), i("devportal.saveChanges", "Save Changes")]
793
814
  })
794
815
  })
795
816
  ]
796
817
  })
797
818
  }),
798
- /* @__PURE__ */ z(d, {
799
- title: r("devportal.legalInformation", "Legal Information"),
800
- children: /* @__PURE__ */ B("div", {
819
+ /* @__PURE__ */ B(d, {
820
+ title: i("devportal.legalInformation", "Legal Information"),
821
+ children: /* @__PURE__ */ V("div", {
801
822
  className: "space-y-4",
802
823
  children: [
803
- /* @__PURE__ */ B("div", {
824
+ /* @__PURE__ */ V("div", {
804
825
  className: "grid gap-4 sm:grid-cols-2",
805
826
  children: [
806
- /* @__PURE__ */ z(v, {
807
- label: r("devportal.legalEntityName", "Legal Entity Name"),
808
- value: o.legalEntityName,
809
- onChange: (e) => u((t) => ({
827
+ /* @__PURE__ */ B(v, {
828
+ label: i("devportal.legalEntityName", "Legal Entity Name"),
829
+ value: u.legalEntityName,
830
+ onChange: (e) => f((t) => ({
810
831
  ...t,
811
832
  legalEntityName: e.target.value
812
833
  })),
813
- disabled: !n
834
+ disabled: !r
814
835
  }),
815
- /* @__PURE__ */ z(v, {
816
- label: r("devportal.entityType", "Entity Type"),
817
- value: o.legalEntityType,
818
- onChange: (e) => u((t) => ({
836
+ /* @__PURE__ */ B(v, {
837
+ label: i("devportal.entityType", "Entity Type"),
838
+ value: u.legalEntityType,
839
+ onChange: (e) => f((t) => ({
819
840
  ...t,
820
841
  legalEntityType: e.target.value
821
842
  })),
822
- disabled: !n
843
+ disabled: !r
823
844
  }),
824
- /* @__PURE__ */ z(v, {
825
- label: r("devportal.taxId", "Tax ID"),
826
- value: f.taxId,
827
- onChange: (e) => p((t) => ({
845
+ /* @__PURE__ */ B(v, {
846
+ label: i("devportal.taxId", "Tax ID"),
847
+ value: p.taxId,
848
+ onChange: (e) => m((t) => ({
828
849
  ...t,
829
850
  taxId: e.target.value
830
851
  })),
831
- disabled: !n
852
+ disabled: !r
832
853
  }),
833
- /* @__PURE__ */ z(v, {
834
- label: r("devportal.taxCountry", "Tax Country"),
835
- value: f.taxCountry,
836
- onChange: (e) => p((t) => ({
854
+ /* @__PURE__ */ B(v, {
855
+ label: i("devportal.taxCountry", "Tax Country"),
856
+ value: p.taxCountry,
857
+ onChange: (e) => m((t) => ({
837
858
  ...t,
838
859
  taxCountry: e.target.value.toUpperCase()
839
860
  })),
840
- disabled: !n
861
+ disabled: !r
841
862
  })
842
863
  ]
843
864
  }),
844
- /* @__PURE__ */ z(_, { items: [{
845
- label: r("devportal.taxForm", "Tax Form"),
846
- value: e.taxFormType || r("devportal.notSubmitted", "Not submitted")
865
+ /* @__PURE__ */ B(_, { items: [{
866
+ label: i("devportal.taxForm", "Tax Form"),
867
+ value: e.taxFormType || i("devportal.notSubmitted", "Not submitted")
847
868
  }, {
848
- label: r("devportal.taxFormStatus", "Tax Form Status"),
849
- value: e.taxFormType ? e.taxFormVerified ? /* @__PURE__ */ B("span", {
869
+ label: i("devportal.taxFormStatus", "Tax Form Status"),
870
+ value: e.taxFormType ? e.taxFormVerified ? /* @__PURE__ */ V("span", {
850
871
  className: "text-status-success-text flex items-center gap-1",
851
872
  children: [
852
- /* @__PURE__ */ z(k, { size: 14 }),
873
+ /* @__PURE__ */ B(k, { size: 14 }),
853
874
  " ",
854
- r("devportal.verified", "Verified")
875
+ i("devportal.verified", "Verified")
855
876
  ]
856
- }) : r("devportal.pendingVerification", "Pending verification") : r("devportal.notSubmitted", "Not submitted")
877
+ }) : i("devportal.pendingVerification", "Pending verification") : i("devportal.notSubmitted", "Not submitted")
857
878
  }] }),
858
- /* @__PURE__ */ B("div", {
879
+ /* @__PURE__ */ V("div", {
859
880
  className: "flex justify-end gap-2",
860
- children: [/* @__PURE__ */ B("button", {
881
+ children: [/* @__PURE__ */ V("button", {
861
882
  type: "button",
862
- disabled: !n || ye,
863
- onClick: () => void Ce(),
883
+ disabled: !r || De,
884
+ onClick: () => void je(),
864
885
  className: "inline-flex items-center gap-2 rounded-md border border-border-seam px-4 py-2 text-sm font-medium hover:bg-bg-sunken disabled:opacity-50",
865
- children: [ye ? /* @__PURE__ */ z(M, {
886
+ children: [De ? /* @__PURE__ */ B(M, {
866
887
  size: 14,
867
888
  className: "animate-spin"
868
- }) : null, r("devportal.saveLegalInfo", "Save Legal Info")]
869
- }), /* @__PURE__ */ B("button", {
889
+ }) : null, i("devportal.saveLegalInfo", "Save Legal Info")]
890
+ }), /* @__PURE__ */ V("button", {
870
891
  type: "button",
871
- disabled: !n || xe,
872
- onClick: () => void we(),
892
+ disabled: !r || ke,
893
+ onClick: () => void Me(),
873
894
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
874
- children: [xe ? /* @__PURE__ */ z(M, {
895
+ children: [ke ? /* @__PURE__ */ B(M, {
875
896
  size: 14,
876
897
  className: "animate-spin"
877
- }) : null, r("devportal.saveTaxInfo", "Save Tax Info")]
898
+ }) : null, i("devportal.saveTaxInfo", "Save Tax Info")]
878
899
  })]
879
900
  })
880
901
  ]
881
902
  })
882
903
  }),
883
- e.kind === "PHYSICAL" && /* @__PURE__ */ z(d, {
884
- title: r("devportal.fulfillment", "Fulfillment"),
885
- children: /* @__PURE__ */ z("div", {
904
+ e.kind === "PHYSICAL" && /* @__PURE__ */ B(d, {
905
+ title: i("devportal.fulfillment", "Fulfillment"),
906
+ children: /* @__PURE__ */ V("div", {
886
907
  className: "space-y-3",
887
- children: (() => {
888
- let e = m.pickupPostalCode.trim(), t = g.find((t) => t.postalCode === e), i = g.length > 0;
889
- return /* @__PURE__ */ B(R, { children: [
890
- e.length === 0 ? /* @__PURE__ */ B("div", {
891
- className: "rounded-md border border-border-seam bg-bg-sunken p-4",
892
- children: [/* @__PURE__ */ z("p", {
893
- className: "text-sm font-medium",
894
- children: r("devportal.noPickupAddress", "No pickup address set up yet")
895
- }), /* @__PURE__ */ z("p", {
896
- className: "mt-1 text-sm text-text-secondary",
897
- children: r("devportal.noPickupAddressHint", "Buyers need to know where your physical orders actually ship from — a bare pincode isn't enough, two sellers can share one. Set up your real pickup address and we'll register it with our shipping carrier for you, free of charge.")
898
- })]
899
- }) : t ? /* @__PURE__ */ B("div", {
900
- className: "rounded-md border border-status-success-border bg-status-success-bg-subtle p-4",
901
- children: [/* @__PURE__ */ z("p", {
902
- className: "text-sm font-medium text-status-success-text",
903
- children: r("devportal.pickupAddressRegistered", "Pickup address registered — ready for automated shipping")
904
- }), /* @__PURE__ */ B("p", {
905
- className: "mt-1 text-sm text-text-secondary",
906
- children: [
907
- t.label,
908
- " · ",
909
- t.postalCode,
910
- " ·",
911
- " ",
912
- x(t.carrier)
913
- ]
914
- })]
915
- }) : i ? /* @__PURE__ */ B("div", {
916
- className: "rounded-md border border-status-error-border bg-status-error-bg-subtle p-4",
917
- children: [/* @__PURE__ */ z("p", {
918
- className: "text-sm font-medium text-status-error-text",
919
- children: r("devportal.pickupAddressNotRegistered", "Pickup address not registered")
920
- }), /* @__PURE__ */ B("p", {
921
- className: "mt-1 text-sm text-text-secondary",
908
+ children: [
909
+ R && /* @__PURE__ */ B("div", {
910
+ className: "rounded-md border border-status-error-bg bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
911
+ children: R
912
+ }),
913
+ I && /* @__PURE__ */ B("div", {
914
+ className: "rounded-md border border-status-success-bg bg-status-success-bg-subtle px-4 py-3 text-sm text-status-success-text",
915
+ children: I
916
+ }),
917
+ !ie && g.length === 0 && /* @__PURE__ */ V("div", {
918
+ className: "rounded-md border border-border-seam bg-bg-sunken p-4",
919
+ children: [/* @__PURE__ */ B("p", {
920
+ className: "text-sm font-medium",
921
+ children: i("devportal.noPickupAddress", "No pickup address set up yet")
922
+ }), /* @__PURE__ */ B("p", {
923
+ className: "mt-1 text-sm text-text-secondary",
924
+ children: i("devportal.noPickupAddressHint", "Buyers need to know where your physical orders actually ship from — a bare pincode isn't enough, two sellers can share one. Add your real pickup address and we'll register it with our shipping carrier for you, free of charge.")
925
+ })]
926
+ }),
927
+ g.length > 0 && /* @__PURE__ */ B("div", {
928
+ className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
929
+ children: g.map((e) => {
930
+ let n = h.some((t) => t.carrier === e.carrier && t.postalCode === e.postalCode), a = j === e.id;
931
+ return /* @__PURE__ */ V("div", {
932
+ className: t("rounded-md border p-4", e.isDefault ? "border-status-success-border bg-status-success-bg-subtle" : "border-border-seam bg-bg-sunken"),
922
933
  children: [
923
- r("devportal.pickupAddressNotRegisteredHint", "Your saved pincode isn't registered with our shipping carrier yet — physical orders can't auto-ship until it's added."),
924
- " ",
925
- "(",
926
- e,
927
- ")"
934
+ /* @__PURE__ */ V("div", {
935
+ className: "flex items-start justify-between gap-2",
936
+ children: [/* @__PURE__ */ B("p", {
937
+ className: "text-sm font-medium",
938
+ children: e.carrierLocationLabel
939
+ }), e.isDefault && /* @__PURE__ */ B("span", {
940
+ className: "rounded-full bg-status-success-bg px-2 py-0.5 text-xs font-medium text-white",
941
+ children: i("devportal.active", "Active")
942
+ })]
943
+ }),
944
+ /* @__PURE__ */ V("p", {
945
+ className: "mt-1 text-sm text-text-secondary",
946
+ children: [
947
+ e.address,
948
+ e.addressLine2 ? `, ${e.addressLine2}` : "",
949
+ ", ",
950
+ e.city,
951
+ ", ",
952
+ e.state,
953
+ " ",
954
+ e.postalCode,
955
+ ", ",
956
+ e.country
957
+ ]
958
+ }),
959
+ /* @__PURE__ */ B("p", {
960
+ className: "mt-1 text-xs text-text-secondary",
961
+ children: b(e.carrier)
962
+ }),
963
+ !n && /* @__PURE__ */ B("p", {
964
+ className: "mt-2 text-xs text-status-error-text",
965
+ children: i("devportal.pickupAddressNotRegisteredHint", "Not currently registered with the carrier — physical orders can't auto-ship from this address right now.")
966
+ }),
967
+ r && /* @__PURE__ */ V("div", {
968
+ className: "mt-3 flex items-center gap-4",
969
+ children: [!e.isDefault && /* @__PURE__ */ B("button", {
970
+ type: "button",
971
+ disabled: a,
972
+ onClick: () => void Ne(e.id),
973
+ className: "text-sm font-medium text-action-primary-text hover:underline disabled:opacity-50",
974
+ children: i("devportal.setPickupAddressActiveCta", "Set as active")
975
+ }), /* @__PURE__ */ V("button", {
976
+ type: "button",
977
+ disabled: a,
978
+ onClick: () => A(e.id),
979
+ className: "flex items-center gap-1.5 text-sm text-status-error-text hover:underline disabled:opacity-50",
980
+ children: [/* @__PURE__ */ B(F, { className: "h-3.5 w-3.5" }), i("devportal.removePickupAddressCta", "Remove")]
981
+ })]
982
+ })
928
983
  ]
929
- })]
930
- }) : /* @__PURE__ */ B("div", {
931
- className: "rounded-md border border-border-seam bg-bg-sunken p-4",
932
- children: [/* @__PURE__ */ z("p", {
933
- className: "text-sm font-medium",
934
- children: e
935
- }), /* @__PURE__ */ z("p", {
936
- className: "mt-1 text-sm text-text-secondary",
937
- children: r("devportal.pickupAddressStatusUnavailable", "Couldn't check registration status right now.")
938
- })]
939
- }),
940
- n && /* @__PURE__ */ B("div", {
941
- className: "flex items-center gap-4",
942
- children: [/* @__PURE__ */ z("button", {
943
- type: "button",
944
- onClick: () => E(!0),
945
- className: "text-sm font-medium text-action-primary-text hover:underline",
946
- children: e.length === 0 ? r("devportal.setUpPickupAddressCta", "Set up pickup address") : t ? r("devportal.changePickupAddressCta", "Change pickup address") : r("devportal.registerPickupAddressCta", "Register this address with Shiprocket")
947
- }), e.length > 0 && /* @__PURE__ */ B("button", {
948
- type: "button",
949
- disabled: $,
950
- onClick: () => O(!0),
951
- className: "flex items-center gap-1.5 text-sm text-status-error-text hover:underline disabled:opacity-50",
952
- children: [/* @__PURE__ */ z(ie, { className: "h-3.5 w-3.5" }), r("devportal.removePickupAddressCta", "Remove pickup address")]
953
- })]
954
- }),
955
- T && /* @__PURE__ */ z(te, {
956
- open: T,
957
- onOpenChange: E,
958
- initialPostalCode: e,
959
- carrier: "shiprocket",
960
- onRegistered: (e) => {
961
- Te(e), re();
962
- }
963
- }),
964
- /* @__PURE__ */ z(ee, {
965
- open: D,
966
- onOpenChange: O,
967
- variant: "danger",
968
- loading: $,
969
- title: r("devportal.removePickupAddressConfirmTitle", "Remove this pickup address?"),
970
- description: r("devportal.removePickupAddressConfirmDesc", "We'll stop using it to quote and book shipments for this organization — you can register a different address any time. Carriers like Shiprocket don't offer a way to delete an address from their own account once added, so it may still show up there, but it won't be used for your orders anymore."),
971
- confirmLabel: r("devportal.remove", "Remove"),
972
- cancelLabel: r("devportal.cancel", "Cancel"),
973
- onConfirm: async () => {
974
- await Te(""), O(!1);
975
- }
984
+ }, e.id);
976
985
  })
977
- ] });
978
- })()
986
+ }),
987
+ r && /* @__PURE__ */ B("button", {
988
+ type: "button",
989
+ onClick: () => D(!0),
990
+ className: "text-sm font-medium text-action-primary-text hover:underline",
991
+ children: i("devportal.addPickupAddressCta", "Add pickup address")
992
+ }),
993
+ E && /* @__PURE__ */ B(te, {
994
+ open: E,
995
+ onOpenChange: D,
996
+ organizationId: e.id,
997
+ carrier: "shiprocket",
998
+ onRegistered: () => {
999
+ T(), L(i("devportal.pickupAddressAdded", "Pickup address added"));
1000
+ }
1001
+ }),
1002
+ /* @__PURE__ */ B(ee, {
1003
+ open: O !== null,
1004
+ onOpenChange: (e) => {
1005
+ e || A(null);
1006
+ },
1007
+ variant: "danger",
1008
+ loading: j === O,
1009
+ title: i("devportal.removePickupAddressConfirmTitle", "Remove this pickup address?"),
1010
+ description: i("devportal.removePickupAddressConfirmDesc", "We'll stop using it to quote and book shipments for this organization. Carriers like Shiprocket don't offer a way to delete an address from their own account once added, so it may still show up there, but it won't be used for your orders anymore."),
1011
+ confirmLabel: i("devportal.remove", "Remove"),
1012
+ cancelLabel: i("devportal.cancel", "Cancel"),
1013
+ onConfirm: async () => {
1014
+ O && await Pe(O);
1015
+ }
1016
+ })
1017
+ ]
979
1018
  })
980
1019
  }),
981
- /* @__PURE__ */ B(d, {
982
- title: r("devportal.verificationStatus", "Verification Status"),
983
- children: [/* @__PURE__ */ z(_, { items: [{
984
- label: r("devportal.verifiedLabel", "Verified"),
985
- value: Y.verificationStatus === "VERIFIED" ? /* @__PURE__ */ B("span", {
1020
+ /* @__PURE__ */ V(d, {
1021
+ title: i("devportal.verificationStatus", "Verification Status"),
1022
+ children: [/* @__PURE__ */ B(_, { items: [{
1023
+ label: i("devportal.verifiedLabel", "Verified"),
1024
+ value: Z.verificationStatus === "VERIFIED" ? /* @__PURE__ */ V("span", {
986
1025
  className: "text-status-success-text flex items-center gap-1",
987
1026
  children: [
988
- /* @__PURE__ */ z(k, { size: 14 }),
1027
+ /* @__PURE__ */ B(k, { size: 14 }),
989
1028
  " ",
990
- r("devportal.verifiedVia", "Verified via"),
1029
+ i("devportal.verifiedVia", "Verified via"),
991
1030
  " ",
992
- Y.verificationMethod
1031
+ Z.verificationMethod
993
1032
  ]
994
- }) : Y.verificationStatus === "PENDING" ? r("devportal.pendingVerification", "Pending verification") : Y.verificationStatus === "REJECTED" ? r("devportal.verificationRejected", "Rejected") : r("devportal.notVerified", "Not verified")
1033
+ }) : Z.verificationStatus === "PENDING" ? i("devportal.pendingVerification", "Pending verification") : Z.verificationStatus === "REJECTED" ? i("devportal.verificationRejected", "Rejected") : i("devportal.notVerified", "Not verified")
995
1034
  }, {
996
- label: r("devportal.certifiedLabel", "Certified"),
997
- value: e.isCertified ? /* @__PURE__ */ B("span", {
1035
+ label: i("devportal.certifiedLabel", "Certified"),
1036
+ value: e.isCertified ? /* @__PURE__ */ V("span", {
998
1037
  className: "text-accent-blue flex items-center gap-1",
999
1038
  children: [
1000
- /* @__PURE__ */ z(F, { size: 14 }),
1039
+ /* @__PURE__ */ B(P, { size: 14 }),
1001
1040
  " ",
1002
- r("devportal.certifiedUntil", "Certified until"),
1041
+ i("devportal.certifiedUntil", "Certified until"),
1003
1042
  " ",
1004
1043
  e.certificationExpiry ? new Date(e.certificationExpiry).toLocaleDateString() : "N/A"
1005
1044
  ]
1006
- }) : r("devportal.notCertified", "Not certified")
1007
- }] }), Y.verificationStatus !== "VERIFIED" && /* @__PURE__ */ z("div", {
1045
+ }) : i("devportal.notCertified", "Not certified")
1046
+ }] }), Z.verificationStatus !== "VERIFIED" && /* @__PURE__ */ B("div", {
1008
1047
  className: "mt-4 rounded-md border border-border-subtle p-4 space-y-3",
1009
- children: H ? /* @__PURE__ */ B("p", {
1048
+ children: fe ? /* @__PURE__ */ V("p", {
1010
1049
  className: "text-sm text-status-success-text flex items-center gap-2",
1011
- children: [/* @__PURE__ */ z(k, { size: 14 }), r("devportal.verificationRequested", "Verification request submitted. Our team will review and contact you.")]
1012
- }) : /* @__PURE__ */ B(R, { children: [
1013
- /* @__PURE__ */ z("p", {
1050
+ children: [/* @__PURE__ */ B(k, { size: 14 }), i("devportal.verificationRequested", "Verification request submitted. Our team will review and contact you.")]
1051
+ }) : /* @__PURE__ */ V(z, { children: [
1052
+ /* @__PURE__ */ B("p", {
1014
1053
  className: "text-sm text-text-secondary",
1015
- children: r("devportal.requestVerificationHint", "Get your organization verified to build trust with users. Choose a verification method:")
1054
+ children: i("devportal.requestVerificationHint", "Get your organization verified to build trust with users. Choose a verification method:")
1016
1055
  }),
1017
- Y.verificationStatus === "PENDING" && /* @__PURE__ */ B("div", {
1056
+ Z.verificationStatus === "PENDING" && /* @__PURE__ */ V("div", {
1018
1057
  className: "rounded-md border border-border-subtle bg-bg-sunken/40 p-3 text-sm text-text-secondary",
1019
1058
  children: [
1020
- r("devportal.pendingVerification", "Pending verification"),
1021
- Y.verificationMethod ? ` · ${Y.verificationMethod}` : "",
1022
- Y.verificationRequestNotes ? ` · ${Y.verificationRequestNotes}` : ""
1059
+ i("devportal.pendingVerification", "Pending verification"),
1060
+ Z.verificationMethod ? ` · ${Z.verificationMethod}` : "",
1061
+ Z.verificationRequestNotes ? ` · ${Z.verificationRequestNotes}` : ""
1023
1062
  ]
1024
1063
  }),
1025
- Y.verificationStatus === "REJECTED" && Y.verificationRejectedReason && /* @__PURE__ */ z("div", {
1064
+ Z.verificationStatus === "REJECTED" && Z.verificationRejectedReason && /* @__PURE__ */ B("div", {
1026
1065
  className: "rounded-md border border-status-error-border bg-status-error-bg-subtle p-3 text-sm text-status-error-text",
1027
- children: Y.verificationRejectedReason
1066
+ children: Z.verificationRejectedReason
1028
1067
  }),
1029
- X.length > 0 && /* @__PURE__ */ B("div", {
1068
+ Q.length > 0 && /* @__PURE__ */ V("div", {
1030
1069
  className: "rounded-md border border-border-subtle bg-bg-sunken/40 p-3 text-sm text-text-secondary",
1031
- children: [/* @__PURE__ */ z("div", {
1070
+ children: [/* @__PURE__ */ B("div", {
1032
1071
  className: "font-medium text-text-primary",
1033
- children: r("devportal.completeBeforeVerification", "Complete these details before submitting for review")
1034
- }), /* @__PURE__ */ z("ul", {
1072
+ children: i("devportal.completeBeforeVerification", "Complete these details before submitting for review")
1073
+ }), /* @__PURE__ */ B("ul", {
1035
1074
  className: "mt-2 list-disc pl-5 space-y-1",
1036
- children: X.map((e) => /* @__PURE__ */ z("li", { children: e }, e))
1075
+ children: Q.map((e) => /* @__PURE__ */ B("li", { children: e }, e))
1037
1076
  })]
1038
1077
  }),
1039
- Y.verificationStatus !== "PENDING" && /* @__PURE__ */ B(R, { children: [
1040
- /* @__PURE__ */ z("div", {
1078
+ Z.verificationStatus !== "PENDING" && /* @__PURE__ */ V(z, { children: [
1079
+ /* @__PURE__ */ B("div", {
1041
1080
  className: "flex gap-2 flex-wrap",
1042
1081
  children: [
1043
1082
  "domain",
1044
1083
  "document",
1045
1084
  "manual"
1046
- ].map((e) => /* @__PURE__ */ z("button", {
1085
+ ].map((e) => /* @__PURE__ */ B("button", {
1047
1086
  type: "button",
1048
- onClick: () => ae(e),
1049
- className: `rounded-md border px-3 py-1 text-xs font-medium transition-colors ${L === e ? "bg-action-primary-bg text-action-primary-text border-primary" : "border-border-subtle hover:bg-bg-sunken"}`,
1050
- children: e === "domain" ? r("devportal.domainVerification", "Domain") : e === "document" ? r("devportal.documentVerification", "Document") : r("devportal.manualVerification", "Manual review")
1087
+ onClick: () => de(e),
1088
+ className: `rounded-md border px-3 py-1 text-xs font-medium transition-colors ${Y === e ? "bg-action-primary-bg text-action-primary-text border-primary" : "border-border-subtle hover:bg-bg-sunken"}`,
1089
+ children: e === "domain" ? i("devportal.domainVerification", "Domain") : e === "document" ? i("devportal.documentVerification", "Document") : i("devportal.manualVerification", "Manual review")
1051
1090
  }, e))
1052
1091
  }),
1053
- L === "domain" ? /* @__PURE__ */ z(v, {
1054
- label: r("devportal.domainVerification", "Domain"),
1055
- value: q,
1056
- onChange: (e) => pe(e.target.value),
1092
+ Y === "domain" ? /* @__PURE__ */ B(v, {
1093
+ label: i("devportal.domainVerification", "Domain"),
1094
+ value: _e,
1095
+ onChange: (e) => ve(e.target.value),
1057
1096
  placeholder: "example.com"
1058
- }) : L === "document" ? /* @__PURE__ */ z(v, {
1059
- label: r("devportal.evidenceUrl", "Evidence URL"),
1060
- value: K,
1061
- onChange: (e) => fe(e.target.value),
1097
+ }) : Y === "document" ? /* @__PURE__ */ B(v, {
1098
+ label: i("devportal.evidenceUrl", "Evidence URL"),
1099
+ value: he,
1100
+ onChange: (e) => ge(e.target.value),
1062
1101
  placeholder: "https://..."
1063
1102
  }) : null,
1064
- /* @__PURE__ */ z(y, {
1065
- label: r("devportal.notes", "Notes"),
1066
- value: W,
1067
- onChange: (e) => le(e.target.value),
1103
+ /* @__PURE__ */ B(y, {
1104
+ label: i("devportal.notes", "Notes"),
1105
+ value: X,
1106
+ onChange: (e) => me(e.target.value),
1068
1107
  placeholder: "What should reviewers validate?"
1069
1108
  }),
1070
- /* @__PURE__ */ B("button", {
1109
+ /* @__PURE__ */ V("button", {
1071
1110
  type: "button",
1072
- disabled: !_e,
1111
+ disabled: !Ce,
1073
1112
  onClick: () => void (async () => {
1074
- let t = q.trim(), n = K.trim(), a = W.trim();
1075
- if (L === "domain" && !ue(t)) {
1076
- I(r("devportal.verification.errors.domainRequired", "Enter a valid domain like burdenoff.com"));
1113
+ let t = _e.trim(), n = he.trim(), r = X.trim();
1114
+ if (Y === "domain" && !le(t)) {
1115
+ J(i("devportal.verification.errors.domainRequired", "Enter a valid domain like burdenoff.com"));
1077
1116
  return;
1078
1117
  }
1079
- if (L === "document" && !G(n)) {
1080
- I(r("devportal.verification.errors.evidenceUrlRequired", "Enter a valid evidence URL starting with http:// or https://"));
1118
+ if (Y === "document" && !q(n)) {
1119
+ J(i("devportal.verification.errors.evidenceUrlRequired", "Enter a valid evidence URL starting with http:// or https://"));
1081
1120
  return;
1082
1121
  }
1083
- if (L === "manual" && !a) {
1084
- I(r("devportal.verification.errors.notesRequired", "Add notes so the reviewer knows what to verify"));
1122
+ if (Y === "manual" && !r) {
1123
+ J(i("devportal.verification.errors.notesRequired", "Add notes so the reviewer knows what to verify"));
1085
1124
  return;
1086
1125
  }
1087
- I(null), j(null), ge(!0);
1126
+ J(null), G(null), Se(!0);
1088
1127
  try {
1089
- await Q({ variables: {
1128
+ await we({ variables: {
1090
1129
  id: e.id,
1091
1130
  input: {
1092
- name: i.name.trim() || void 0,
1093
- description: i.description.trim() || null,
1094
- websiteUrl: i.websiteUrl.trim() || null,
1095
- contactEmail: i.contactEmail.trim() || null,
1096
- supportEmail: i.supportEmail.trim() || null,
1097
- logoUrl: i.logoUrl.trim() || null,
1098
- bannerUrl: i.bannerUrl.trim() || null
1131
+ name: a.name.trim() || void 0,
1132
+ description: a.description.trim() || null,
1133
+ websiteUrl: a.websiteUrl.trim() || null,
1134
+ contactEmail: a.contactEmail.trim() || null,
1135
+ supportEmail: a.supportEmail.trim() || null,
1136
+ logoUrl: a.logoUrl.trim() || null,
1137
+ bannerUrl: a.bannerUrl.trim() || null
1099
1138
  }
1100
- } }), await ve({ variables: {
1139
+ } }), await Ee({ variables: {
1101
1140
  id: e.id,
1102
1141
  input: {
1103
- legalEntityName: o.legalEntityName.trim() || null,
1104
- legalEntityType: o.legalEntityType.trim() || null
1142
+ legalEntityName: u.legalEntityName.trim() || null,
1143
+ legalEntityType: u.legalEntityType.trim() || null
1105
1144
  }
1106
- } }), await be({ variables: {
1145
+ } }), await Oe({ variables: {
1107
1146
  id: e.id,
1108
1147
  input: {
1109
- taxId: f.taxId.trim() || null,
1110
- taxCountry: f.taxCountry.trim() || null
1148
+ taxId: p.taxId.trim() || null,
1149
+ taxCountry: p.taxCountry.trim() || null
1111
1150
  }
1112
1151
  } });
1113
- let s = await U({
1152
+ let o = await W({
1114
1153
  gateway: "global",
1115
1154
  query: ce,
1116
1155
  variables: {
1117
1156
  id: e.id,
1118
- method: L,
1119
- notes: a || null,
1120
- evidenceUrl: L === "domain" ? null : n || null,
1121
- domain: L === "domain" && t || null
1157
+ method: Y,
1158
+ notes: r || null,
1159
+ evidenceUrl: Y === "domain" ? null : n || null,
1160
+ domain: Y === "domain" && t || null
1122
1161
  }
1123
1162
  });
1124
- if (s.errors?.length) throw Error(s.errors[0]?.message || "Verification request failed");
1125
- oe(!0), j(r("devportal.verificationRequested", "Verification request submitted. Our team will review and contact you.")), J((await U({
1163
+ if (o.errors?.length) throw Error(o.errors[0]?.message || "Verification request failed");
1164
+ pe(!0), G(i("devportal.verificationRequested", "Verification request submitted. Our team will review and contact you.")), be((await W({
1126
1165
  gateway: "global",
1127
1166
  query: se,
1128
1167
  variables: { id: e.id }
1129
1168
  })).data?.developerOrganization ?? null);
1130
1169
  } catch (e) {
1131
- I(e instanceof Error ? e.message : r("devportal.verificationRequestFailed", "Verification request failed"));
1170
+ J(e instanceof Error ? e.message : i("devportal.verificationRequestFailed", "Verification request failed"));
1132
1171
  } finally {
1133
- ge(!1);
1172
+ Se(!1);
1134
1173
  }
1135
1174
  })(),
1136
1175
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
1137
- children: [he ? /* @__PURE__ */ z(M, {
1176
+ children: [xe ? /* @__PURE__ */ B(M, {
1138
1177
  size: 14,
1139
1178
  className: "animate-spin"
1140
- }) : /* @__PURE__ */ z(F, { size: 14 }), r("devportal.requestVerification", "Request Verification")]
1179
+ }) : /* @__PURE__ */ B(P, { size: 14 }), i("devportal.requestVerification", "Request Verification")]
1141
1180
  })
1142
1181
  ] })
1143
1182
  ] })
@@ -1147,6 +1186,6 @@ var K = {
1147
1186
  });
1148
1187
  };
1149
1188
  //#endregion
1150
- export { fe as OrganizationDetailPage };
1189
+ export { Y as OrganizationDetailPage };
1151
1190
 
1152
1191
  //# sourceMappingURL=OrganizationDetailPage.js.map