1import{r as i,aQ as d,X as u,j as a,B as h,T as p,Z as x,I as b,e as c,h as v,k as w,N as l,O as s,aR as f,ab as j}from"./main-BusHYPqr.js";import{l as N}from"./signUp.css-DdP3uwIt.js";import{f as O,t as S}from"./questionnaireTrackingUtils-BwrETSkt.js";import{S as m}from"./index-BcX5mPri.js";var k="_1s2r38a0",L="_1s2r38a1";const y="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%3e%3cpath%20d='M5.52977%209.56246L9.80188%2013.8346L8.99998%2014.625L3.375%208.99998L8.99998%203.375L9.80188%204.16537L5.52977%208.4375H14.625V9.56246H5.52977Z'%20fill='black'/%3e%3c/svg%3e",z=async({request:t})=>{const e=(await t.formData()).get("org-name")?.toString(),{pathname:n}=new URL(t.url);return e?(l(s.OnboardingStep,m.Onboarding),l(s.OnboardingOrgName,e),f(s.OnboardingSkipOrgCreation),await S(null,n,{},{sub_category:"Sign Up",org_name:e}),j(m.Onboarding,void 0,new URLSearchParams({orgName:e.toString()}))):w("Organization name is required")};function C(){const[t,o]=i.useState(null),[e]=i.useState(()=>window.matchMedia("(min-width: 1048px)").matches),n=d(),r=u();return a.jsxs(h,{title:"Create a new organization",children:[a.jsx(p,{className:N,children:"Name your organization"}),a.jsxs(x,{method:"POST",children:[a.jsx("div",{className:k,children:a.jsx(b,{label:"Org name",name:"org-name",onChange:g=>o(g.target.value.trim()),auto:!0,error:r?.success===!1,help:r?.error})}),a.jsx("div",{className:O,children:a.jsxs("div",{className:L,children:[a.jsx(c,{color:"secondary",variant:e?"link":"outline",onClick:()=>n(-1),leftIcon:a.jsx("img",{src:y,alt:"go back"}),children:"Go back"}),a.jsx(c,{type:"submit",disabled:!t?.length,children:"Continue"}),r?.success===!1&&r?.error&&a.jsx(v,{variant:"error",children:r.error})]})})]})]})}C.displayName="NewOrgPage";export{C as Component,z as action};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.