1import{W as b,r as v,j as e,Y as C,a as l}from"./app-IXUJWYlY.js";import{I as w}from"./InputError-DiECPOvo.js";import{I as p}from"./floating-ui.dom-Cz7y4tb9.js";import{T as i}from"./TextInput-06o5CX8r.js";import{A}from"./PhoneInput-D9BcF2Xt.js";import{L as P,B as E}from"./Layout-DMTzjO4C.js";import{B as S}from"./Button-DE1V2Czm.js";import{S as F}from"./Spinner-CWRcmSgh.js";import"./index-CkO7RN6o.js";import"./autoFocus-b0AntsWZ.js";const I=["Anesthesiologist","CRNA","CAA"];function K({accountType:d}){const a=d==="employer",{data:o,setData:u,post:h,processing:m,errors:n,setError:x}=b({name:"",email:"",phone:"",password:"",password_confirmation:"",poster:a,seeker:!a,privacy:!1,companyName:"",logoFile:null,cvFile:null,contactName:"",contactEmail:"",contactNumber:"",profession:""}),g=r=>{r.preventDefault(),h(route("register",""),{preserveScroll:!0,onError:s=>{s[500]&&E.error(s[500])}})},t=(r,s)=>{u(r,s),x(r,"")},[y,f]=v.useState(0),j=r=>{var c;const s=document.activeElement;if((c=s==null?void 0:s.id)!=null&&c.startsWith("register-password")){f(N=>N+1);return}t("phone",r)};return e.jsxs(P,{children:[e.jsx(C,{title:a?"Create Account â Employers & Recruiters":"Create Account"}),m?e.jsx(F,{}):null,e.jsxs("section",{className:"flex flex-col mx-auto items-center mt-4 bg-white anes-shadow-1 md:w-[37.5rem] gap-4 rounded-2xl",children:[e.jsxs("div",{className:"mt-10 text-center px-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-primary",children:a?"Employers & Recruiters":"Anesthesia Professionals"}),e.jsx("p",{className:"mt-2 text-sm text-grey",children:a?"Connect with Anesthesiologists, CRNAs, and CAAs. Create your profile to get started.":"Connect with anesthesia employers. Save your favorite jobs. Create job alerts. Apply directly from the job listing. Create your profile to get started."})]}),e.jsx("div",{className:"w-full px-10",children:e.jsx("div",{className:"px-4 py-3 text-sm text-center border rounded-lg border-borderGrey text-grey",children:a?e.jsxs(e.Fragment,{children:["Are you an Anesthesiologist, CRNA, CAA, Resident, SRNA, or SAA?"," ",e.jsx(l,{className:"font-bold text-primary",href:"/register",children:"Create an Account"})]}):e.jsxs(e.Fragment,{children:["Are you an employer or recruiter?"," ",e.jsx(l,{className:"font-bold text-primary",href:"/register?type=employer",children:"Create an Account"})]})})}),e.jsxs("form",{className:"w-full p-10 pt-2",onSubmit:g,children:[e.jsx(i,{id:"register-name",label:"Full Name",errorMsg:n.name,value:o.name,autoComplete:"name",isFocused:!0,onChange:r=>t("name",r.target.value),placeholder:"Full Name",required:!0}),a?e.jsx(i,{id:"register-company-name",errorMsg:n.companyName,label:"Company Name",placeholder:"Company Name",value:o.companyName,onChange:r=>t("companyName",r.target.value),required:!0}):e.jsxs("div",{className:"mb-4",children:[e.jsxs(p,{htmlFor:"profession",children:["Profession",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsx("div",{className:"flex flex-wrap gap-4 mt-1",children:I.map(r=>e.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer text-primary",children:[e.jsx("input",{type:"radio",name:"profession",value:r,checked:o.profession===r,onChange:s=>t("profession",s.target.value),className:"w-4 h-4 text-primary border-grey focus:ring-primary"}),r]},r))}),e.jsx(w,{className:"mt-1",message:n.profession})]}),e.jsx(A,{errorMsg:n.phone,id:"register-phone",label:"Phone",value:o.phone,inputProps:{id:"register-phone",name:"phone",autoComplete:"tel"},onChange:j},y),e.jsx(i,{id:"register-email",placeholder:"[email protected]",value:o.email,errorMsg:n.email,label:"Email",autoComplete:"username",onChange:r=>t("email",r.target.value),required:!0}),e.jsx(i,{id:"register-password",type:"password",eye:!0,errorMsg:n.password,placeholder:"********",label:"Password",value:o.password,autoComplete:"new-password",onChange:r=>t("password",r.target.value),required:!0}),e.jsx(i,{id:"register-password_confirmation",type:"password",errorMsg:n.password,placeholder:"********",eye:!0,label:"Confirm Password",name:"password_confirmation",value:o.password_confirmation,autoComplete:"new-password",onChange:r=>t("password_confirmation",r.target.value),required:!0}),e.jsx(S,{type:"submit",disabled:m,primary:!0,full:!0,children:"Create Account"}),e.jsxs("div",{className:"flex items-center gap-1 mt-6 mb-4",children:[e.jsx("input",{required:!0,id:"privacy",onChange:r=>t("privacy",r.target.checked===!0),type:"checkbox",className:"w-5 h-5 bg-white rounded-md cursor-pointer text-primary border-grey focus:ring-primary"}),e.jsxs(p,{htmlFor:"privacy",className:"!mb-0 text-xs text-grey",children:["I agree to the"," ",e.jsx("a",{target:"_blank",className:"font-bold",href:"/terms",children:"Terms"})," ","and"," ",e.jsx("a",{target:"_blank",className:"font-bold",href:"/privacy",children:"Privacy Policy"})]})]}),e.jsxs("div",{className:"mb-2 text-xs text-center text-grey",children:["Already have an account? ",e.jsx(l,{href:"/login",children:"Login"})]})]})]})]})}export{K 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.