@burdenoff/microfe-devportal 2026.915.7 → 2026.915.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,335 +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 { RegisterPickupLocationModal as p } from "../components/RegisterPickupLocationModal.js";
10
- import { PermissionGuard as m } 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";
11
10
  import "../components/index.js";
12
- import { capitalizeCarrierName as h, useCarrierPickupLocations as g } from "../hooks/useCarrierPickupLocations.js";
13
11
  import "../hooks/index.js";
14
- import { useEffect as ne, useMemo as re, useState as _ } from "react";
15
- import { Building2 as ie, Check as v, Link2 as ae, Loader2 as y, Trash2 as b, X as x } from "lucide-react";
16
- import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
12
+ import { useEffect as g, useMemo as _, useState as v } from "react";
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";
17
15
  //#region src/devportal/pages/CreateOrganizationPage.tsx
18
- var T = () => {
19
- let { navigate: T, basePath: E, currentUser: oe, tenantId: se, setActiveOrgId: ce, setActivePhysicalOrgId: le } = e(), D = ee(), O = t(), [k, A] = _({}), [j] = a(), [M] = o(), [N] = te(), [P] = c(), F = r(), [I, L] = _("idle"), R = I !== "idle", [z, B] = _("auto"), [V, H] = _(null), { data: U, loading: W } = 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({
20
18
  fetchPolicy: "cache-and-network",
21
- context: { headers: { "x-org-id": se ?? "" } }
22
- }), G = re(() => U?.getBillingAccountsByOrg ?? [], [U]);
23
- ne(() => {
24
- if (!(z !== "existing" || W)) {
25
- if (G.length === 0) {
26
- B("auto");
19
+ context: { headers: { "x-org-id": k ?? "" } }
20
+ }), Y = _(() => q?.getBillingAccountsByOrg ?? [], [q]);
21
+ g(() => {
22
+ if (!(U !== "existing" || J)) {
23
+ if (Y.length === 0) {
24
+ W("auto");
27
25
  return;
28
26
  }
29
- V || H(G.find((e) => e.isDefault)?.id ?? G[0]?.id ?? null);
27
+ G || K(Y.find((e) => e.isDefault)?.id ?? Y[0]?.id ?? null);
30
28
  }
31
29
  }, [
32
- z,
33
- W,
34
- G,
35
- V
30
+ U,
31
+ J,
32
+ Y,
33
+ G
36
34
  ]);
37
- let [K, q] = _({
35
+ let [X, Z] = v({
38
36
  name: "",
39
37
  slug: "",
40
38
  description: "",
41
39
  websiteUrl: "",
42
40
  contactEmail: "",
43
- supportEmail: "",
44
- pickupPostalCode: ""
45
- }), { locations: J, refetch: Y } = g(), [X, Z] = _(!1), Q = (e) => {
46
- T?.(`${E}${e}`);
47
- }, ue = (e) => e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, ""), de = (e) => {
41
+ supportEmail: ""
42
+ }), Q = (e) => {
43
+ E?.(`${D}${e}`);
44
+ }, ne = (e) => e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, ""), re = (e) => {
48
45
  let t = e.target.value;
49
- q((e) => ({
46
+ Z((e) => ({
50
47
  ...e,
51
48
  name: t,
52
- slug: e.slug || ue(t)
53
- })), k.name && A((e) => ({
49
+ slug: e.slug || ne(t)
50
+ })), N.name && P((e) => ({
54
51
  ...e,
55
52
  name: void 0
56
53
  }));
57
54
  }, $ = (e, t) => {
58
- q((n) => ({
55
+ Z((n) => ({
59
56
  ...n,
60
57
  [e]: t
61
- })), k[e] && A((t) => ({
58
+ })), N[e] && P((t) => ({
62
59
  ...t,
63
60
  [e]: void 0
64
61
  }));
65
- }, fe = () => {
62
+ }, ie = () => {
66
63
  let e = {};
67
- return K.name.trim() ? K.name.length < 2 ? e.name = O("devportal.orgNameTooShort", "Name must be at least 2 characters") : K.name.length > 100 && (e.name = O("devportal.nameTooLong", "Name must be less than 100 characters")) : e.name = O("devportal.orgNameRequired", "Organization name is required"), K.slug.trim() ? /^[a-z0-9-]+$/.test(K.slug) || (e.slug = O("devportal.slugInvalid", "Slug can only contain lowercase letters, numbers, and hyphens")) : e.slug = O("devportal.slugRequired", "Slug is required"), K.contactEmail && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(K.contactEmail) && (e.contactEmail = O("devportal.invalidEmailAddress", "Invalid email address")), K.supportEmail && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(K.supportEmail) && (e.supportEmail = O("devportal.invalidEmailAddress", "Invalid email address")), A(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;
68
65
  };
69
- return /* @__PURE__ */ C(m, {
66
+ return /* @__PURE__ */ w(h, {
70
67
  authOnly: !0,
71
- children: /* @__PURE__ */ C(l, {
72
- title: O("devportal.createOrganization", "Create Organization"),
73
- description: D ? O("devportal.createSellerOrganizationDescription", "Set up a seller organization to start selling physical products") : O("devportal.createOrganizationDescription", "Set up a developer organization to collaborate with your team"),
74
- purpose: D ? O("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.") : O("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."),
75
- backLink: `${E}${i(D)}`,
76
- backLabel: O("devportal.backToOrganizations", "Back to Organizations"),
77
- children: /* @__PURE__ */ w("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", {
78
75
  onSubmit: async (e) => {
79
- if (e.preventDefault(), fe()) {
80
- L("creating-org");
76
+ if (e.preventDefault(), ie()) {
77
+ V("creating-org");
81
78
  try {
82
79
  let e = {
83
- name: K.name,
84
- slug: K.slug || void 0,
85
- description: K.description || void 0,
86
- websiteUrl: K.websiteUrl || void 0,
87
- contactEmail: K.contactEmail || void 0,
88
- supportEmail: K.supportEmail || void 0,
89
- pickupPostalCode: D && K.pickupPostalCode.trim() || void 0
90
- }, t = D ? (await M({ variables: { input: e } })).data?.createSellerOrganization?.id : (await j({ 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;
91
87
  if (!t) {
92
- L("idle");
88
+ V("idle");
93
89
  return;
94
90
  }
95
- if (F.emit("devportal.org.created", {
91
+ if (z.emit("devportal.org.created", {
96
92
  organizationId: t,
97
- name: K.name
98
- }), D ? le(t) : ce(t), z === "existing" && V) {
99
- L("linking-billing");
93
+ name: X.name
94
+ }), j ? te(t) : A(t), U === "existing" && G) {
95
+ V("linking-billing");
100
96
  try {
101
- await P({ variables: {
97
+ await R({ variables: {
102
98
  organizationId: t,
103
- billingAccountId: V
99
+ billingAccountId: G
104
100
  } });
105
101
  } catch {}
106
102
  } else {
107
- L("setting-up-billing");
103
+ V("setting-up-billing");
108
104
  try {
109
- let e = (await N({ variables: { input: {
110
- name: K.name,
111
- email: oe?.email ?? ""
105
+ let e = (await L({ variables: { input: {
106
+ name: X.name,
107
+ email: O?.email ?? ""
112
108
  } } })).data?.createBillingAccount?.id;
113
- e && await P({ variables: {
109
+ e && await R({ variables: {
114
110
  organizationId: t,
115
111
  billingAccountId: e
116
112
  } });
117
113
  } catch {}
118
114
  }
119
- L("redirecting"), Q(i(D, t));
115
+ V("redirecting"), Q(i(j, t));
120
116
  } catch (e) {
121
- console.error("Failed to create organization:", e), L("idle");
117
+ console.error("Failed to create organization:", e), V("idle");
122
118
  }
123
119
  }
124
120
  },
125
121
  className: "space-y-8 max-w-3xl",
126
122
  children: [
127
- /* @__PURE__ */ C(u, {
128
- title: O("devportal.organizationDetails", "Organization Details"),
129
- description: O("devportal.organizationDetailsDescription", "Basic information about your organization"),
130
- children: /* @__PURE__ */ w("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", {
131
127
  className: "space-y-4",
132
128
  children: [
133
- /* @__PURE__ */ C(d, {
134
- label: O("devportal.organizationName", "Organization Name"),
135
- value: K.name,
136
- onChange: de,
137
- placeholder: O("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"),
138
134
  required: !0,
139
- error: k.name,
140
- hint: O("devportal.organizationNameHint", "Your organization's display name")
135
+ error: N.name,
136
+ hint: M("devportal.organizationNameHint", "Your organization's display name")
141
137
  }),
142
- /* @__PURE__ */ C(d, {
143
- label: O("devportal.slug", "Slug"),
144
- value: K.slug,
138
+ /* @__PURE__ */ w(p, {
139
+ label: M("devportal.slug", "Slug"),
140
+ value: X.slug,
145
141
  onChange: (e) => $("slug", e.target.value.toLowerCase()),
146
- placeholder: O("devportal.orgSlugPlaceholder", "acme-dev"),
142
+ placeholder: M("devportal.orgSlugPlaceholder", "acme-dev"),
147
143
  required: !0,
148
- error: k.slug,
149
- hint: O("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)")
150
146
  }),
151
- /* @__PURE__ */ C(f, {
152
- label: O("devportal.description", "Description"),
153
- value: K.description,
147
+ /* @__PURE__ */ w(m, {
148
+ label: M("devportal.description", "Description"),
149
+ value: X.description,
154
150
  onChange: (e) => $("description", e.target.value),
155
- placeholder: O("devportal.orgDescriptionPlaceholder", "Tell us about your organization..."),
151
+ placeholder: M("devportal.orgDescriptionPlaceholder", "Tell us about your organization..."),
156
152
  rows: 3
157
153
  }),
158
- /* @__PURE__ */ C(d, {
159
- label: O("devportal.websiteUrl", "Website URL"),
154
+ /* @__PURE__ */ w(p, {
155
+ label: M("devportal.websiteUrl", "Website URL"),
160
156
  type: "url",
161
- value: K.websiteUrl,
157
+ value: X.websiteUrl,
162
158
  onChange: (e) => $("websiteUrl", e.target.value),
163
159
  placeholder: "https://example.com"
164
160
  }),
165
- D && (() => {
166
- let e = K.pickupPostalCode.trim(), t = J.find((t) => t.postalCode === e), n = J.length > 0;
167
- return /* @__PURE__ */ w("div", {
168
- className: "space-y-3",
169
- children: [
170
- /* @__PURE__ */ C("p", {
171
- className: "text-sm font-medium",
172
- children: O("devportal.pickupPostalCode", "Pickup address (optional)")
173
- }),
174
- e.length === 0 ? /* @__PURE__ */ w("div", {
175
- className: "rounded-md border border-border-seam bg-bg-sunken p-4",
176
- children: [/* @__PURE__ */ C("p", {
177
- className: "text-sm font-medium",
178
- children: O("devportal.noPickupAddress", "No pickup address set up yet")
179
- }), /* @__PURE__ */ C("p", {
180
- className: "mt-1 text-sm text-text-secondary",
181
- children: O("devportal.pickupPostalCodeHint", "The real address your physical orders ship from — used to quote real carrier shipping rates and register with our shipping carrier, free of charge. You can skip this now and set it up later from organization settings.")
182
- })]
183
- }) : t ? /* @__PURE__ */ w("div", {
184
- className: "rounded-md border border-status-success-border bg-status-success-bg-subtle p-4",
185
- children: [/* @__PURE__ */ C("p", {
186
- className: "text-sm font-medium text-status-success-text",
187
- children: O("devportal.pickupAddressRegistered", "Pickup address registered — ready for automated shipping")
188
- }), /* @__PURE__ */ w("p", {
189
- className: "mt-1 text-sm text-text-secondary",
190
- children: [
191
- t.label,
192
- " ·",
193
- " ",
194
- t.postalCode,
195
- " ·",
196
- " ",
197
- h(t.carrier)
198
- ]
199
- })]
200
- }) : n ? /* @__PURE__ */ w("div", {
201
- className: "rounded-md border border-status-error-border bg-status-error-bg-subtle p-4",
202
- children: [/* @__PURE__ */ C("p", {
203
- className: "text-sm font-medium text-status-error-text",
204
- children: O("devportal.pickupAddressNotRegistered", "Pickup address not registered")
205
- }), /* @__PURE__ */ w("p", {
206
- className: "mt-1 text-sm text-text-secondary",
207
- children: [
208
- O("devportal.pickupAddressNotRegisteredHint", "Your saved pincode isn't registered with our shipping carrier yet — physical orders can't auto-ship until it's added."),
209
- " ",
210
- "(",
211
- e,
212
- ")"
213
- ]
214
- })]
215
- }) : /* @__PURE__ */ w("div", {
216
- className: "rounded-md border border-border-seam bg-bg-sunken p-4",
217
- children: [/* @__PURE__ */ C("p", {
218
- className: "text-sm font-medium",
219
- children: e
220
- }), /* @__PURE__ */ C("p", {
221
- className: "mt-1 text-sm text-text-secondary",
222
- children: O("devportal.pickupAddressStatusUnavailable", "Couldn't check registration status right now.")
223
- })]
224
- }),
225
- /* @__PURE__ */ w("div", {
226
- className: "flex items-center gap-4",
227
- children: [/* @__PURE__ */ C("button", {
228
- type: "button",
229
- onClick: () => Z(!0),
230
- className: "text-sm font-medium text-action-primary-text hover:underline",
231
- children: e.length === 0 ? O("devportal.setUpPickupAddressCta", "Set up pickup address") : t ? O("devportal.changePickupAddressCta", "Change pickup address") : O("devportal.registerPickupAddressCta", "Register this address with Shiprocket")
232
- }), e.length > 0 && /* @__PURE__ */ w("button", {
233
- type: "button",
234
- onClick: () => $("pickupPostalCode", ""),
235
- className: "flex items-center gap-1.5 text-sm text-status-error-text hover:underline",
236
- children: [/* @__PURE__ */ C(b, { className: "h-3.5 w-3.5" }), O("devportal.removePickupAddressCta", "Remove pickup address")]
237
- })]
238
- }),
239
- X && /* @__PURE__ */ C(p, {
240
- open: X,
241
- onOpenChange: Z,
242
- initialPostalCode: e,
243
- carrier: "shiprocket",
244
- onRegistered: (e) => {
245
- $("pickupPostalCode", e), Y();
246
- }
247
- })
248
- ]
249
- });
250
- })(),
251
- /* @__PURE__ */ w("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", {
252
166
  className: "grid gap-4 sm:grid-cols-2",
253
- children: [/* @__PURE__ */ C(d, {
254
- label: O("devportal.contactEmail", "Contact Email"),
167
+ children: [/* @__PURE__ */ w(p, {
168
+ label: M("devportal.contactEmail", "Contact Email"),
255
169
  type: "email",
256
- value: K.contactEmail,
170
+ value: X.contactEmail,
257
171
  onChange: (e) => $("contactEmail", e.target.value),
258
172
  placeholder: "contact@example.com",
259
- error: k.contactEmail
260
- }), /* @__PURE__ */ C(d, {
261
- label: O("devportal.supportEmail", "Support Email"),
173
+ error: N.contactEmail
174
+ }), /* @__PURE__ */ w(p, {
175
+ label: M("devportal.supportEmail", "Support Email"),
262
176
  type: "email",
263
- value: K.supportEmail,
177
+ value: X.supportEmail,
264
178
  onChange: (e) => $("supportEmail", e.target.value),
265
179
  placeholder: "support@example.com",
266
- error: k.supportEmail
180
+ error: N.supportEmail
267
181
  })]
268
182
  })
269
183
  ]
270
184
  })
271
185
  }),
272
- /* @__PURE__ */ C(u, {
273
- title: O("devportal.billingAccount", "Billing Account"),
274
- description: O("devportal.billingAccountSectionDescription", "Revenue from sales will be credited here. You can change this anytime from the Revenue page."),
275
- children: /* @__PURE__ */ w("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", {
276
190
  className: "space-y-3",
277
191
  children: [
278
- /* @__PURE__ */ w("button", {
192
+ /* @__PURE__ */ T("button", {
279
193
  type: "button",
280
- onClick: () => B("auto"),
281
- disabled: R,
282
- 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", z === "auto" ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:bg-bg-sunken"),
283
- children: [/* @__PURE__ */ C(v, {
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, {
284
198
  size: 16,
285
- className: n("mt-0.5 flex-shrink-0", z === "auto" ? "opacity-100 text-primary" : "opacity-0")
286
- }), /* @__PURE__ */ w("div", {
199
+ className: n("mt-0.5 flex-shrink-0", U === "auto" ? "opacity-100 text-primary" : "opacity-0")
200
+ }), /* @__PURE__ */ T("div", {
287
201
  className: "flex-1 min-w-0",
288
- children: [/* @__PURE__ */ C("p", {
202
+ children: [/* @__PURE__ */ w("p", {
289
203
  className: "text-sm font-medium",
290
- children: O("devportal.billingAutoCreate", "Create a new billing account automatically")
291
- }), /* @__PURE__ */ C("p", {
204
+ children: M("devportal.billingAutoCreate", "Create a new billing account automatically")
205
+ }), /* @__PURE__ */ w("p", {
292
206
  className: "mt-0.5 text-xs text-text-secondary",
293
- children: O("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.")
294
208
  })]
295
209
  })]
296
210
  }),
297
- /* @__PURE__ */ w("button", {
211
+ /* @__PURE__ */ T("button", {
298
212
  type: "button",
299
- onClick: () => B("existing"),
300
- disabled: R || !W && G.length === 0,
301
- 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", z === "existing" ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:bg-bg-sunken"),
302
- children: [/* @__PURE__ */ C(v, {
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, {
303
217
  size: 16,
304
- className: n("mt-0.5 flex-shrink-0", z === "existing" ? "opacity-100 text-primary" : "opacity-0")
305
- }), /* @__PURE__ */ w("div", {
218
+ className: n("mt-0.5 flex-shrink-0", U === "existing" ? "opacity-100 text-primary" : "opacity-0")
219
+ }), /* @__PURE__ */ T("div", {
306
220
  className: "flex-1 min-w-0",
307
- children: [/* @__PURE__ */ w("p", {
221
+ children: [/* @__PURE__ */ T("p", {
308
222
  className: "flex items-center gap-1.5 text-sm font-medium",
309
- children: [/* @__PURE__ */ C(ae, { size: 14 }), O("devportal.billingLinkExisting", "Link an existing billing account")]
310
- }), /* @__PURE__ */ C("p", {
223
+ children: [/* @__PURE__ */ w(x, { size: 14 }), M("devportal.billingLinkExisting", "Link an existing billing account")]
224
+ }), /* @__PURE__ */ w("p", {
311
225
  className: "mt-0.5 text-xs text-text-secondary",
312
- children: W ? O("devportal.billingAccountsLoading", "Loading your billing accounts...") : G.length === 0 ? O("devportal.noBillingAccountsYet", "You don't have any billing accounts yet — create one from account billing settings first.") : O("devportal.billingAccountsAvailable", "{{count}} billing account(s) available to link", { count: G.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 })
313
227
  })]
314
228
  })]
315
229
  }),
316
- z === "existing" && G.length > 0 && /* @__PURE__ */ C("div", {
230
+ U === "existing" && Y.length > 0 && /* @__PURE__ */ w("div", {
317
231
  className: "ml-8 space-y-2",
318
- children: G.map((e) => /* @__PURE__ */ w("button", {
232
+ children: Y.map((e) => /* @__PURE__ */ T("button", {
319
233
  type: "button",
320
- disabled: R,
321
- onClick: () => H(e.id ?? null),
322
- 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", V === e.id ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:bg-bg-sunken"),
323
- children: [/* @__PURE__ */ C(v, {
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, {
324
238
  size: 14,
325
- className: n("flex-shrink-0", V === e.id ? "opacity-100 text-primary" : "opacity-0")
326
- }), /* @__PURE__ */ w("div", {
239
+ className: n("flex-shrink-0", G === e.id ? "opacity-100 text-primary" : "opacity-0")
240
+ }), /* @__PURE__ */ T("div", {
327
241
  className: "min-w-0 flex-1",
328
- children: [/* @__PURE__ */ C("p", {
242
+ children: [/* @__PURE__ */ w("p", {
329
243
  className: "truncate font-medium",
330
244
  children: e.name
331
- }), e.isDefault && /* @__PURE__ */ C("p", {
245
+ }), e.isDefault && /* @__PURE__ */ w("p", {
332
246
  className: "text-xs text-text-secondary",
333
- children: O("devportal.revenue.defaultAccount", "Default")
247
+ children: M("devportal.revenue.defaultAccount", "Default")
334
248
  })]
335
249
  })]
336
250
  }, e.id))
@@ -338,39 +252,39 @@ var T = () => {
338
252
  ]
339
253
  })
340
254
  }),
341
- R && /* @__PURE__ */ w("div", {
255
+ H && /* @__PURE__ */ T("div", {
342
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",
343
257
  children: [
344
- /* @__PURE__ */ C(y, {
258
+ /* @__PURE__ */ w(S, {
345
259
  size: 16,
346
260
  className: "flex-shrink-0 animate-spin text-primary"
347
261
  }),
348
- I === "creating-org" && O("devportal.creatingOrgStatus", "Creating your organization..."),
349
- I === "setting-up-billing" && O("devportal.settingUpBillingStatus", "Setting up your billing account..."),
350
- I === "linking-billing" && O("devportal.linkingBillingStatus", "Linking your billing account..."),
351
- I === "redirecting" && O("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...")
352
266
  ]
353
267
  }),
354
- /* @__PURE__ */ w("div", {
268
+ /* @__PURE__ */ T("div", {
355
269
  className: "flex items-center justify-end gap-3 border-t pt-6",
356
- children: [/* @__PURE__ */ w("button", {
270
+ children: [/* @__PURE__ */ T("button", {
357
271
  type: "button",
358
272
  onClick: () => {
359
- Q(i(D));
273
+ Q(i(j));
360
274
  },
361
- disabled: R,
275
+ disabled: H,
362
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",
363
- children: [/* @__PURE__ */ C(x, { size: 16 }), O("devportal.cancel", "Cancel")]
364
- }), /* @__PURE__ */ C("button", {
277
+ children: [/* @__PURE__ */ w(ee, { size: 16 }), M("devportal.cancel", "Cancel")]
278
+ }), /* @__PURE__ */ w("button", {
365
279
  type: "submit",
366
- disabled: R,
280
+ disabled: H,
367
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",
368
- children: R ? /* @__PURE__ */ w(S, { children: [
369
- /* @__PURE__ */ C("span", { className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }),
370
- I === "setting-up-billing" && O("devportal.settingUpBilling", "Setting up billing..."),
371
- I === "linking-billing" && O("devportal.linkingBilling", "Linking billing..."),
372
- (I === "creating-org" || I === "redirecting") && O("devportal.creating", "Creating...")
373
- ] }) : /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(ie, { size: 16 }), O("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")] })
374
288
  })]
375
289
  })
376
290
  ]
@@ -379,6 +293,6 @@ var T = () => {
379
293
  });
380
294
  };
381
295
  //#endregion
382
- export { T as CreateOrganizationPage };
296
+ export { E as CreateOrganizationPage };
383
297
 
384
298
  //# sourceMappingURL=CreateOrganizationPage.js.map