@burdenoff/microfe-devportal 2026.915.5 → 2026.915.7

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.
@@ -6,34 +6,35 @@ import { orgSectionPath as i, useIsSellerSection as ee } from "../hooks/useIsSel
6
6
  import { useCreateBillingAccountMutation as te, useCreateOrganizationMutation as a, useCreateSellerOrganizationMutation as o, useGetBillingAccountsByOrgQuery as s, useLinkDevOrgBillingAccountMutation as c } from "../../generated/global-operations.js";
7
7
  import { PageLayout as l, PageSection as u } from "../components/PageLayout.js";
8
8
  import { InputField as d, TextareaField as f } from "../components/FormField.js";
9
- import { PermissionGuard as p } from "../components/PermissionGuard.js";
9
+ import { RegisterPickupLocationModal as p } from "../components/RegisterPickupLocationModal.js";
10
+ import { PermissionGuard as m } from "../components/PermissionGuard.js";
10
11
  import "../components/index.js";
11
- import { capitalizeCarrierName as m, useCarrierPickupLocations as h } from "../hooks/useCarrierPickupLocations.js";
12
+ import { capitalizeCarrierName as h, useCarrierPickupLocations as g } from "../hooks/useCarrierPickupLocations.js";
12
13
  import "../hooks/index.js";
13
- 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";
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";
16
17
  //#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({
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({
19
20
  fetchPolicy: "cache-and-network",
20
- context: { headers: { "x-org-id": re ?? "" } }
21
- }), J = _(() => K?.getBillingAccountsByOrg ?? [], [K]);
22
- g(() => {
23
- if (!(H !== "existing" || q)) {
24
- if (J.length === 0) {
25
- U("auto");
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");
26
27
  return;
27
28
  }
28
- W || G(J.find((e) => e.isDefault)?.id ?? J[0]?.id ?? null);
29
+ V || H(G.find((e) => e.isDefault)?.id ?? G[0]?.id ?? null);
29
30
  }
30
31
  }, [
31
- H,
32
- q,
33
- J,
34
- W
32
+ z,
33
+ W,
34
+ G,
35
+ V
35
36
  ]);
36
- let [Y, X] = v({
37
+ let [K, q] = _({
37
38
  name: "",
38
39
  slug: "",
39
40
  description: "",
@@ -41,220 +42,295 @@ var D = () => {
41
42
  contactEmail: "",
42
43
  supportEmail: "",
43
44
  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) => {
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) => {
47
48
  let t = e.target.value;
48
- X((e) => ({
49
+ q((e) => ({
49
50
  ...e,
50
51
  name: t,
51
- slug: e.slug || ae(t)
52
- })), M.name && N((e) => ({
52
+ slug: e.slug || ue(t)
53
+ })), k.name && A((e) => ({
53
54
  ...e,
54
55
  name: void 0
55
56
  }));
56
57
  }, $ = (e, t) => {
57
- X((n) => ({
58
+ q((n) => ({
58
59
  ...n,
59
60
  [e]: t
60
- })), M[e] && N((t) => ({
61
+ })), k[e] && A((t) => ({
61
62
  ...t,
62
63
  [e]: void 0
63
64
  }));
64
- }, se = () => {
65
+ }, fe = () => {
65
66
  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;
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;
67
68
  };
68
- return /* @__PURE__ */ T(p, {
69
+ return /* @__PURE__ */ C(m, {
69
70
  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", {
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", {
77
78
  onSubmit: async (e) => {
78
- if (e.preventDefault(), se()) {
79
- B("creating-org");
79
+ if (e.preventDefault(), fe()) {
80
+ L("creating-org");
80
81
  try {
81
82
  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;
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;
90
91
  if (!t) {
91
- B("idle");
92
+ L("idle");
92
93
  return;
93
94
  }
94
- if (R.emit("devportal.org.created", {
95
+ if (F.emit("devportal.org.created", {
95
96
  organizationId: t,
96
- name: Y.name
97
- }), A ? k(t) : ie(t), H === "existing" && W) {
98
- B("linking-billing");
97
+ name: K.name
98
+ }), D ? le(t) : ce(t), z === "existing" && V) {
99
+ L("linking-billing");
99
100
  try {
100
- await L({ variables: {
101
+ await P({ variables: {
101
102
  organizationId: t,
102
- billingAccountId: W
103
+ billingAccountId: V
103
104
  } });
104
105
  } catch {}
105
106
  } else {
106
- B("setting-up-billing");
107
+ L("setting-up-billing");
107
108
  try {
108
- let e = (await I({ variables: { input: {
109
- name: Y.name,
110
- email: ne?.email ?? ""
109
+ let e = (await N({ variables: { input: {
110
+ name: K.name,
111
+ email: oe?.email ?? ""
111
112
  } } })).data?.createBillingAccount?.id;
112
- e && await L({ variables: {
113
+ e && await P({ variables: {
113
114
  organizationId: t,
114
115
  billingAccountId: e
115
116
  } });
116
117
  } catch {}
117
118
  }
118
- B("redirecting"), Q(i(A, t));
119
+ L("redirecting"), Q(i(D, t));
119
120
  } catch (e) {
120
- console.error("Failed to create organization:", e), B("idle");
121
+ console.error("Failed to create organization:", e), L("idle");
121
122
  }
122
123
  }
123
124
  },
124
125
  className: "space-y-8 max-w-3xl",
125
126
  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", {
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", {
130
131
  className: "space-y-4",
131
132
  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"),
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"),
137
138
  required: !0,
138
- error: M.name,
139
- hint: j("devportal.organizationNameHint", "Your organization's display name")
139
+ error: k.name,
140
+ hint: O("devportal.organizationNameHint", "Your organization's display name")
140
141
  }),
141
- /* @__PURE__ */ T(d, {
142
- label: j("devportal.slug", "Slug"),
143
- value: Y.slug,
142
+ /* @__PURE__ */ C(d, {
143
+ label: O("devportal.slug", "Slug"),
144
+ value: K.slug,
144
145
  onChange: (e) => $("slug", e.target.value.toLowerCase()),
145
- placeholder: j("devportal.orgSlugPlaceholder", "acme-dev"),
146
+ placeholder: O("devportal.orgSlugPlaceholder", "acme-dev"),
146
147
  required: !0,
147
- error: M.slug,
148
- hint: j("devportal.slugHint", "URL-friendly identifier (auto-generated from name)")
148
+ error: k.slug,
149
+ hint: O("devportal.slugHint", "URL-friendly identifier (auto-generated from name)")
149
150
  }),
150
- /* @__PURE__ */ T(f, {
151
- label: j("devportal.description", "Description"),
152
- value: Y.description,
151
+ /* @__PURE__ */ C(f, {
152
+ label: O("devportal.description", "Description"),
153
+ value: K.description,
153
154
  onChange: (e) => $("description", e.target.value),
154
- placeholder: j("devportal.orgDescriptionPlaceholder", "Tell us about your organization..."),
155
+ placeholder: O("devportal.orgDescriptionPlaceholder", "Tell us about your organization..."),
155
156
  rows: 3
156
157
  }),
157
- /* @__PURE__ */ T(d, {
158
- label: j("devportal.websiteUrl", "Website URL"),
158
+ /* @__PURE__ */ C(d, {
159
+ label: O("devportal.websiteUrl", "Website URL"),
159
160
  type: "url",
160
- value: Y.websiteUrl,
161
+ value: K.websiteUrl,
161
162
  onChange: (e) => $("websiteUrl", e.target.value),
162
163
  placeholder: "https://example.com"
163
164
  }),
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.")
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
+ ]
173
249
  });
174
250
  })(),
175
- /* @__PURE__ */ E("div", {
251
+ /* @__PURE__ */ w("div", {
176
252
  className: "grid gap-4 sm:grid-cols-2",
177
- children: [/* @__PURE__ */ T(d, {
178
- label: j("devportal.contactEmail", "Contact Email"),
253
+ children: [/* @__PURE__ */ C(d, {
254
+ label: O("devportal.contactEmail", "Contact Email"),
179
255
  type: "email",
180
- value: Y.contactEmail,
256
+ value: K.contactEmail,
181
257
  onChange: (e) => $("contactEmail", e.target.value),
182
258
  placeholder: "contact@example.com",
183
- error: M.contactEmail
184
- }), /* @__PURE__ */ T(d, {
185
- label: j("devportal.supportEmail", "Support Email"),
259
+ error: k.contactEmail
260
+ }), /* @__PURE__ */ C(d, {
261
+ label: O("devportal.supportEmail", "Support Email"),
186
262
  type: "email",
187
- value: Y.supportEmail,
263
+ value: K.supportEmail,
188
264
  onChange: (e) => $("supportEmail", e.target.value),
189
265
  placeholder: "support@example.com",
190
- error: M.supportEmail
266
+ error: k.supportEmail
191
267
  })]
192
268
  })
193
269
  ]
194
270
  })
195
271
  }),
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", {
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", {
200
276
  className: "space-y-3",
201
277
  children: [
202
- /* @__PURE__ */ E("button", {
278
+ /* @__PURE__ */ w("button", {
203
279
  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, {
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, {
208
284
  size: 16,
209
- className: n("mt-0.5 flex-shrink-0", H === "auto" ? "opacity-100 text-primary" : "opacity-0")
210
- }), /* @__PURE__ */ E("div", {
285
+ className: n("mt-0.5 flex-shrink-0", z === "auto" ? "opacity-100 text-primary" : "opacity-0")
286
+ }), /* @__PURE__ */ w("div", {
211
287
  className: "flex-1 min-w-0",
212
- children: [/* @__PURE__ */ T("p", {
288
+ children: [/* @__PURE__ */ C("p", {
213
289
  className: "text-sm font-medium",
214
- children: j("devportal.billingAutoCreate", "Create a new billing account automatically")
215
- }), /* @__PURE__ */ T("p", {
290
+ children: O("devportal.billingAutoCreate", "Create a new billing account automatically")
291
+ }), /* @__PURE__ */ C("p", {
216
292
  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.")
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.")
218
294
  })]
219
295
  })]
220
296
  }),
221
- /* @__PURE__ */ E("button", {
297
+ /* @__PURE__ */ w("button", {
222
298
  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, {
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, {
227
303
  size: 16,
228
- className: n("mt-0.5 flex-shrink-0", H === "existing" ? "opacity-100 text-primary" : "opacity-0")
229
- }), /* @__PURE__ */ E("div", {
304
+ className: n("mt-0.5 flex-shrink-0", z === "existing" ? "opacity-100 text-primary" : "opacity-0")
305
+ }), /* @__PURE__ */ w("div", {
230
306
  className: "flex-1 min-w-0",
231
- children: [/* @__PURE__ */ E("p", {
307
+ children: [/* @__PURE__ */ w("p", {
232
308
  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", {
309
+ children: [/* @__PURE__ */ C(ae, { size: 14 }), O("devportal.billingLinkExisting", "Link an existing billing account")]
310
+ }), /* @__PURE__ */ C("p", {
235
311
  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 })
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 })
237
313
  })]
238
314
  })]
239
315
  }),
240
- H === "existing" && J.length > 0 && /* @__PURE__ */ T("div", {
316
+ z === "existing" && G.length > 0 && /* @__PURE__ */ C("div", {
241
317
  className: "ml-8 space-y-2",
242
- children: J.map((e) => /* @__PURE__ */ E("button", {
318
+ children: G.map((e) => /* @__PURE__ */ w("button", {
243
319
  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, {
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, {
248
324
  size: 14,
249
- className: n("flex-shrink-0", W === e.id ? "opacity-100 text-primary" : "opacity-0")
250
- }), /* @__PURE__ */ E("div", {
325
+ className: n("flex-shrink-0", V === e.id ? "opacity-100 text-primary" : "opacity-0")
326
+ }), /* @__PURE__ */ w("div", {
251
327
  className: "min-w-0 flex-1",
252
- children: [/* @__PURE__ */ T("p", {
328
+ children: [/* @__PURE__ */ C("p", {
253
329
  className: "truncate font-medium",
254
330
  children: e.name
255
- }), e.isDefault && /* @__PURE__ */ T("p", {
331
+ }), e.isDefault && /* @__PURE__ */ C("p", {
256
332
  className: "text-xs text-text-secondary",
257
- children: j("devportal.revenue.defaultAccount", "Default")
333
+ children: O("devportal.revenue.defaultAccount", "Default")
258
334
  })]
259
335
  })]
260
336
  }, e.id))
@@ -262,39 +338,39 @@ var D = () => {
262
338
  ]
263
339
  })
264
340
  }),
265
- V && /* @__PURE__ */ E("div", {
341
+ R && /* @__PURE__ */ w("div", {
266
342
  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
343
  children: [
268
- /* @__PURE__ */ T(S, {
344
+ /* @__PURE__ */ C(y, {
269
345
  size: 16,
270
346
  className: "flex-shrink-0 animate-spin text-primary"
271
347
  }),
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...")
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...")
276
352
  ]
277
353
  }),
278
- /* @__PURE__ */ E("div", {
354
+ /* @__PURE__ */ w("div", {
279
355
  className: "flex items-center justify-end gap-3 border-t pt-6",
280
- children: [/* @__PURE__ */ E("button", {
356
+ children: [/* @__PURE__ */ w("button", {
281
357
  type: "button",
282
358
  onClick: () => {
283
- Q(i(A));
359
+ Q(i(D));
284
360
  },
285
- disabled: V,
361
+ disabled: R,
286
362
  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", {
363
+ children: [/* @__PURE__ */ C(x, { size: 16 }), O("devportal.cancel", "Cancel")]
364
+ }), /* @__PURE__ */ C("button", {
289
365
  type: "submit",
290
- disabled: V,
366
+ disabled: R,
291
367
  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")] })
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")] })
298
374
  })]
299
375
  })
300
376
  ]
@@ -303,6 +379,6 @@ var D = () => {
303
379
  });
304
380
  };
305
381
  //#endregion
306
- export { D as CreateOrganizationPage };
382
+ export { T as CreateOrganizationPage };
307
383
 
308
384
  //# sourceMappingURL=CreateOrganizationPage.js.map