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