@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.
@@ -2,259 +2,249 @@ import { useDevportal as e } from "../providers/DevportalProvider.js";
2
2
  import { useTr as t } from "../utils/i18n.js";
3
3
  import { cn as n } from "../utils/cn.js";
4
4
  import { useDevportalEventBus as r } from "../events/index.js";
5
- import { orgSectionPath as i, useIsSellerSection as ee } from "../hooks/useIsSellerSection.js";
6
- import { useCreateBillingAccountMutation as te, useCreateOrganizationMutation as a, useCreateSellerOrganizationMutation as o, useGetBillingAccountsByOrgQuery as s, useLinkDevOrgBillingAccountMutation as c } from "../../generated/global-operations.js";
7
- import { PageLayout as l, PageSection as u } from "../components/PageLayout.js";
8
- import { InputField as d, TextareaField as f } from "../components/FormField.js";
9
- import { PermissionGuard as p } from "../components/PermissionGuard.js";
5
+ import { orgSectionPath as i, useIsSellerSection as a } from "../hooks/useIsSellerSection.js";
6
+ import { useCreateBillingAccountMutation as o, useCreateOrganizationMutation as s, useCreateSellerOrganizationMutation as c, useGetBillingAccountsByOrgQuery as l, useLinkDevOrgBillingAccountMutation as u } from "../../generated/global-operations.js";
7
+ import { PageLayout as d, PageSection as f } from "../components/PageLayout.js";
8
+ import { InputField as p, TextareaField as m } from "../components/FormField.js";
9
+ import { PermissionGuard as h } from "../components/PermissionGuard.js";
10
10
  import "../components/index.js";
11
- import { capitalizeCarrierName as m, useCarrierPickupLocations as h } from "../hooks/useCarrierPickupLocations.js";
12
11
  import "../hooks/index.js";
13
12
  import { useEffect as g, useMemo as _, useState as v } from "react";
14
- import { Building2 as y, Check as b, Link2 as x, Loader2 as S, X as C } from "lucide-react";
15
- import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
13
+ import { Building2 as y, Check as b, Link2 as x, Loader2 as S, X as ee } from "lucide-react";
14
+ import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
16
15
  //#region src/devportal/pages/CreateOrganizationPage.tsx
17
- var D = () => {
18
- let { navigate: D, basePath: O, currentUser: ne, tenantId: re, setActiveOrgId: ie, setActivePhysicalOrgId: k } = e(), A = ee(), j = t(), [M, N] = v({}), [P] = a(), [F] = o(), [I] = te(), [L] = c(), R = r(), [z, B] = v("idle"), V = z !== "idle", [H, U] = v("auto"), [W, G] = v(null), { data: K, loading: q } = s({
16
+ var E = () => {
17
+ let { navigate: E, basePath: D, currentUser: O, tenantId: k, setActiveOrgId: A, setActivePhysicalOrgId: te } = e(), j = a(), M = t(), [N, P] = v({}), [F] = s(), [I] = c(), [L] = o(), [R] = u(), z = r(), [B, V] = v("idle"), H = B !== "idle", [U, W] = v("auto"), [G, K] = v(null), { data: q, loading: J } = l({
19
18
  fetchPolicy: "cache-and-network",
20
- context: { headers: { "x-org-id": re ?? "" } }
21
- }), J = _(() => K?.getBillingAccountsByOrg ?? [], [K]);
19
+ context: { headers: { "x-org-id": k ?? "" } }
20
+ }), Y = _(() => q?.getBillingAccountsByOrg ?? [], [q]);
22
21
  g(() => {
23
- if (!(H !== "existing" || q)) {
24
- if (J.length === 0) {
25
- U("auto");
22
+ if (!(U !== "existing" || J)) {
23
+ if (Y.length === 0) {
24
+ W("auto");
26
25
  return;
27
26
  }
28
- W || G(J.find((e) => e.isDefault)?.id ?? J[0]?.id ?? null);
27
+ G || K(Y.find((e) => e.isDefault)?.id ?? Y[0]?.id ?? null);
29
28
  }
30
29
  }, [
31
- H,
32
- q,
30
+ U,
33
31
  J,
34
- W
32
+ Y,
33
+ G
35
34
  ]);
36
- let [Y, X] = v({
35
+ let [X, Z] = v({
37
36
  name: "",
38
37
  slug: "",
39
38
  description: "",
40
39
  websiteUrl: "",
41
40
  contactEmail: "",
42
- supportEmail: "",
43
- pickupPostalCode: ""
44
- }), { locations: Z } = h(), Q = (e) => {
45
- D?.(`${O}${e}`);
46
- }, ae = (e) => e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, ""), oe = (e) => {
41
+ supportEmail: ""
42
+ }), Q = (e) => {
43
+ E?.(`${D}${e}`);
44
+ }, ne = (e) => e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, ""), re = (e) => {
47
45
  let t = e.target.value;
48
- X((e) => ({
46
+ Z((e) => ({
49
47
  ...e,
50
48
  name: t,
51
- slug: e.slug || ae(t)
52
- })), M.name && N((e) => ({
49
+ slug: e.slug || ne(t)
50
+ })), N.name && P((e) => ({
53
51
  ...e,
54
52
  name: void 0
55
53
  }));
56
54
  }, $ = (e, t) => {
57
- X((n) => ({
55
+ Z((n) => ({
58
56
  ...n,
59
57
  [e]: t
60
- })), M[e] && N((t) => ({
58
+ })), N[e] && P((t) => ({
61
59
  ...t,
62
60
  [e]: void 0
63
61
  }));
64
- }, se = () => {
62
+ }, ie = () => {
65
63
  let e = {};
66
- return Y.name.trim() ? Y.name.length < 2 ? e.name = j("devportal.orgNameTooShort", "Name must be at least 2 characters") : Y.name.length > 100 && (e.name = j("devportal.nameTooLong", "Name must be less than 100 characters")) : e.name = j("devportal.orgNameRequired", "Organization name is required"), Y.slug.trim() ? /^[a-z0-9-]+$/.test(Y.slug) || (e.slug = j("devportal.slugInvalid", "Slug can only contain lowercase letters, numbers, and hyphens")) : e.slug = j("devportal.slugRequired", "Slug is required"), Y.contactEmail && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(Y.contactEmail) && (e.contactEmail = j("devportal.invalidEmailAddress", "Invalid email address")), Y.supportEmail && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(Y.supportEmail) && (e.supportEmail = j("devportal.invalidEmailAddress", "Invalid email address")), N(e), Object.keys(e).length === 0;
64
+ return X.name.trim() ? X.name.length < 2 ? e.name = M("devportal.orgNameTooShort", "Name must be at least 2 characters") : X.name.length > 100 && (e.name = M("devportal.nameTooLong", "Name must be less than 100 characters")) : e.name = M("devportal.orgNameRequired", "Organization name is required"), X.slug.trim() ? /^[a-z0-9-]+$/.test(X.slug) || (e.slug = M("devportal.slugInvalid", "Slug can only contain lowercase letters, numbers, and hyphens")) : e.slug = M("devportal.slugRequired", "Slug is required"), X.contactEmail && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(X.contactEmail) && (e.contactEmail = M("devportal.invalidEmailAddress", "Invalid email address")), X.supportEmail && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(X.supportEmail) && (e.supportEmail = M("devportal.invalidEmailAddress", "Invalid email address")), P(e), Object.keys(e).length === 0;
67
65
  };
68
- return /* @__PURE__ */ T(p, {
66
+ return /* @__PURE__ */ w(h, {
69
67
  authOnly: !0,
70
- children: /* @__PURE__ */ T(l, {
71
- title: j("devportal.createOrganization", "Create Organization"),
72
- description: A ? j("devportal.createSellerOrganizationDescription", "Set up a seller organization to start selling physical products") : j("devportal.createOrganizationDescription", "Set up a developer organization to collaborate with your team"),
73
- purpose: A ? j("devportal.createSellerOrganizationPurpose", "A seller organization is the shared owner of your physical listings, orders, and revenue. Create one here — you can invite members and complete legal/tax details afterwards.") : j("devportal.createOrganizationPurpose", "An organization is the shared owner of your apps, members, and revenue. Create one here so your team works under a single identity — pick a name and tier now; you can invite members and verify it afterwards."),
74
- backLink: `${O}${i(A)}`,
75
- backLabel: j("devportal.backToOrganizations", "Back to Organizations"),
76
- children: /* @__PURE__ */ E("form", {
68
+ children: /* @__PURE__ */ w(d, {
69
+ title: M("devportal.createOrganization", "Create Organization"),
70
+ description: j ? M("devportal.createSellerOrganizationDescription", "Set up a seller organization to start selling physical products") : M("devportal.createOrganizationDescription", "Set up a developer organization to collaborate with your team"),
71
+ purpose: j ? M("devportal.createSellerOrganizationPurpose", "A seller organization is the shared owner of your physical listings, orders, and revenue. Create one here — you can invite members and complete legal/tax details afterwards.") : M("devportal.createOrganizationPurpose", "An organization is the shared owner of your apps, members, and revenue. Create one here so your team works under a single identity — pick a name and tier now; you can invite members and verify it afterwards."),
72
+ backLink: `${D}${i(j)}`,
73
+ backLabel: M("devportal.backToOrganizations", "Back to Organizations"),
74
+ children: /* @__PURE__ */ T("form", {
77
75
  onSubmit: async (e) => {
78
- if (e.preventDefault(), se()) {
79
- B("creating-org");
76
+ if (e.preventDefault(), ie()) {
77
+ V("creating-org");
80
78
  try {
81
79
  let e = {
82
- name: Y.name,
83
- slug: Y.slug || void 0,
84
- description: Y.description || void 0,
85
- websiteUrl: Y.websiteUrl || void 0,
86
- contactEmail: Y.contactEmail || void 0,
87
- supportEmail: Y.supportEmail || void 0,
88
- pickupPostalCode: A && Y.pickupPostalCode.trim() || void 0
89
- }, t = A ? (await F({ variables: { input: e } })).data?.createSellerOrganization?.id : (await P({ variables: { input: e } })).data?.createDeveloperOrganization?.id;
80
+ name: X.name,
81
+ slug: X.slug || void 0,
82
+ description: X.description || void 0,
83
+ websiteUrl: X.websiteUrl || void 0,
84
+ contactEmail: X.contactEmail || void 0,
85
+ supportEmail: X.supportEmail || void 0
86
+ }, t = j ? (await I({ variables: { input: e } })).data?.createSellerOrganization?.id : (await F({ variables: { input: e } })).data?.createDeveloperOrganization?.id;
90
87
  if (!t) {
91
- B("idle");
88
+ V("idle");
92
89
  return;
93
90
  }
94
- if (R.emit("devportal.org.created", {
91
+ if (z.emit("devportal.org.created", {
95
92
  organizationId: t,
96
- name: Y.name
97
- }), A ? k(t) : ie(t), H === "existing" && W) {
98
- B("linking-billing");
93
+ name: X.name
94
+ }), j ? te(t) : A(t), U === "existing" && G) {
95
+ V("linking-billing");
99
96
  try {
100
- await L({ variables: {
97
+ await R({ variables: {
101
98
  organizationId: t,
102
- billingAccountId: W
99
+ billingAccountId: G
103
100
  } });
104
101
  } catch {}
105
102
  } else {
106
- B("setting-up-billing");
103
+ V("setting-up-billing");
107
104
  try {
108
- let e = (await I({ variables: { input: {
109
- name: Y.name,
110
- email: ne?.email ?? ""
105
+ let e = (await L({ variables: { input: {
106
+ name: X.name,
107
+ email: O?.email ?? ""
111
108
  } } })).data?.createBillingAccount?.id;
112
- e && await L({ variables: {
109
+ e && await R({ variables: {
113
110
  organizationId: t,
114
111
  billingAccountId: e
115
112
  } });
116
113
  } catch {}
117
114
  }
118
- B("redirecting"), Q(i(A, t));
115
+ V("redirecting"), Q(i(j, t));
119
116
  } catch (e) {
120
- console.error("Failed to create organization:", e), B("idle");
117
+ console.error("Failed to create organization:", e), V("idle");
121
118
  }
122
119
  }
123
120
  },
124
121
  className: "space-y-8 max-w-3xl",
125
122
  children: [
126
- /* @__PURE__ */ T(u, {
127
- title: j("devportal.organizationDetails", "Organization Details"),
128
- description: j("devportal.organizationDetailsDescription", "Basic information about your organization"),
129
- children: /* @__PURE__ */ E("div", {
123
+ /* @__PURE__ */ w(f, {
124
+ title: M("devportal.organizationDetails", "Organization Details"),
125
+ description: M("devportal.organizationDetailsDescription", "Basic information about your organization"),
126
+ children: /* @__PURE__ */ T("div", {
130
127
  className: "space-y-4",
131
128
  children: [
132
- /* @__PURE__ */ T(d, {
133
- label: j("devportal.organizationName", "Organization Name"),
134
- value: Y.name,
135
- onChange: oe,
136
- placeholder: j("devportal.organizationNamePlaceholder", "Acme Development"),
129
+ /* @__PURE__ */ w(p, {
130
+ label: M("devportal.organizationName", "Organization Name"),
131
+ value: X.name,
132
+ onChange: re,
133
+ placeholder: M("devportal.organizationNamePlaceholder", "Acme Development"),
137
134
  required: !0,
138
- error: M.name,
139
- hint: j("devportal.organizationNameHint", "Your organization's display name")
135
+ error: N.name,
136
+ hint: M("devportal.organizationNameHint", "Your organization's display name")
140
137
  }),
141
- /* @__PURE__ */ T(d, {
142
- label: j("devportal.slug", "Slug"),
143
- value: Y.slug,
138
+ /* @__PURE__ */ w(p, {
139
+ label: M("devportal.slug", "Slug"),
140
+ value: X.slug,
144
141
  onChange: (e) => $("slug", e.target.value.toLowerCase()),
145
- placeholder: j("devportal.orgSlugPlaceholder", "acme-dev"),
142
+ placeholder: M("devportal.orgSlugPlaceholder", "acme-dev"),
146
143
  required: !0,
147
- error: M.slug,
148
- hint: j("devportal.slugHint", "URL-friendly identifier (auto-generated from name)")
144
+ error: N.slug,
145
+ hint: M("devportal.slugHint", "URL-friendly identifier (auto-generated from name)")
149
146
  }),
150
- /* @__PURE__ */ T(f, {
151
- label: j("devportal.description", "Description"),
152
- value: Y.description,
147
+ /* @__PURE__ */ w(m, {
148
+ label: M("devportal.description", "Description"),
149
+ value: X.description,
153
150
  onChange: (e) => $("description", e.target.value),
154
- placeholder: j("devportal.orgDescriptionPlaceholder", "Tell us about your organization..."),
151
+ placeholder: M("devportal.orgDescriptionPlaceholder", "Tell us about your organization..."),
155
152
  rows: 3
156
153
  }),
157
- /* @__PURE__ */ T(d, {
158
- label: j("devportal.websiteUrl", "Website URL"),
154
+ /* @__PURE__ */ w(p, {
155
+ label: M("devportal.websiteUrl", "Website URL"),
159
156
  type: "url",
160
- value: Y.websiteUrl,
157
+ value: X.websiteUrl,
161
158
  onChange: (e) => $("websiteUrl", e.target.value),
162
159
  placeholder: "https://example.com"
163
160
  }),
164
- A && (() => {
165
- let e = Y.pickupPostalCode.trim(), t = Z.find((t) => t.postalCode === e), n = e.length === 0 || Z.length === 0 ? void 0 : t ? j("devportal.pickupPostalCodeRegistered", "Registered with {{carrier}} — ready for automated shipping.", { carrier: m(t.carrier) }) : j("devportal.pickupPostalCodeNotRegistered", "This pincode isn't registered with our shipping carrier yet — physical orders can't auto-ship until it's added. You can still save it now and set it up later.");
166
- return /* @__PURE__ */ T(d, {
167
- label: j("devportal.pickupPostalCode", "Pickup Pincode (optional)"),
168
- value: Y.pickupPostalCode,
169
- onChange: (e) => $("pickupPostalCode", e.target.value),
170
- placeholder: "560001",
171
- error: t ? void 0 : n,
172
- hint: t ? n : j("devportal.pickupPostalCodeHint", "The postal code your physical orders actually ship from — used to quote real carrier shipping rates. You can skip this now and set it later from organization settings.")
173
- });
174
- })(),
175
- /* @__PURE__ */ E("div", {
161
+ j && /* @__PURE__ */ w("p", {
162
+ className: "rounded-md border border-border-seam bg-bg-sunken p-4 text-sm text-text-secondary",
163
+ children: M("devportal.pickupAddressDeferredHint", "You can add and register your real pickup address — and add more than one — right after creating your organization, from its Settings tab.")
164
+ }),
165
+ /* @__PURE__ */ T("div", {
176
166
  className: "grid gap-4 sm:grid-cols-2",
177
- children: [/* @__PURE__ */ T(d, {
178
- label: j("devportal.contactEmail", "Contact Email"),
167
+ children: [/* @__PURE__ */ w(p, {
168
+ label: M("devportal.contactEmail", "Contact Email"),
179
169
  type: "email",
180
- value: Y.contactEmail,
170
+ value: X.contactEmail,
181
171
  onChange: (e) => $("contactEmail", e.target.value),
182
172
  placeholder: "contact@example.com",
183
- error: M.contactEmail
184
- }), /* @__PURE__ */ T(d, {
185
- label: j("devportal.supportEmail", "Support Email"),
173
+ error: N.contactEmail
174
+ }), /* @__PURE__ */ w(p, {
175
+ label: M("devportal.supportEmail", "Support Email"),
186
176
  type: "email",
187
- value: Y.supportEmail,
177
+ value: X.supportEmail,
188
178
  onChange: (e) => $("supportEmail", e.target.value),
189
179
  placeholder: "support@example.com",
190
- error: M.supportEmail
180
+ error: N.supportEmail
191
181
  })]
192
182
  })
193
183
  ]
194
184
  })
195
185
  }),
196
- /* @__PURE__ */ T(u, {
197
- title: j("devportal.billingAccount", "Billing Account"),
198
- description: j("devportal.billingAccountSectionDescription", "Revenue from sales will be credited here. You can change this anytime from the Revenue page."),
199
- children: /* @__PURE__ */ E("div", {
186
+ /* @__PURE__ */ w(f, {
187
+ title: M("devportal.billingAccount", "Billing Account"),
188
+ description: M("devportal.billingAccountSectionDescription", "Revenue from sales will be credited here. You can change this anytime from the Revenue page."),
189
+ children: /* @__PURE__ */ T("div", {
200
190
  className: "space-y-3",
201
191
  children: [
202
- /* @__PURE__ */ E("button", {
192
+ /* @__PURE__ */ T("button", {
203
193
  type: "button",
204
- onClick: () => U("auto"),
205
- disabled: V,
206
- className: n("flex w-full items-start gap-3 rounded-lg border px-4 py-3 text-left transition-colors disabled:cursor-not-allowed disabled:opacity-50", H === "auto" ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:bg-bg-sunken"),
207
- children: [/* @__PURE__ */ T(b, {
194
+ onClick: () => W("auto"),
195
+ disabled: H,
196
+ className: n("flex w-full items-start gap-3 rounded-lg border px-4 py-3 text-left transition-colors disabled:cursor-not-allowed disabled:opacity-50", U === "auto" ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:bg-bg-sunken"),
197
+ children: [/* @__PURE__ */ w(b, {
208
198
  size: 16,
209
- className: n("mt-0.5 flex-shrink-0", H === "auto" ? "opacity-100 text-primary" : "opacity-0")
210
- }), /* @__PURE__ */ E("div", {
199
+ className: n("mt-0.5 flex-shrink-0", U === "auto" ? "opacity-100 text-primary" : "opacity-0")
200
+ }), /* @__PURE__ */ T("div", {
211
201
  className: "flex-1 min-w-0",
212
- children: [/* @__PURE__ */ T("p", {
202
+ children: [/* @__PURE__ */ w("p", {
213
203
  className: "text-sm font-medium",
214
- children: j("devportal.billingAutoCreate", "Create a new billing account automatically")
215
- }), /* @__PURE__ */ T("p", {
204
+ children: M("devportal.billingAutoCreate", "Create a new billing account automatically")
205
+ }), /* @__PURE__ */ w("p", {
216
206
  className: "mt-0.5 text-xs text-text-secondary",
217
- children: j("devportal.billingAutoCreateHint", "We'll set one up using your organization name and account email. You can complete legal and tax details for payouts later in Organization Settings.")
207
+ children: M("devportal.billingAutoCreateHint", "We'll set one up using your organization name and account email. You can complete legal and tax details for payouts later in Organization Settings.")
218
208
  })]
219
209
  })]
220
210
  }),
221
- /* @__PURE__ */ E("button", {
211
+ /* @__PURE__ */ T("button", {
222
212
  type: "button",
223
- onClick: () => U("existing"),
224
- disabled: V || !q && J.length === 0,
225
- className: n("flex w-full items-start gap-3 rounded-lg border px-4 py-3 text-left transition-colors disabled:cursor-not-allowed disabled:opacity-50", H === "existing" ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:bg-bg-sunken"),
226
- children: [/* @__PURE__ */ T(b, {
213
+ onClick: () => W("existing"),
214
+ disabled: H || !J && Y.length === 0,
215
+ className: n("flex w-full items-start gap-3 rounded-lg border px-4 py-3 text-left transition-colors disabled:cursor-not-allowed disabled:opacity-50", U === "existing" ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:bg-bg-sunken"),
216
+ children: [/* @__PURE__ */ w(b, {
227
217
  size: 16,
228
- className: n("mt-0.5 flex-shrink-0", H === "existing" ? "opacity-100 text-primary" : "opacity-0")
229
- }), /* @__PURE__ */ E("div", {
218
+ className: n("mt-0.5 flex-shrink-0", U === "existing" ? "opacity-100 text-primary" : "opacity-0")
219
+ }), /* @__PURE__ */ T("div", {
230
220
  className: "flex-1 min-w-0",
231
- children: [/* @__PURE__ */ E("p", {
221
+ children: [/* @__PURE__ */ T("p", {
232
222
  className: "flex items-center gap-1.5 text-sm font-medium",
233
- children: [/* @__PURE__ */ T(x, { size: 14 }), j("devportal.billingLinkExisting", "Link an existing billing account")]
234
- }), /* @__PURE__ */ T("p", {
223
+ children: [/* @__PURE__ */ w(x, { size: 14 }), M("devportal.billingLinkExisting", "Link an existing billing account")]
224
+ }), /* @__PURE__ */ w("p", {
235
225
  className: "mt-0.5 text-xs text-text-secondary",
236
- children: q ? j("devportal.billingAccountsLoading", "Loading your billing accounts...") : J.length === 0 ? j("devportal.noBillingAccountsYet", "You don't have any billing accounts yet — create one from account billing settings first.") : j("devportal.billingAccountsAvailable", "{{count}} billing account(s) available to link", { count: J.length })
226
+ children: J ? M("devportal.billingAccountsLoading", "Loading your billing accounts...") : Y.length === 0 ? M("devportal.noBillingAccountsYet", "You don't have any billing accounts yet — create one from account billing settings first.") : M("devportal.billingAccountsAvailable", "{{count}} billing account(s) available to link", { count: Y.length })
237
227
  })]
238
228
  })]
239
229
  }),
240
- H === "existing" && J.length > 0 && /* @__PURE__ */ T("div", {
230
+ U === "existing" && Y.length > 0 && /* @__PURE__ */ w("div", {
241
231
  className: "ml-8 space-y-2",
242
- children: J.map((e) => /* @__PURE__ */ E("button", {
232
+ children: Y.map((e) => /* @__PURE__ */ T("button", {
243
233
  type: "button",
244
- disabled: V,
245
- onClick: () => G(e.id ?? null),
246
- className: n("flex w-full items-center gap-3 rounded-md border px-3 py-2 text-left text-sm transition-colors disabled:cursor-not-allowed disabled:opacity-50", W === e.id ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:bg-bg-sunken"),
247
- children: [/* @__PURE__ */ T(b, {
234
+ disabled: H,
235
+ onClick: () => K(e.id ?? null),
236
+ className: n("flex w-full items-center gap-3 rounded-md border px-3 py-2 text-left text-sm transition-colors disabled:cursor-not-allowed disabled:opacity-50", G === e.id ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:bg-bg-sunken"),
237
+ children: [/* @__PURE__ */ w(b, {
248
238
  size: 14,
249
- className: n("flex-shrink-0", W === e.id ? "opacity-100 text-primary" : "opacity-0")
250
- }), /* @__PURE__ */ E("div", {
239
+ className: n("flex-shrink-0", G === e.id ? "opacity-100 text-primary" : "opacity-0")
240
+ }), /* @__PURE__ */ T("div", {
251
241
  className: "min-w-0 flex-1",
252
- children: [/* @__PURE__ */ T("p", {
242
+ children: [/* @__PURE__ */ w("p", {
253
243
  className: "truncate font-medium",
254
244
  children: e.name
255
- }), e.isDefault && /* @__PURE__ */ T("p", {
245
+ }), e.isDefault && /* @__PURE__ */ w("p", {
256
246
  className: "text-xs text-text-secondary",
257
- children: j("devportal.revenue.defaultAccount", "Default")
247
+ children: M("devportal.revenue.defaultAccount", "Default")
258
248
  })]
259
249
  })]
260
250
  }, e.id))
@@ -262,39 +252,39 @@ var D = () => {
262
252
  ]
263
253
  })
264
254
  }),
265
- V && /* @__PURE__ */ E("div", {
255
+ H && /* @__PURE__ */ T("div", {
266
256
  className: "flex items-center gap-2 rounded-lg border border-border-subtle bg-bg-sunken px-4 py-3 text-sm text-text-secondary",
267
257
  children: [
268
- /* @__PURE__ */ T(S, {
258
+ /* @__PURE__ */ w(S, {
269
259
  size: 16,
270
260
  className: "flex-shrink-0 animate-spin text-primary"
271
261
  }),
272
- z === "creating-org" && j("devportal.creatingOrgStatus", "Creating your organization..."),
273
- z === "setting-up-billing" && j("devportal.settingUpBillingStatus", "Setting up your billing account..."),
274
- z === "linking-billing" && j("devportal.linkingBillingStatus", "Linking your billing account..."),
275
- z === "redirecting" && j("devportal.redirectingStatus", "All set — redirecting...")
262
+ B === "creating-org" && M("devportal.creatingOrgStatus", "Creating your organization..."),
263
+ B === "setting-up-billing" && M("devportal.settingUpBillingStatus", "Setting up your billing account..."),
264
+ B === "linking-billing" && M("devportal.linkingBillingStatus", "Linking your billing account..."),
265
+ B === "redirecting" && M("devportal.redirectingStatus", "All set — redirecting...")
276
266
  ]
277
267
  }),
278
- /* @__PURE__ */ E("div", {
268
+ /* @__PURE__ */ T("div", {
279
269
  className: "flex items-center justify-end gap-3 border-t pt-6",
280
- children: [/* @__PURE__ */ E("button", {
270
+ children: [/* @__PURE__ */ T("button", {
281
271
  type: "button",
282
272
  onClick: () => {
283
- Q(i(A));
273
+ Q(i(j));
284
274
  },
285
- disabled: V,
275
+ disabled: H,
286
276
  className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-bg-sunken transition-colors disabled:opacity-50",
287
- children: [/* @__PURE__ */ T(C, { size: 16 }), j("devportal.cancel", "Cancel")]
288
- }), /* @__PURE__ */ T("button", {
277
+ children: [/* @__PURE__ */ w(ee, { size: 16 }), M("devportal.cancel", "Cancel")]
278
+ }), /* @__PURE__ */ w("button", {
289
279
  type: "submit",
290
- disabled: V,
280
+ disabled: H,
291
281
  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 disabled:opacity-50",
292
- children: V ? /* @__PURE__ */ E(w, { children: [
293
- /* @__PURE__ */ T("span", { className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }),
294
- z === "setting-up-billing" && j("devportal.settingUpBilling", "Setting up billing..."),
295
- z === "linking-billing" && j("devportal.linkingBilling", "Linking billing..."),
296
- (z === "creating-org" || z === "redirecting") && j("devportal.creating", "Creating...")
297
- ] }) : /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(y, { size: 16 }), j("devportal.createOrganization", "Create Organization")] })
282
+ children: H ? /* @__PURE__ */ T(C, { children: [
283
+ /* @__PURE__ */ w("span", { className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }),
284
+ B === "setting-up-billing" && M("devportal.settingUpBilling", "Setting up billing..."),
285
+ B === "linking-billing" && M("devportal.linkingBilling", "Linking billing..."),
286
+ (B === "creating-org" || B === "redirecting") && M("devportal.creating", "Creating...")
287
+ ] }) : /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(y, { size: 16 }), M("devportal.createOrganization", "Create Organization")] })
298
288
  })]
299
289
  })
300
290
  ]
@@ -303,6 +293,6 @@ var D = () => {
303
293
  });
304
294
  };
305
295
  //#endregion
306
- export { D as CreateOrganizationPage };
296
+ export { E as CreateOrganizationPage };
307
297
 
308
298
  //# sourceMappingURL=CreateOrganizationPage.js.map