1import{j as e}from"./chunk-editor-BoEejyrU.js";import{r as g,f as z}from"./router-BpnsrfSX.js";import{y as c,u as I,ao as D}from"./index-ChzAEmuP.js";import{S as O}from"./chunk-select-CDhXmjgG.js";import{b as M}from"./PublicServices-C04yVe6Z.js";import{A as $}from"./react-select-async.esm-BWPL9tDI.js";import{c as Y}from"./Company-CouNrFTM.js";const T=({totalSteps:m,currentStep:a,stepLabels:p=[],variant:F="steps"})=>{const d=g.useRef(null),[x,h]=g.useState(0);if(g.useEffect(()=>{d.current&&h(d.current.offsetWidth)},[]),F==="simple")return e.jsx("div",{style:{width:"100%",margin:"1.5rem 0",display:"flex",justifyContent:"center"},children:e.jsx("div",{style:{width:"80%",height:8,background:"#E0E7ED",borderRadius:4,overflow:"hidden"},children:e.jsx("div",{style:{width:`${(a-1)/(m-1)*100}%`,height:"100%",background:"#24D366",borderRadius:4,transition:"width 0.4s cubic-bezier(.4,0,.2,1)"}})})});const k=14;let t=0;x&&m>1&&a>1&&(t=k/x*100);let u=0;return a===1?u=0:a===m?u=100:u=(a-1)/(m-1)*100+t,u>100&&(u=100),e.jsx("div",{style:{width:"100%",margin:"1.5rem 0",display:"flex",justifyContent:"center"},children:e.jsxs("div",{ref:d,style:{width:"80%",position:"relative",height:70},children:[e.jsx("div",{style:{position:"absolute",top:"50%",left:0,right:0,height:4,background:"#E0E7ED",transform:"translateY(-50%)",zIndex:0}}),e.jsx("div",{style:{position:"absolute",top:"50%",left:0,height:4,width:`${u}%`,background:"#24D366",transform:"translateY(-50%)",zIndex:1,transition:"width 0.4s cubic-bezier(.4,0,.2,1)"}}),Array.from({length:m}).map((b,i)=>{const f=i<a,y=i+1===a,j=i/(m-1)*100;return e.jsxs("div",{style:{position:"absolute",top:0,left:`${j}%`,transform:i===0?"translateX(0%)":i===m-1?"translateX(-100%)":"translateX(-50%)",zIndex:2,display:"flex",flexDirection:"column",alignItems:i===0?"flex-start":i===m-1?"flex-end":"center",height:"100%",justifyContent:"center"},children:[e.jsx("div",{style:{marginTop:"auto",marginBottom:6,display:"flex",justifyContent:"center"},children:e.jsx("div",{style:{width:28,height:28,borderRadius:"50%",background:f?"#24D366":"#fff",border:`2px solid ${f?"#24D366":"#E0E7ED"}`,display:"flex",alignItems:"center",justifyContent:"center",color:f?"#fff":"#607d8b",fontWeight:"bold",fontSize:"1.1rem",boxShadow:y?"0 0 0 4px rgba(36, 211, 102, 0.2)":"none",transition:"all 0.3s"},children:i<a-1?e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 20 20",fill:"none",children:e.jsx("path",{d:"M6 10.5L9 13.5L15 7.5",stroke:"#fff",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})}):e.jsx("span",{children:i+1})})}),e.jsx("div",{style:{height:16,display:"flex",justifyContent:"center",alignItems:"center"},children:y&&p[i]&&e.jsx("div",{style:{fontSize:"0.75rem",color:"#055E54",fontWeight:"bold",whiteSpace:"nowrap"},children:p[i]})})]},i)})]})})},W=({email:m})=>{const[a,p]=g.useState({name:"",email:m||"",phone:"",address:"",default_timezone:"",language:"",currency:"",location:"",linkedin_url:"",twitter_url:"",facebook_url:"",instagram_url:"",industry:"",website:"",size:"",founded:"",headquarters:"",description:"",pan:"",gst:"",name_as_per_pan:"",agreedToTerms:!1,date_format:"",logoFile:null,logoUrl:"",faviconFile:null,faviconUrl:""}),F=z(),[d,x]=g.useState("company-info"),[h,k]=g.useState(!1),[t,u]=g.useState({}),b=r=>{p(n=>({...n,industry:(r==null?void 0:r.value)||""})),u(n=>({...n,industry:""}))},i=async r=>{var n;try{const l=await M(r);return((n=l==null?void 0:l.results)==null?void 0:n.map(C=>({value:C,label:C})))||[]}catch(l){return console.error(l),c.error("Could not fetch industry suggestions."),[]}},f=[{value:"",label:"Select Company Size"},{value:"1-10",label:"1-10 employees"},{value:"11-50",label:"11-50 employees"},{value:"51-200",label:"51-200 employees"},{value:"201-500",label:"201-500 employees"},{value:"501-1000",label:"501-1000 employees"},{value:"1001+",label:"1001+ employees"}],y=[{value:"USD",label:"US Dollar (USD)"},{value:"EUR",label:"Euro (EUR)"},{value:"GBP",label:"British Pound (GBP)"},{value:"JPY",label:"Japanese Yen (JPY)"},{value:"INR",label:"Indian Rupee (INR)"},{value:"AUD",label:"Australian Dollar (AUD)"},{value:"CAD",label:"Canadian Dollar (CAD)"},{value:"CHF",label:"Swiss Franc (CHF)"},{value:"CNY",label:"Chinese Yuan (CNY)"},{value:"SEK",label:"Swedish Krona (SEK)"},{value:"NZD",label:"New Zealand Dollar (NZD)"},{value:"MXN",label:"Mexican Peso (MXN)"},{value:"SGD",label:"Singapore Dollar (SGD)"},{value:"HKD",label:"Hong Kong Dollar (HKD)"},{value:"NOK",label:"Norwegian Krone (NOK)"},{value:"KRW",label:"South Korean Won (KRW)"},{value:"TRY",label:"Turkish Lira (TRY)"},{value:"RUB",label:"Russian Ruble (RUB)"},{value:"BRL",label:"Brazilian Real (BRL)"},{value:"ZAR",label:"South African Rand (ZAR)"}],j=[{value:"",label:"Select Timezone"},{value:"UTC-12:00",label:"UTC-12:00"},{value:"UTC-11:00",label:"UTC-11:00"},{value:"UTC+14:00",label:"UTC+14:00"}],E=[{value:"",label:"Select Language"},{value:"en",label:"English"},{value:"es",label:"Spanish"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"zh",label:"Chinese"},{value:"hi",label:"Hindi"},{value:"ar",label:"Arabic"},{value:"pt",label:"Portuguese"},{value:"ru",label:"Russian"},{value:"ja",label:"Japanese"},{value:"it",label:"Italian"},{value:"ko",label:"Korean"},{value:"nl",label:"Dutch"},{value:"sv",label:"Swedish"},{value:"da",label:"Danish"},{value:"no",label:"Norwegian"},{value:"fi",label:"Finnish"},{value:"pl",label:"Polish"},{value:"tr",label:"Turkish"}],s=r=>{const{name:n,value:l,type:C,checked:S}=r.target;p(v=>({...v,[n]:C==="checkbox"?S:l})),u(v=>({...v,[n]:""}))},N=r=>{p(n=>({...n,currency:r})),u(n=>({...n,currency:""}))},w=r=>{let n={},l=!0;return r==="company-info"?(a.email.trim()?/\S+@\S+\.\S+/.test(a.email)||(n.email="Email is invali
1d.",l=!1):(n.email="Email is required.",l=!1),(!a.currency||a.currency.length===0)&&(n.currency="At least one currency is required.",l=!1),a.default_timezone||(n.default_timezone="Timezone is required.",l=!1),a.language||(n.language="Language is required.",l=!1),a.name.trim()||(n.name="Company Name is required.",l=!1),a.industry||(n.industry="Industry is required.",l=!1),a.size||(n.size="Company Size is required.",l=!1),a.headquarters.trim()||(n.headquarters="Headquarters is required.",l=!1)):r==="legal"?(a.pan.trim()?/^[A-Z]{5}[0-9]{4}[A-Z]{1}$/.test(a.pan.trim())||(n.pan="Invalid PAN format (e.g., ABCDE1234F).",l=!1):(n.pan="PAN is required.",l=!1),a.name_as_per_pan.trim()||(n.name_as_per_pan="Legal Name as per PAN is required.",l=!1)):r==="description"&&(a.description.trim()?a.description.trim().length>500&&(n.description="Description cannot exceed 500 characters.",l=!1):(n.description="Company description is required.",l=!1),a.agreedToTerms||(n.agreedToTerms="You must agree to the terms and privacy policy.",l=!1)),u(n),{errors:n,isValid:l}},o=()=>{const{errors:r,isValid:n}=w(d);n?(d==="company-info"?x("social"):d==="social"?x("legal"):d==="legal"&&x("description"),window.scrollTo({top:0,behavior:"smooth"})):(console.error("Validation errors:",r),c.warn("Please fill in all required fields and correct any errors before proceeding."))},_=()=>{let r={};return a.email.trim()?/\S+@\S+\.\S+/.test(a.email)||(r.email="Email is invalid."):r.email="Email is required.",(!a.currency||a.currency.length===0)&&(r.currency="At least one currency is required."),a.default_timezone||(r.default_timezone="Timezone is required."),a.language||(r.language="Language is required."),a.name.trim()||(r.name="Company Name is required."),a.industry||(r.industry="Industry is required."),a.size||(r.size="Company Size is required."),a.headquarters.trim()||(r.headquarters="Headquarters is required."),a.pan.trim()?/^[A-Z]{5}[0-9]{4}[A-Z]{1}$/.test(a.pan.trim())||(r.pan="Invalid PAN format (e.g., ABCDE1234F)."):r.pan="PAN is required.",a.name_as_per_pan.trim()||(r.name_as_per_pan="Legal Name as per PAN is required."),a.description.trim()?a.description.trim().length>500&&(r.description="Description cannot exceed 500 characters."):r.description="Company description is required.",a.agreedToTerms||(r.agreedToTerms="You must agree to the terms and privacy policy."),u(r),r},P=async r=>{var C,S;r.preventDefault();const n=_();if(Object.keys(n).length>0){Object.values(n).forEach(v=>c.error(v));return}k(!0);const l=new FormData;l.append("company_name",a.name),l.append("company_email",a.email),l.append("company_phone",a.phone),l.append("company_address",a.address),l.append("company_default_timezone",a.default_timezone),l.append("company_language",a.language),l.append("company_location",a.locations),l.append("company_linkedin_url",a.linkedin_url),l.append("company_twitter_url",a.twitter_url),l.append("company_facebook_url",a.facebook_url),l.append("company_instagram_url",a.instagram_url),l.append("company_industry",a.industry),l.append("company_website",a.website),l.append("company_size",a.size),l.append("company_founded",a.founded),l.append("company_headquarters",a.headquarters),l.append("company_description",a.description),l.append("company_pan",a.pan),l.append("company_gst",a.gst),l.append("company_name_as_per_pan",a.name_as_per_pan),l.append("company_date_format",a.date_format),a.logoFile?l.append("company_logo",a.logoFile):a.logoUrl&&l.append("company_logo_url",a.logoUrl),a.faviconFile?l.append("company_favicon",a.faviconFile):a.faviconUrl&&l.append("company_favicon_url",a.faviconUrl);try{await Y(l),c.success("Company details updated successfully!"),F("/recruiter/dashboard")}catch(v){console.error("Error updating company:",v);const B=((S=(C=v.response)==null?void 0:C.data)==null?void 0:S.message)||"An error occurred. Please try again.";c.error(B)}finally{k(!1)}},A=r=>{const n=r.target.files[0];p(l=>({...l,logoFile:n,logoUrl:""}))},L=r=>{p(n=>({...n,logoUrl:r.target.value,logoFile:null}))},R=r=>{const n=r.target.files[0];p(l=>({...l,faviconFile:n,faviconUrl:""}))},q=r=>{p(n=>({...n,faviconUrl:r.target.value,faviconFile:null}))},U=new Date().getFullYear();return e.jsx("div",{className:"min-h-screen bg-[var(--bg-secondary)] flex justify-center items-start p-4",children:e.jsxs("div",{className:"w-full max-w-3xl bg-white shadow-2xl rounded-3xl overflow-hidden",children:[e.jsxs("div",{className:"text-center py-10 px-4 border-b border-[#
1E0E7ED]",children:[e.jsx("h1",{className:"text-4xl font-bold text-[var(--deep-green)] mb-3",children:"Register Your Company"}),e.jsx("p",{className:"text-[var(--teal)] text-lg",children:"Join our platform to connect with top talent and manage your hiring needs."})]}),e.jsx("div",{className:"px-6 pt-2",children:e.jsx(T,{totalSteps:3,currentStep:3,stepLabels:["Email","OTP","Company Details"]})}),e.jsx("div",{className:"hidden md:flex border-b border-[#E0E7ED] bg-white px-6 mt-4",children:[{key:"company-info",label:"Company Information"},{key:"social",label:"Social Media"},{key:"legal",label:"Legal Information"},{key:"description",label:"Company Description"}].map(r=>e.jsx("button",{type:"button",className:`flex-1 py-4 text-base font-semibold transition-colors rounded-t-lg border-b-4 ${d===r.key?"border-[var(--primary)] text-[var(--deep-green)] bg-[var(--bg-secondary)]":"border-transparent text-gray-500 hover:text-[var(--teal)]"}`,onClick:()=>x(r.key),children:r.label},r.key))}),e.jsxs("form",{onSubmit:P,className:"px-6 py-0 md:py-10 space-y-10 mt-4 md:mt-0",children:[d==="company-info"&&e.jsxs("div",{className:"bg-[#FAFCFB] rounded-2xl shadow-inner p-6 md:p-10",children:[e.jsx("h3",{className:"text-2xl font-bold text-[var(--deep-green)] mb-8",children:"Company Information"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-[var(--deep-green)] font-semibold mb-2 text-base",htmlFor:"name",children:["Company Name ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",name:"name",id:"name",value:a.name,onChange:s,required:!0,className:`w-full border ${t.name?"border-red-500":"border-[var(--teal)]"} rounded-xl px-5 py-3 text-base transition-all outline-none focus:border-[var(--primary)] focus:ring-0`}),t.name&&e.jsx("p",{className:" text-red-700 text-sm mt-1 rounded px-2 py-1",children:t.name})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-[var(--deep-green)] font-semibold mb-2 text-base",htmlFor:"industry",children:["Industry ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx($,{cacheOptions:!0,defaultOptions:!0,loadOptions:i,onChange:b,value:a.industry?{value:a.industry,label:a.industry}:null,placeholder:"Select your industry",styles:{control:(r,n)=>({...r,minHeight:"48px",boxShadow:n.isFocused?"0 0 0 2px rgba(34,197,94,0.2)":"none",borderColor:n.isFocused?"rgb(34 197 94)":t.industry?"rgb(239 68 68)":"var(--teal)",borderRadius:"0.75rem",paddingLeft:"0.5rem",paddingRight:"1rem",transition:"border-color 0.2s",":hover":{borderColor:"rgb(34 197 94)"}}),menu:r=>({...r,zIndex:50,backgroundColor:"white",borderRadius:"0.5rem"}),option:(r,{isFocused:n})=>({...r,backgroundColor:n?"rgba(34,197,94,0.1)":"transparent",color:"inherit",cursor:"pointer"}),singleValue:r=>({...r,color:"inherit"}),input:r=>({...r,color:"inherit"}),placeholder:r=>({...r,color:"gray"})}}),t.industry&&e.jsx("p",{className:" text-red-700 text-sm mt-1 rounded px-2 py-1",children:t.industry})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-[var(--deep-green)] font-semibold mb-2 text-base",htmlFor:"email",children:["Company Email ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"email",name:"email",id:"email",value:a.email,onChange:s,required:!0,disabled:!0,readOnly:!0,className:`w-full border ${t.email?"border-red-500":"border-[var(--teal)]"} rounded-xl px-5 py-3 text-base transition-all outline-none bg-gray-100 text-gray-400 cursor-not-allowed`}),t.email&&e.jsx("p",{className:" text-red-700 text-sm mt-1 rounded px-2 py-1",children:t.email})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-[var(--deep-green)] font-semibold mb-2 text-base",htmlFor:"language",children:["Language ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("select",{name:"language",id:"language",value:a.language,onChange:s,required:!0,className:`w-full border ${t.language?"border-red-500":"border-[var(--teal)]"} rounded-xl px-5 py-3 text-base transition-all outline-none focus:border-[var(--primary)] focus:ring-0 bg-[url('data:image/svg+xml;utf8,<svg fill='gray' height='20' viewBox='0 0 20 20' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7.293 14.707a1 1 0 001.414 0l5-5a1 1 0 00-1.414-1.414L10 11.586 8.707 10.293a1 1 0 00-1.414 1.414l2 2z'/></svg>')] bg-no-repeat bg-right bg-[length:1.5em_1.5em] appearance-none`,children:E.map(r=>e.jsx("option",{value:r.value,children:r.label},r.value))}),t.language&&e.jsx("p",{className:" text-red-700 text-sm mt-1 rounded px-2 py-1",children:t.language})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-[var(--deep-green)] font-semibold mb-2 text-base",htmlFor:"website",children:"Company Website"}),e.jsxs("div",{className:"relative",children:[e.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--teal)]",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})})}),e.jsx("input",{type:"url",name:"website",id:"website",value:a.website,onChange:s,className:`w-full border ${t.website?"border-red-500":"border-[var(--teal)]"} rounded-xl pl-10 pr-4 py-3 text-base transition-all outline-none focus:border-[var(--primary)] focus:ring-0`})]}),t.website&&e.jsx("p",{className:" text-red-700 text-sm mt-1 rounded px-2 py-1",children:t.website})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-[var(--deep-green)] font-semibold mb-2 text-base",htmlFor:"size",children:["Company Size ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("select",{name:"size",id:"size",value:a.size,onChange:s,required:!0,className:`w-full border ${t.size?"border-red-500":"border-[var(--teal)]"} rounded-xl px-5 py-3 text-base transition-all outline-none focus:border-[var(--primary)] focus:ring-0 bg-[url('data:image/svg+xml;utf8,<svg fill='gray' height='20' viewBox='0 0 20 20' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7.293 14.707a1 1 0 001.414 0l5-5a1 1 0 00-1.414-1.414L10 11.586 8.707 10.293a1 1 0 00-1.414 1.414l2 2z'/></svg>')] bg-no-repeat bg-right bg-[length:1.5em_1.5em] appearance-none`,children:f.map(r=>e.jsx("option",{value:r.value,children:r.label},r.value))}),t.size&&e.jsx("p",{className:" text-red-700 text-sm mt-1 rounded px-2 py-1",children:t.size})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-[var(--deep-green)] font-semibold mb-2 text-base",htmlFor:"founded",children:"Founded Year"}),e.jsx("input",{type:"number",name:"founded",id:"founded",value:a.founded,onChange:s,min:"1800",max:U,className:`w-full border ${t.founded?"border-red-500":"border-[var(--teal)]"} rounded-xl px-5 py-3 text-base transition-all outline-none focus:border-[var(--primary)] focus:ring-0`}),t.founded&&e.jsx("p",{className:" text-red-700 text-sm mt-1 rounded px-2 py-1",children:t.founded})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-[var(--deep-green)] font-semibold mb-2 text-base",htmlFor:"headquarters",children:["Headquarters (City, State/Country) ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",name:"headquarters",id:"headquarters",value:a.headquarters,onChange:s,required:!0,className:`w-full border ${t.headquarters?"border-red-500":"border-[var(--teal)]"} rounded-xl px-5 py-3 text-base transition-all outline-none focus:border-[var(--primary)] focus:ring-0`}),t.headquarters&&e.jsx("p",{className:" text-red-700 text-sm mt-1 rounded px-2 py-1",children:t.headquarters})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("label",{className:"block text-[var(--deep-green)] font-semibold mb-2 text-base",htmlFor:"phone",children:"Company Contact Phone Number"}
1),e.jsx("input",{type:"tel",name:"phone",id:"phone",value:a.phone,onChange:s,className:`w-full border ${t.phone?"border-red-500":"border-[var(--teal)]"} rounded-xl px-5 py-3 text-base transition-all outline-none focus:border-[var(--primary)] focus:ring-0`}),t.phone&&e.jsx("p",{className:" text-red-700 text-sm mt-1 rounded px-2 py-1",children:t.phone})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-[var(--deep-green)] font-semibold mb-2 text-base",htmlFor:"default_timezone",children:["Timezone ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("select",{name:"default_timezone",id:"default_timezone",value:a.default_timezone,onChange:s,required:!0,className:`w-full border ${t.default_timezone?"border-red-500":"border-[var(--teal)]"} rounded-xl px-5 py-3 text-base transition-all outline-none focus:border-[var(--primary)] focus:ring-0 bg-[url('data:image/svg+xml;utf8,<svg fill='gray' height='20' viewBox='0 0 20 20' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7.293 14.707a1 1 0 001.414 0l5-5a1 1 0 00-1.414-1.414L10 11.586 8.707 10.293a1 1 0 00-1.414 1.414l2 2z'/></svg>')] bg-no-repeat bg-right bg-[length:1.5em_1.5em] appearance-none`,children:j.map(r=>e.jsx("option",{value:r.value,children:r.label},r.value))}),t.default_timezone&&e.jsx("p",{className:" text-red-700 text-sm mt-1 rounded px-2 py-1",children:t.default_timezone})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-[var(--deep-green)] font-semibold mb-2 text-base",htmlFor:"date_format",children:["Date Format(s) ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",name:"date_format",id:"date_format",value:a.date_format,onChange:s,placeholder:"e.g. DD/MM/YYYY,MM/DD/YYYY",required:!0,className:`w-full border ${t.date_format?"border-red-500":"border-[var(--teal)]"} rounded-xl px-5 py-3 text-base transition-all outline-none focus:border-[var(--primary)] focus:ring-0`}),t.date_format&&e.jsx("p",{className:" text-red-700 text-sm mt-1 rounded px-2 py-1",children:t.date_format})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsxs("label",{className:"block text-[var(--deep-green)] font-semibold mb-2 text-base",htmlFor:"currency",children:["Currency ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx(O,{isMulti:!0,name:"currency",id:"currency",options:y,value:y.filter(r=>a.currency&&a.currency.some(n=>n.value===r.value)),onChange:N,classNamePrefix:"react-select",placeholder:"Select currency(s)",className:"w-full"}),t.currency&&e.jsx("p",{className:" text-red-700 text-sm mt-1 rounded px-2 py-1",children:t.currency})]}),e.jsxs("div",{className:"bg-white rounded-xl shadow p-4 flex flex-col gap-2",children:[e.jsx("label",{className:"block text-[var(--deep-green)] font-semibold mb-2 text-base",htmlFor:"logoFile",children:"Company Logo"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("label",{htmlFor:"logoFile",className:"bg-[var(--primary)] text-white px-4 py-2 rounded-lg font-semibold cursor-pointer hover:bg-[var(--teal)] transition-colors text-sm",children:"Choose File"}),e.jsx("input",{id:"logoFile",type:"file",accept:"image/*",onChange:A,className:"hidden"}),a.logoFile&&e.jsxs("span",{className:"text-[var(--deep-green)] text-sm flex items-center gap-1",children:[e.jsx("svg",{className:"w-4 h-4 text-[var(--primary)]",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}),a.logoFile.name]})]}),e.jsx("input",{type:"url",placeholder:"Or paste logo URL",value:a.logoUrl,onChange:L,className:"w-full border border-[var(--teal)] rounded-xl px-4 py-2 text-base mt-1"}),(a.logoFile||a.logoUrl)&&e.jsx("div",{className:"mt-2",children:e.jsx("img",{src:a.logoFile?URL.createObjectURL(a.logoFile):a.logoUrl,alt:"Logo Preview",className:"max-w-[100px] max-h-[100px] rounded-lg border border-gray-200"})})]}),e.jsxs("div",{className:"bg-white rounded-xl shadow p-4 flex flex-col gap-2",children:[e.jsx("label",{className:"block text-[var(--deep-green)] font-semibold mb-2 text-base",htmlFor:"faviconFile",children:"Favicon"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("label",{htmlFor:"faviconFile",className:"bg-[var(--primary)] text-white px-4 py-2 rounded-lg font-semibold cursor-pointer hover:bg-[var(--teal)] transition-colors text-sm",children:"Choose File"}),e.jsx("input",{id:"faviconFile",type:"file",accept:"image/*",onChange:R,className:"hidden"}),a.faviconFile&&e.jsxs("span",{className:"text-[var(--deep-green)] text-sm flex items-center gap-1",children:[e.jsx("svg",{className:"w-4 h-4 text-[var(--primary)]",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}),a.faviconFile.name]})]}),e.jsx("input",{type:"url",placeholder:"Or paste favicon URL",value:a.faviconUrl,onChange:q,className:"w-full border border-[var(--teal)] rounded-xl px-4 py-2 text-base mt-1"}),(a.faviconFile||a.faviconUrl)&&e.jsx("div",{className:"mt-2",children:e.jsx("img",{src:a.faviconFile?URL.createObjectURL(a.faviconFile):a.faviconUrl,alt:"Favicon Preview",className:"max-w-[48px] max-h-[48px] rounded-lg border border-gray-200"})})]})]})]}),d==="social"&&e.jsxs("div",{className:"bg-[#FAFCFB] rounded-2xl shadow-inner p-6 md:p-10",children:[e.jsx("h3",{className:"text-2xl font-bold text-[var(--deep-green)] mb-8",children:"Social Media Links"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-[var(--deep-green)] font-semibold mb-2 text-base",htmlFor:"linkedin_url",children:"LinkedIn Page URL"}),e.jsxs("div",{className:"relative",children:[e.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--teal)]",children:e.jsx("svg",{className:"h-4 w-4",fill:"
1currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})})}),e.jsx("input",{type:"url",name:"linkedin_url",id:"linkedin_url",value:a.linkedin_url,onChange:s,className:`w-full border ${t.linkedin_url?"border-red-500":"border-[var(--teal)]"} rounded-xl pl-10 pr-4 py-3 text-base transition-all outline-none focus:border-[var(--primary)] focus:ring-0`})]}),t.linkedin_url&&e.jsx("p",{className:" text-red-700 text-sm mt-1 rounded px-2 py-1",children:t.linkedin_url})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-[var(--deep-green)] font-semibold mb-2 text-base",htmlFor:"twitter_url",children:"Twitter (X) Profile URL"}),e.jsxs("div",{className:"relative",children:[e.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--teal)]",children:e.jsx("svg",{className:"h-4 w-4",fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 002 18.407a11.616 11.616 0 006.29 1.84"})})}),e.jsx("input",{type:"url",name:"twitter_url",id:"twitter_url",value:a.twitter_url,onChange:s,className:`w-full border ${t.twitter_url?"border-red-500":"border-[var(--teal)]"} rounded-xl pl-10 pr-4 py-3 text-base transition-all outline-none focus:border-[var(--primary)] focus:ring-0`})]}),t.twitter_url&&e.jsx("p",{className:" text-red-700 text-sm mt-1 rounded px-2 py-1",children:t.twitter_url})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-[var(--deep-green)] font-semibold mb-2 text-base",htmlFor:"facebook_url",children:"Facebook Page URL"}),e.jsxs("div",{className:"relative",children:[e.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--teal)]",children:e.jsx("svg",{className:"h-4 w-4",fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{fillRule:"evenodd",d:"M22 12c0-5.523-4.477-10-10-10S2 6.477 2 12c0 4.991 3.657 9.128 8.438 9.878v-6.987
1h-2.54V12h2.54V9.797c0-2.506 1.492-3.89 3.777-3.89 1.094 0 2.238.195 2.238.195v2.46h-1.26c-1.243 0-1.63.771-1.63 1.562V12h2.773l-.443 2.89h-2.33v6.988C18.343 21.128 22 16.991 22 12z",clipRule:"evenodd"})})}),e.jsx("input",{type:"url",name:"facebook_url",id:"facebook_url",value:a.facebook_url,onChange:s,className:`w-full border ${t.facebook_url?"border-red-500":"border-[var(--teal)]"} rounded-xl pl-10 pr-4 py-3 text-base transition-all outline-none focus:border-[var(--primary)] focus:ring-0`})]}),t.facebook_url&&e.jsx("p",{className:" text-red-700 text-sm mt-1 rounded px-2 py-1",children:t.facebook_url})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-[var(--deep-green)] font-semibold mb-2 text-base",htmlFor:"instagram_url",children:"Instagram URL"}),e.jsx("input",{type:"url",name:"instagram_url",id:"instagram_url",value:a.instagram_url,onChange:s,className:`w-full border ${t.instagram_url?"border-red-500":"border-[var(--teal)]"} rounded-xl px-5 py-3 text-base transition-all outline-none focus:border-[var(--primary)] focus:ring-0`}),t.instagram_url&&e.jsx("p",{className:" text-red-700 text-sm mt-1 rounded px-2 py-1",children:t.instagram_url})]})]})]}),d==="legal"&&e.jsxs("div",{className:"bg-[#FAFCFB] rounded-2xl shadow-inner p-6 md:p-10",children:[e.jsx("h3",{className:"text-2xl font-bold text-[var(--deep-green)] mb-8",children:"Legal & Tax Information"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-[var(--deep-green)] font-semibold mb-2 text-base",htmlFor:"pan",children:["PAN (Permanent Account Number) ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",name:"pan",id:"pan",value:a.pan,onChange:s,required:!0,maxLength:10,pattern:"[A-Z]{5}[0-9]{4}[A-Z]{1}",title:"Please enter a valid 10-character PAN (e.g., ABCDE1234F)",className:`w-full border ${t.pan?"border-red-500":"border-[var(--teal)]"} rounded-xl pl-10 pr-4 py-3 text-base uppercase transition-all outline-none focus:border-[var(--primary)] focus:ring-0`}),t.pan&&e.jsx("p",{className:" text-red-700 text-sm mt-1 rounded px-2 py-1",children:t.pan})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-[var(--deep-green)] font-semibold mb-2 text-base",htmlFor:"gst",children:"GST (Goods and Services Tax)"}),e.jsx("input",{type:"text",name:"gst",id:"gst",value:a.gst,onChange:s,maxLength:15,pattern:"[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z]{1}[1-9A-Z]{1}Z[0-9A-Z]{1}",title:"Please enter a valid 15-character GSTIN",className:`w-full border ${t.gst?"border-red-500":"border-[var(--teal)]"} rounded-xl pl-10 pr-4 py-3 text-base uppercase transition-all outline-none focus:border-[var(--primary)] focus:ring-0`}),e.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"15-character alphanumeric code (optional for registration)"}),t.gst&&e.jsx("p",{className:" text-red-700 text-sm mt-1 rounded px-2 py-1",children:t.gst})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsxs("label",{className:"block text-[var(--deep-green)] font-semibold mb-2 text-base",htmlFor:"name_as_per_pan",children:["Legal Name of Company (as per PAN) ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",name:"name_as_per_pan",id:"name_as_per_pan",value:a.name_as_per_pan,onChange:s,required:!0,className:`w-full border ${t.name_as_per_pan?"border-red-500":"border-[var(--teal)]"} rounded-xl pl-10 pr-4 py-3 text-base transition-all outline-none focus:border-[var(--primary)] focus:ring-0`}),t.name_as_per_pan&&e.jsx("p",{className:" text-red-700 text-sm mt-1 rounded px-2 py-1",children:t.name_as_per_pan})]})]})]}),d==="description"&&e.jsxs("div",{className:"bg-[#FAFCFB] rounded-2xl shadow-inner p-6 md:p-10",children:[e.jsx("h3",{className:"text-2xl font-bold text-[var(--deep-green)] mb-8",children:"Tell Us About Your Company"}),e.jsxs("div",{className:"grid grid-cols-1 gap-8",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-[var(--deep-green)] font-semibold mb-2 text-base",htmlFor:"description",children:["Company Overview ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("textarea",{name:"description",id:"description",rows:8,value:a.description,onChange:s,required:!0,className:`w-full border ${t.description?"border-red-500":"border-[var(--teal)]"} rounded-xl pl-10 pr-4 py-3 text-base transition-all outline-none focus:border-[var(--primary)] focus:ring-0 resize-vertical`}),e.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Describe your company's mission, values, culture, and what makes it a great place to work. Max 500 characters."}),t.description&&e.jsx("p",{className:" text-red-700 text-sm mt-1 rounded px-2 py-1",children:t.description})]}),e.jsxs("div",{className:"flex items-start mt-4",children:[e.jsx("input",{type:"checkbox",name:"agreedToTerms",id:"agreedToTerms",checked:a.agreedToTerms,onChange:s,required:!0,className:"w-5 h-5 mr-3 accent-[var(--primary)] mt-1"}),e.jsxs("label",{htmlFor:"agreedToTerms",className:"text-[var(--deep-green)] text-base",children:["I have read and agree to the ",e.jsx("a",{href:"#",className:"text-[var(--primary)] font-semibold hover:text-[var(--deep-green)] transition-colors",children:"Terms of Service"})," and ",e.jsx("a",{href:"#",className:"text-[var(--primary)] font-semibold hover:text-[var(--deep-green)] transition-colors",children:"Privacy Policy"}),". ",e.jsx("span",{className:"text-red-500",children:"*"})]})]}),t.agreedToTerms&&e.jsx("p",{className:" text-red-700 text-sm mt-1 rounded px-2 py-1 ml-8",children:t.agreedToTerms})]})]}
1),e.jsx("div",{className:"text-center pt-10 border-t border-[#E0E7ED] mt-10",children:d!=="description"?e.jsx("button",{type:"button",onClick:o,className:"inline-block px-10 py-3 text-lg font-semibold text-white bg-[var(--deep-green)] rounded-xl shadow hover:bg-[var(--teal)] transition-colors",children:"Save & Next"}):e.jsx("button",{type:"submit",disabled:h,className:"inline-block px-10 py-3 text-lg font-semibold text-white bg-gradient-to-r from-[var(--primary)] to-[var(--deep-green)] rounded-xl shadow hover:from-[var(--teal)] hover:to-[var(--deep-green)] transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:h?"Registering...":"Register Company"})})]})]})})},Q=()=>{const m=z(),[a,p]=g.useState(!1),{login:F}=I(),[d,x]=g.useState(1),[h,k]=g.useState(""),[t,u]=g.useState(""),[b,i]=g.useState(""),f="https://api.bell.careers",y=async s=>{var N,w;if(s.preventDefault(),!h||!/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(h)){i("Please enter a valid email address.");return}p(!0);try{(await D.post(`${f}/api/company/verify-email/`,{email:h})).status==200?(c.success("OTP sent to your email."),x(2),i("")):(c.error("Failed to send OTP. Please try again."),x(1))}catch(o){const _=((w=(N=o.response)==null?void 0:N.data)==null?void 0:w.error)||"Failed to send OTP. Please try again.";i(_),c.error(_),x(1)}finally{p(!1)}};function j(s){F({id:1,name:"admin",email:s.email,role:"admin",company:"TechCorp Solutions",avatar:"https://images.pexels.com/photos/774909/pexels-photo-774909.jpeg?auto=compress&cs=tinysrgb&w=150&h=150&fit=crop"})}const E=async s=>{var N,w;s.preventDefault(),p(!0);try{const o=await D.post(`${f}/api/company/verify-otp/`,{email:h,otp:t,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone});o.status==200?o.data.company_status=="PENDING"&&o.data.approval_status=="PENDING"?(c.success("OTP verified successfully."),o.data.company_exists==!0&&o.data.is_first_time==!1&&(c.success("Company already exists. Please wait for approval."),window.localStorage.setItem("access_token",o.data.access_token),j(o.data),m("/recruiter/dashboard")),o.data.company_exists==!0&&o.data.is_first_time==!0&&(c.success("Company already exists. Please wait for approval."),window.localStorage.setItem("access_token",o.data.access_token),j(o.data),m("/recruiter/dashboard")),o.data.company_exists==!1&&(c.success("Company already exists. Please wait for approval."),window.localStorage.setItem("access_token",o.data.access_token),j(o.data),m("/recruiter/dashboard")),window.localStorage.setItem("access_token",o.data.access_token),x(3),i("")):o.data.company_status=="ONBOARDED"&&o.data.approval_status=="APPROVED"?(c.success("Company already exists."),window.localStorage.setItem("access_token",o.data.access_token),m("/recruiter/dashboard")):o.data.company_status=="ONBOARDED"&&o.data.approval_status=="PENDING"?(c.success("Company already exists. Please wait for approval."),window.localStorage.setItem("access_token",o.data.access_token),m("/recruiter/dashboard")):c.error("Company is not approved."):(c.error("Invalid OTP. Please try again1."),x(2))}catch(o){console.error(o,"err");const _=((w=(N=o.response)==null?void 0:N.data)==null?void 0:w.error)||"Invalid OTP. Please try again.";i(_),c.error(_)}finally{p(!1)}};return d===3?e.jsx(W,{email:h}):e.jsxs(e.Fragment,{children:[e.jsx("style",{children:` 2 .fullscreen-signup { 3 min-height: 100vh; 4 width: 100vw; 5 background: #FDF7F0; 6 display: flex; 7 justify-content: center; 8 align-items: center; 9 position: fixed; 10 top: 0; 11 left: 0; 12 13 } 14 .fullscreen-signup > div { 15 max-width: 450px; 16 width: 100%; 17 margin: auto; 18 } 19 @media (max-width: 600px) { 20 .fullscreen-signup > div { 21 padding: 0 0.5rem; 22 } 23 } 24 `}),e.jsx("div",{className:"fullscreen-signup",children:e.jsxs("div",{children:[e.jsx(T,{totalSteps:3,currentStep:d,stepLabels:["Email","OTP","Company Details"]}),d===1&&e.jsxs("form",{onSubmit:y,style:{background:"#fff",borderRadius:"1.5rem",boxShadow:"0 10px 30px rgba(0,0,0,0.1)",padding:"3rem"},children:[e.jsx("h2",{style:{color:"#055E54",fontWeight:"bold",fontSize:"2.2rem",marginBottom:"2.5rem",textAlign:"center"},children:"Company Sign Up"}),e.jsxs("label",{htmlFor:"email",style:{display:"block",color:"#055E54",fontWeight:"600",marginBottom:"0.8rem",fontSize:"1rem"},children:["Company Email ",e.jsx("span",{style:{color:"#e74c3c"},children:"*"})]}),e.jsx("input",{type:"email",id:"email",name:"email",value:h,onChange:s=>{k(s.target.value),i("")},required:!0,placeholder:"Enter your email",style:{width:"100%",border:`1px solid ${b?"#e74c3c":"#118C7E"}`,borderRadius:"0.75rem",padding:"0.9rem 1.2rem",fontSize:"1rem",marginBottom:"1.2rem",transition:"all 0.2s",outline:"none",boxShadow:"none"},onFocus:s=>{s.target.style.borderColor="#24D366",s.target.style.boxShadow="none"},onBlur:s=>
24{s.target.style.borderColor=b?"#e74c3c":"#118C7E",s.target.style.boxShadow="none"}}),b&&e.jsx("p",{style:{color:"#e74c3c",fontSize:"0.85rem",marginTop:"-0.8rem",marginBottom:"1.5rem"},children:b}),e.jsx("button",{type:"submit",disabled:a,style:{width:"100%",padding:"1.1rem",fontSize:"1.2rem",fontWeight:"600",color:"#fff",background:a?"#ccc":"#24D366",borderRadius:"0.75rem",border:"none",cursor:a?"not-allowed":"pointer",transition:"all 0.3s ease",outline:"none"},children:a?"Sending OTP...":"Send OTP"}),e.jsxs("p",{style:{marginTop:"2rem",textAlign:"center",color:"#7f8c8d",fontSize:"0.95rem"},children:["Already have an account? ",e.jsx("a",{href:"/login",style:{color:"#24D366",textDecoration:"none",fontWeight:"600",transition:"color 0.2s"},onMouseEnter:s=>s.target.style.color="#055E54",onMouseLeave:s=>s.target.style.color="#24D366",children:"Log In here"})]})]}),d===2&&e.jsxs("form",{onSubmit:E,style:{background:"#fff",borderRadius:"1.5rem",boxShadow:"0 10px 30px rgba(0,0,0,0.1)",padding:"3rem"},children:[e.jsx("h2",{style:{color:"#055E54",fontWeight:"bold",fontSize:"2.2rem",marginBottom:"2.5rem",textAlign:"center"},children:"Verify OTP"}),e.jsxs("p",{style:{color:"#118C7E",marginBottom:"1.5rem",textAlign:"center",fontSize:"1rem"},children:["Enter the 4-digit OTP sent to ",e.jsx("b",{style:{color:"#055E54"},children:h})]}),e.jsx("input",{type:"text",inputMode:"numeric",maxLength:6,value:t,onChange:s=>{u(s.target.value),i("")},required:!0,style:{width:"100%",border:`1px solid ${b?"#e74c3c":"#118C7E"}`,borderRadius:"0.75rem",padding:"0.9rem 1.2rem",fontSize:"1.5rem",marginBottom:"1.2rem",letterSpacing:"0.3em",textAlign:"center",transition:"all 0.2s",outline:"none",boxShadow:"none"},onFocus:s=>{s.target.style.borderColor="#24D366",s.target.style.boxShadow="none"},onBlur:s=>{s.target.style.borderColor=b?"#e74c3c":"#118C7E",s.target.style.boxShadow="none"}}),b&&e.jsx("p",{style:{color:"#e74c3c",fontSize:"0.85rem",marginTop:"-0.8rem",marginBottom:"1.5rem"},children:b}),e.jsx("button",{type:"submit",disabled:a,style:{width:"100%",padding:"1.1rem",fontSize:"1.2rem",fontWeight:"600",color:"#fff",background:" #24D366",borderRadius:"0.75rem",border:"none",cursor:a?"not-allowed":"pointer",transition:"all 0.3s ease",outline:"none"},onMouseEnter:s=>{s.target.style.background="#24D366"},onMouseLeave:s=>{s.target.style.background="#24D366"},children:a?"Verifying...":"Verify OTP"}),e.jsx("button",{type:"button",onClick:()=>{x(1),i(""),u("")},style:{marginTop:"1.5rem",background:"none",border:"none",color:"#118C7E",cursor:"pointer",textDecoration:"none",fontWeight:"600",fontSize:"1rem",display:"block",width:"100%",textAlign:"center",transition:"color 0.2s"},onMouseEnter:s=>s.target.style.color="#055E54",onMouseLeave:s=>s.target.style.color="#118C7E",children:"Change Email"})]})]})})]})};export{Q 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.