1import{r as h,u as R,a as C,j as e,B as o,P as E}from"./index-C2Ck_hQk.js";import{a as N}from"./apiClient-C4N6sn9J.js";import{F as i}from"./index-BSt-2wWn.js";import{C as p}from"./index-BcIMf13e.js";import{R as P}from"./index-BNmeW-G1.js";import{S as x}from"./index-BHYvtf69.js";import{R as k}from"./ThunderboltOutlined-r0ETfzEo.js";import{T as B}from"./index-BGGN1bJc.js";import{R as c,C as r}from"./row-BWiv9UYE.js";import{I as n}from"./index-Dc88BRgm.js";import{S as u}from"./index-DqPirz55.js";import{C as g}from"./index-DS7k8J1v.js";import{R as q}from"./ArrowLeftOutlined-Dyz1kvmG.js";import{s as v}from"./index-Domgm94v.js";import"./Input-Do526fC5.js";import"./useBreakpoint-DlSAgkQ2.js";import"./EllipsisOutlined-DIV8NI9X.js";import"./SearchOutlined-a6Puw7u8.js";import"./PurePanel-DPow7OQr.js";import"./index-CpjAYDrg.js";import"./DownOutlined-CKzy86DD.js";import"./useBubbleLock-_ftajmed.js";const{Title:d,Paragraph:f,Text:l}=B,{TextArea:w}=n,{Option:W}=u,A=["Enterprise","Government","LawFirm","Bank","Healthcare","Technology","Other"];function oe(){const[y]=i.useForm(),[j,m]=h.useState(!1),[b,z]=h.useState(!1),a=R(),{t}=C(["register","common"]),T=async s=>{m(!0);try{await N.post("/onboarding/register",{organizationName:s.organizationName,organizationType:s.organizationType,contactName:s.contactName,contactEmail:s.contactEmail,contactPhone:s.contactPhone||null,industry:s.industry||null,country:s.country||null,desiredProducts:s.desiredProducts,notes:s.notes||null}),z(!0)}catch(S){const I=S?.response?.data?.message||t("notify.genericError");v.error({message:t("notify.failedTitle"),description:I,placement:"topRight"})}finally{m(!1)}};return b?e.jsx("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#f0f2f5",padding:24},children:e.jsx(p,{style:{maxWidth:560,width:"100%",borderRadius:12,textAlign:"center"},children:e.jsx(P,{status:"success",title:t("success.title"),subTitle:t("success.subtitle"),extra:[e.jsx(o,{type:"primary",onClick:()=>a("/"),children:t("success.returnHome")},"home"),e.jsx(o,{onClick:()=>a("/login"),children:t("success.signIn")},"login")]})})}):e.jsx("div",{style:{minHeight:"100vh",background:"#f0f2f5",padding:"48px 24px"},children:e.jsxs("div",{style:{maxWidth:760,margin:"0 auto"},children:[e.jsxs("div",{style:{textAlign:"center",marginBottom:40},children:[e.jsx(x,{align:"center",style:{marginBottom:16},children:e.jsx(k,{style:{fontSize:36,color:"#1677ff"}})}),e.jsx(d,{level:2,style:{marginBottom:8},children:t("header.title")}),e.jsx(f,{style:{color:"#595959",fontSize:15},children:t("header.subtitle")})]}),e.jsx(p,{style:{borderRadius:12,boxShadow:"0 2px 16px rgba(0,0,0,0.08)"},styles:{body:{padding:"40px 48px"}},children:e.jsxs(i,{form:y,layout:"vertical",onFinish:T,requiredMark:"optional",children:[e.jsx(d,{level:5,style:{marginBottom:20,color:"#1677ff"},children:t("sections.organization")}),e.jsxs(c,{gutter:16,children:[e.jsx(r,{xs:24,sm:14,children:e.jsx(i.Item,{name:"organizationName",label:t("fields.organizationName.label"),rules:[{required:!0,message:t("fields.organizationName.required")}],children:e.jsx(n,{placeholder:t("fields.organizationName.placeholder"),size:"large"})})}),e.jsx(r,{xs:24,sm:10,children:e.jsx(i.Item,{name:"organizationType",label:t("fields.organizationType.label"),rules:[{required:!0,message:t("fields.organizationType.required")}],children:e.jsx(u,{placeholder:t("fields.organizationType.placeholder"),size:"large",children:A.map(s=>e.jsx(W,{value:s,children:t(`orgTypes.${s}`)},s))})})})]}),e.jsxs(c,{gutter:16,children:[e.jsx(r,{xs:24,sm:12,children:e.jsx(i.Item,{name:"industry",label:e.jsxs("span",{children:[t("fields.industry.label")," ",e.jsx(l,{type:"secondary",style:{fontWeight:400},children:t("optionalSuffix")})]}),children:e.jsx(n,{placeholder:t("fields.industry.placeholder"),size:"large"})})}),e.jsx(r,{xs:24,sm:12,children:e.jsx(i.Item,{name:"country",label:e.jsxs("span",{children:[t("fields.country.label")," ",e.jsx(l,{type:"secondary",style:{fontWeight:400},children:t("optionalSuffix")})]}),children:e.jsx(n,{placeholder:t("fields.country.placeholder"),size:"large"})})})]}),e.jsx(d,{level:5,style:{marginTop:8,marginBottom:20,color:"#1677ff"},children:t("sections.contact")}),e.jsxs(c,{gutter:16,children:[e.jsx(r,{xs:24,sm:12,children:e.jsx(i.Item,{name:"contactName",label:t("fields.contactName.label"),rules:[{required:!0,message:t("fields.contactName.required")}],children:e.jsx(n,{placeholder:t("fields.contactName.placeholder"),size:"large"})})}),e.jsx(r,{xs:24,sm:12,children:e.jsx(i.Item,{name:"contactEmail",label:t("fields.contactEmail.label"),rules:[{required:!0,message:t("fields.contactEmail.required")},{type:"email",message:t("fields.contactEmail.invalid")}],children:e.jsx(n,{placeholder:t("fields.contactEmail.placeholder"),size:"large"})})})]}),e.jsx(i.Item,{name:"contactPhone",label:e.jsxs("span",{children:[t("fields.contactPhone.label")," ",e.jsx(l,{type:"secondary",style:{fontWeight:400},children:t("optionalSuffix")})]}),children:e.jsx(n,{placeholder:t("fields.contactPhone.placeholder"),size:"large",style:{maxWidth:280}})}),e.jsx(d,{level:5,style:{marginTop:8,marginBottom:16,color:"#1677ff"},children:t("sections.products")}),e.jsx(f,{style:{color:"#595959",marginBottom:16,fontSize:14},children:t("sections.productsHint")}),e.jsx(i.Item,{name:"desiredProducts",rules:[{required:!1}],children:e.jsx(g.Group,{style:{width:"100%"},children:e.jsx(c,{gutter:[12,12],children:E.map(s=>e.jsx(r,{xs:24,sm:12,children:e.jsxs(g,{value:s.code,children:[e.jsx("span",{style:{fontWeight:500},children:s.name}),e.jsxs("span",{style:{color:"#8c8c8c",fontSize:13,marginLeft:6},children:["â ",s.description]})]})},s.code))})})}),e.jsx(i.Item,{name:"notes",label:e.jsxs("span",{children:[t("fields.notes.label")," ",e.jsx(l,{type:"secondary",style:{fontWeight:400},children:t("optionalSuffix")})]}),style:{marginTop:8},children:e.jsx(w,{rows:4,placeholder:t("fields.notes.placeholder"),maxLength:2e3,showCount:!0})}),e.jsx(i.Item,{style:{marginTop:8,marginBottom:0},children:e.jsxs(x,{size:"middle",children:[e.jsx(o,{type:"primary",htmlType:"submit",size:"large",loading:j,style:{paddingInline:40},children:t("buttons.submit")}),e.jsx(o,{size:"large",icon:e.jsx(q,{}),onClick:()=>a("/"),children:t("common:actions.back")})]})})]})}),e.jsx("div",{style:{textAlign:"center",marginTop:24},children:e.jsxs(l,{type:"secondary",children:[t("footer.haveAccount")," ",e.jsx(o,{type:"link",onClick:()=>a("/login"),style:{padding:0},children:t("footer.signIn")})]})})]})})}export{oe as default};
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.