1import{s as v,j as e,S as q}from"./index-Cgwrdvnv.js";import{u as T,r as c}from"./vendor-react-DCzJ445I.js";import"./vendor-supabase-aIc43LEv.js";const w="https://api.introvy.ai";function F(){const m=T(),[d,u]=c.useState(!1),[p,x]=c.useState(""),[j,b]=c.useState(!1),[N,f]=c.useState(""),[r,_]=c.useState(null),[t,h]=c.useState({name:"",email:"",company_name:"",company_website:"",role:"",ats_platform:"",reason:""});c.useEffect(()=>{(async()=>{const{data:{user:s}}=await v.auth.getUser();s&&(_(s),h(n=>{var i,a;return{...n,name:n.name||((i=s.user_metadata)==null?void 0:i.full_name)||((a=s.user_metadata)==null?void 0:a.name)||"",email:n.email||s.email||""}}))})()},[]);const l=s=>{const{name:n,value:i}=s.target;h(a=>({...a,[n]:i}))},S=async s=>{var n,i;s.preventDefault(),u(!0),x(""),b(!1),f("");try{const{data:{session:a}}=await v.auth.getSession(),k=a!=null&&a.access_token?`${w}/api/recruiters/apply`:`${w}/api/recruiters/apply-public`,A={"Content-Type":"application/json",...a!=null&&a.access_token?{Authorization:`Bearer ${a.access_token}`}:{}},y=[t.ats_platform?`ATS: ${t.ats_platform}`:null,t.reason?`Workflows to test: ${t.reason}`:null].filter(Boolean).join(` 2`),C=a!=null&&a.access_token?{company_name:t.company_name,company_website:t.company_website||null,role:t.role,reason:y,work_email:(r==null?void 0:r.email)||void 0,name:((n=r==null?void 0:r.user_metadata)==null?void 0:n.full_name)||((i=r==null?void 0:r.user_metadata)==null?void 0:i.name)||null}:{name:t.name,email:t.email,company_name:t.company_name,company_website:t.company_website||null,role:t.role,reason:y},g=await fetch(k,{method:"POST",headers:A,credentials:"include",body:JSON.stringify(C)}),o=await g.json().catch(()=>null);if(!g.ok)throw new Error((o==null?void 0:o.error)||(o==null?void 0:o.message)||"Failed to submit request");b(!0),f((o==null?void 0:o.message)||"Thanks. Weâll review your request and email next steps. Approved teams can start from the dashboard with free credits."),a!=null&&a.access_token&&setTimeout(()=>m("/org/dashboard"),1800)}catch(a){x((a==null?void 0:a.message)||"Failed to submit request. Please try again.")}finally{u(!1)}};return j?e.jsx("div",{className:"min-h-screen bg-gradient-to-b from-[#f7f4ff] to-white flex items-center justify-center px-4",children:e.jsxs("div",{className:"max-w-md w-full bg-white rounded-2xl shadow-lg p-8 text-center",children:[e.jsx("div",{className:"text-6xl mb-4",children:"â "}),e.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Request Submitted"}),e.jsx("p",{className:"text-gray-600",children:N})]})}):e.jsxs(e.Fragment,{children:[e.jsx(q,{title:"Start Free with 5 Credits | Introvy",description:"Create a free Introvy account with 5 credits. Invite a candidate to answer job specific questions by video, and send your hiring manager a submission with their own answers.",canonical:"https://www.introvy.ai/recruiters/start",robots:"index,follow"}),e.jsx("div",{className:"min-h-screen bg-gradient-to-b from-[#f7f4ff] to-white py-12 px-4",children:e.jsx("div",{className:"max-w-2xl mx-auto",children:e.jsxs("div",{className:"bg-white rounded-2xl shadow-lg p-8",children:[e.jsx("h1",{className:"text-3xl font-bold text-gray-900 mb-2",children:"Request Introvy access"}),e.jsx("p",{className:"text-gray-600 mb-6",children:"Tell us about your recruitment team and how you want to use Introvy. Approved teams can start with free credits, send workflows from the dashboard, upgrade plans when ready, and connect an ATS later."}),e.jsxs("div",{className:"text-sm text-gray-600 mb-8 rounded-xl border border-violet-100 bg-violet-50/50 p-4",children:[e.jsx("p",{className:"font-medium text-gray-800 mb-2",children:"No ATS required to get started."}),e.jsx("p",{children:"After approval, you can test Introvy from the dashboard. If your team wants more credits, you can upgrade from the dashboard. If you use RecruitCRM, you can connect your ATS from the dashboard when ready."})]}),p&&e.jsx("div",{className:"bg-red-50 border border-red-200 text-red-800 px-4 py-3 rounded-lg mb-6",children:p}),e.jsxs("form",{onSubmit:S,className:"space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Full Name *"}),e.jsx("input",{type:"text",name:"name",value:t.name,onChange:l,required:!0,className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-violet-500 focus:border-transparent",placeholder:"Your name"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Work Email *"}),e.jsx("input",{type:"email",name:"email",value:t.email,onChange:l,required:!0,className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-violet-500 focus:border-transparent",placeholder:"[email protected]"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Company Name *"}),e.jsx("input",{type:"text",name:"company_name",value:t.company_name,onChange:l,required:!0,className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-violet-500 focus:border-transparent",placeholder:"Your company or agency name"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Company Website"}),e.jsx("input",{type:"url",name:"company_website",value:t.company_website,onChange:l,className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-violet-500 focus:border-transparent",placeholder:"https://yourcompany.com"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Your Role *"}),e.jsx("input",{type:"text",name:"role",value:t.role,onChange:l,required:!0,className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-violet-500 focus:border-transparent",placeholder:"e.g., Recruiter, Talent Manager, Agency Owner"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"What ATS do you use?"}),e.jsx("input",{type:"text",name:"ats_platform",value:t.ats_platform,onChange:l,className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-violet-500 focus:border-transparent",placeholder:"RecruitCRM, Avionté, Bullhorn, Crelate, JobAdder, none, or not sure"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"What do you want to test first? *"}),e.jsx("textarea",{name:"reason",value:t.reason,onChange:l,required:!0,rows:4,className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-violet-500 focus:border-transparent",placeholder:"Example: Apply Video for sales candidates, interview prep for IT roles, thank-you follow-ups, research briefsâ¦"})]}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx("button",{type:"button",onClick:()=>m("/"),className:"flex-1 px-6 py-3 border border-gray-300 rounded-lg text-gray-700 font-medium hover:bg-gray-50 transition-colors",children:"Back"}),e.jsx("button",{type:"submit",disabled:d,className:`flex-1 px-6 py-3 bg-violet-600 text-white font-semibold rounded-lg hover:bg-violet-700 transition-colors ${d?"opacity-50 cursor-not-allowed":""}`,children:d?"Submittingâ¦":"Request Access"})]})]}),e.jsx("p",{className:"text-xs text-gray-500 mt-4",children:"Approval required · free credits available for approved teams · ATS can be connected later from the dashboard"})]})})})]})}export{F 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.