1import{gq as b,j as e,b as se,c as t,a5 as Ie,ga as Me,gb as Oe,ax as $e,gg as ze,gh as Ze,gi as Ge,aa as ve,ae as R,u as qe,f9 as Te,i as U,br as D,x as Ve,gr as He,cW as Qe,gc as We,a2 as Ye,h as ke,C as Ke,bh as Xe}from"./index-B9q78oLf.js";import{a as es,b as ss,e as ts,S as as,c as ns}from"./pricing-MmMXDyGn.js";import"./index-4bdnOsvc.js";import{D as is}from"./DashboardHeader-XSpBSNYV.js";import{E as ls,l as rs}from"./index-BgdduZBW.js";import{C as cs}from"./CheckoutForm-uUYnKxn0.js";import{R as os}from"./RequestCall-BpSlWghG.js";import"./PhoneNumberInput-CP1XkZ61.js";import"./react-country-flag.esm-CBTvU6qH.js";import"./countryPhoneCodes-CKP6OwhM.js";const ds=["Post Job","Incognito","Jobspace","Candidate Pipeline","AI Matching","Video Resume","avua Secure","Company Profile Page","avua Pool","Talent Pool Profile access","Message Candidates"],us=({countryCode:k})=>{const p=[{name:"Pay Per Use",content:["Pay Per Job","For additional fees","1 Jobspace",b(),b(),b(),"_",b(),"_","_","Recommended Candidates "]},{name:"avua Pool",content:["_","For additional fees","1 Jobspace",b(),"_","_","_",b(),b(),"As per plan","As per plan"]},{name:"avua Plus",content:[3,"_","Unlimited",b(),"_","As per plan",b(),b(),b(),"As per plan","As per plan"]}],x=ds,w=p.map(o=>({...o,content:o.content}));return e.jsxs("div",{className:"mt-12 w-full flex flex-col justify-center items-center mb-7",children:[e.jsx("p",{className:"text-h3 font-poppins text-btnDarkPurple font-[500] text-center",children:"Compare Features"}),e.jsx("div",{className:"mt-12 w-full flex md:justify-center items-center overflow-x-auto",children:e.jsxs("table",{className:"h-[904px]",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"p-2 text-h3 font-poppins w-[299px] text-purpleDark",children:"Features"}),e.jsx("th",{className:"p-2 text-h3 font-poppins w-[299px] text-purpleDark",children:"avua Hire"}),w.slice(1).map((o,h)=>e.jsx("th",{className:"p-2 text-h3 font-poppins w-[350px] text-purple",children:o.name},h))]})}),e.jsx("tbody",{children:x.map((o,h)=>e.jsxs("tr",{children:[e.jsx("td",{className:"border border-borderLight font-poppins text-purpleDark font-[500] text-body1 p-5",children:o}),e.jsx("td",{className:"border border-borderLight text-center font-poppins font-[500] text-purpleDark p-2 text-buttonMd",children:e.jsx("div",{className:"flex justify-center items-center",children:typeof w[0].content[h]=="function"?e.jsx(b,{}):w[0].content[h]})}),w.slice(1).map((P,d)=>e.jsx("td",{className:"border border-borderLight text-center font-poppins font-[500] text-purpleDark p-2 text-buttonMd",children:e.jsx("div",{className:"flex justify-center items-center",children:typeof P.content[h]=="function"?e.jsx(b,{}):P.content[h]})},d))]},h))})]})})]})},ps=({getbillingAddress:k,setIsOpen:p,fetchAddress:x,setIsEdit:w,coutryCode:o})=>{const h=se(n=>n.auth.token),[P,d]=t.useState(null),[r,G]=t.useState(),[J,B]=t.useState([]),m=t.useRef([]),[O,I]=t.useState([]),[T,q]=t.useState(""),[H,Q]=t.useState(!1),[$,W]=t.useState(!1),Y=/\d{2}[A-Z]{5}\d{4}[A-Z]{1}[A-Z\d]{1}[Z]{1}[A-Z\d]{1}/,f=x?.[0],z=ze(n=>ve().shape({company_name:R().required("Company name is required"),country:ve({name:R().required("Country name is required")}),state:ve({name:R().required("State name is required")}),city:R().required("City is required"),pincode:R().required("Pincode is required"),address_line1:R().required("Address Line 1 is required"),gstin:n.country.name==="India"?R().matches(Y,"Invalid GSTIN").required("GSTIN is required"):R()})),s=Ie({initialValues:{company_name:"",country:{id:"",name:"",code:""},state:{id:"",name:""},city:"",pincode:"",address_line1:"",address_line2:"",gstin:""},validationSchema:z,onSubmit:async n=>{te()},enableReinitialize:!0}),te=async()=>{const n={company_name:s.values.company_name,country:s.values.country.name,state:s.values.state.name,city:s.values.city,pincode:s.values.pincode,address_line1:s.values.address_line1,address_line2:s.values.address_line2||"",gstin:s.values.country.name==="India"?s.values.gstin:null};try{if(x?.length<0){const c=await Me(n,h);c.msg==="success"&&k(),console.log(c)}else(await Oe([n],h)).msg==="success"&&(k(),w(!1),p(!1))}catch(c){console.log(c)}},E=async()=>{try{const n=await Ze(r);if(n.data){const c=n.data.filter(M=>M.name.toLowerCase().includes(r.toLowerCase()));B(c)}}catch(n){console.error("Error:",n)}},K=n=>{const c=n.target.value;G(c),Q(!0),s.setFieldValue("country",{id:"",name:c,code:""})},S=n=>{const c=n.target.value,M=m.current.filter(ne=>ne.name.toLowerCase().includes(c.toLowerCase()));I(M),W(!0),s.setFieldValue("state",{id:"",name:c}
1)},X=n=>{s.setFieldValue("state",{id:n.id,name:n.name}),W(!1)},ae=async n=>{s.setFieldValue("country",{id:n.id,name:n.name,code:n.code}),q(n.id);try{const c=await Ge(n.id);m.current=c.data,I(c.data)}catch(c){console.log(c)}Q(!1)};return t.useEffect(()=>{r&&E()},[r]),t.useEffect(()=>{f&&(s.setFieldValue("company_name",f.company_name),s.setFieldValue("country",{id:"",name:f.country,code:""}),s.setFieldValue("state",{id:"",name:f.state}),s.setFieldValue("city",f.city),s.setFieldValue("pincode",f.pincode),s.setFieldValue("address_line1",f.address_line1),s.setFieldValue("address_line2",f.address_line2),s.setFieldValue("gstin",f.gstin))},[f]),e.jsx("div",{className:"fixed flex justify-center datas-center w-screen h-screen backdrop-blur-md z-50",children:e.jsxs("div",{className:"w-[700px] h-fit flex flex-col mt-10 bg-white p-7 rounded-lg shadow-lg",children:[e.jsxs("div",{className:" w-full flex justify-between items-center",children:[" ",e.jsx("p",{className:"text-h4",children:"Billing Address"}),e.jsx($e,{color:"#ff8383",onClick:()=>{p(!1),w(!1)}})]}),e.jsxs("form",{action:"",onSubmit:s.handleSubmit,className:" space-y-6",children:[e.jsxs("div",{className:"w-full mt-2",children:[e.jsx("input",{id:"company_name",name:"company_name",type:"text",className:"border w-full h-[58px] rounded-full pl-6 ",placeholder:"Registered Company Name*",value:s.values.company_name,onChange:s.handleChange,autoComplete:"off"}),s.touched.company_name&&s.errors.company_name?e.jsx("div",{className:" text-caption text-accentError ml-2 mt-1",children:s.errors.company_name}):null]}),e.jsxs("div",{className:"flex w-full space-x-3",children:[e.jsxs("div",{className:" relative w-full",children:[e.jsx("input",{id:"country",name:"country",type:"text",className:" relative border w-full h-[58px] pl-6 rounded-full",placeholder:"Country *",onChange:K,value:s.values.country.name}),s?.touched?.country?.name&&s?.errors?.country?.name?e.jsx("div",{className:"text-caption text-accentError ml-2 mt-1",children:s?.errors?.country?.name}):null,H&&J.length>0&&e.jsx("div",{className:"absolute w-full pl-6 z-10 cursor-pointer mt-1 rounded-md bg-white border border-[#746C80] rounded-b-md shadow-lg max-h-60 overflow-y-scroll",children:J.map((n,c)=>e.jsx("div",{className:"px-4 py-2 cursor-pointer hover:bg-gray-100 border-b",onClick:()=>ae(n),children:n.name},c))})]}),e.jsxs("div",{className:" relative w-full",children:[e.jsx("input",{id:"state",name:"state",type:"text",className:"border w-full h-[58px] pl-6 rounded-full",placeholder:"State *",onChange:S,value:s.values.state.name}),s?.touched?.state?.name&&s?.errors?.state?.name?e.jsx("div",{className:" text-caption text-accentError ml-2 mt-1",children:s?.errors?.state?.name}):null,$&&O.length>0&&e.jsx("div",{className:"absolute w-full pl-6 z-10 cursor-pointer mt-1 rounded-md bg-white border border-[#746C80] rounded-b-md shadow-lg max-h-60 overflow-y-scroll",children:O.map((n,c)=>e.jsx("div",{className:"px-4 py-2 cursor-pointer hover:bg-gray-100 border-b",onClick:()=>X(n),children:n.name},c))})]})]}),e.jsxs("div",{className:"flex w-full space-x-3",children:[e.jsxs("div",{className:"w-full",children:[e.jsx("input",{id:"city",name:"city",type:"text",className:"border w-full h-[58px] pl-6 rounded-full",placeholder:"City *",onChange:s.handleChange,value:s.values.city}),s.touched.city&&s.errors.city?e.jsx("div",{className:" text-caption text-accentError ml-2 mt-1",children:s.errors.city}):null]}),e.jsxs("div",{className:"w-full",children:[e.jsx("input",{id:"pincode",name:"pincode",type:"text",className:"border w-full h-[58px] pl-6 rounded-full",placeholder:"Pin Code *",onChange:s.handleChange,value:s.values.pincode}),s.touched.pincode&&s.errors.pincode?e.jsx("div",{className:" text-caption text-accentError ml-2 mt-1",children:s.errors.pincode}):null]})]}),e.jsxs("div",{className:"flex w-full space-x-3",children:[e.jsxs("div",{className:"w-full",children:[e.jsx("input",{id:"address_line1",name:"address_line1",type:"text",className:"border w-full h-[58px] pl-6 rounded-full",placeholder:"Address Line1 *",onChange:s.handleChange,value:s.values.address_line1}),s.touched.address_line1&&s.errors.address_line1?e.jsx("div",{className:" text-caption text-accentError ml-2 mt-1",children:s.errors.address_line1}):null]}),e.jsx("div",{className:"w-full",children:e.jsx("input",{id:"address_line2",name:"address_line2",type:"text",className:"border w-full h-[58px] pl-6 rounded-full",placeholder:"Address Line2",onChange:s.handleChange,value:s.values.address_line2})})]}),s.values.country.name==="India"&&e.jsxs("div",{className:"w-full",children:[e.jsx("input",{id:"gstin",name:"gstin",type:"text",className:"border w-full h-[58px] pl-6 rounded-full",placeholder:"GST Indentification Number (GSTIN) *",onChange:s.handleChange,value:s.values.gstin}),s.touched.gstin&&s.errors.gstin?e.jsx("div",{className:"text-caption text-accentError ml-2 mt-1",children:s.errors.gstin}):null]}),e.jsx("div",{className:" w-full flex justify-end items-end",children:e.jsx("button",{type:"submit",className:" w-[168px] rounded-full bg-btnDarkPurple",children:e.jsx("p",{className:"p-2 text-recordingbackground",children:x?"Update":"Submit"})})})]})]})})},xs=rs("pk_live_51QnuSFRumP9oXDfxACHZV4ueTwOx42iYdBhlyr30sFRfZL8vV5GEVvKZ0IRhAhCQEBD2as3rIAAoj2QRDuYuz9pH00aFrkE6Tk"),ms=({setStep:k,cardType:p,Quntity:x,mainValue:w,geoData:o,discount:h,cardTitle:P,product:d})=>{const r=se(i=>i.auth.token),[G,J]=t.useState(!1),[B,m]=t.useState(null),[O,I]=t.useState(!1),[T,q]=t.useState(""),[H,Q]=t.useState(""),[$,W]=t.useState(!1),[Y,f]=t.useState(""),[z,s]=t.useState({id:"",discount:0}),[te,E]=t.useState(B===null),[K,S]=t.useState(!1),[X,ae]=t.useState(""),[n,c]=t.useState(!1);qe();const[M,ne]=t.useState(!1);t.useEffect(()=>{const i=()=>{ne(window.innerWidth<=768)};return i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[]);const we=()=>{q(""),J(!0)},Se=async()=>{try{const i=await ss(H,r);i.msg==="sucess"&&(s({id:i.data.id,discount:i.data.discount}),W(!0))}
1catch(i){i.response.data.msg.err&&f("coupon is not valid")}},F=Ie({initialValues:{firstName:"",lastName:"",email:"",phoneNumber:"",cid:"",country_code:""},onSubmit:i=>{console.log("form submitted"),console.log(i)}}),_e=()=>{k("pricing-page"),window.location.reload()},Ce=async()=>{try{const y=(await Qe(r)).data.data;F.setValues({...F.values,firstName:y?.first_name||"",lastName:y?.last_name||"",phoneNumber:y?.phone?.ph_number||"",cid:y?.phone?.cid||"",country_code:y?.phone?.country_code||"",email:y?.email||""})}catch{console.log("error fetching profile")}},g=async()=>{try{const i=await We(r);i?.data?.length===0?m(null):m(i.data)}catch(i){console.log(i),m(null)}},Pe=()=>{I(!0)};let me=Math.round(h*(z.discount/100));const ee=Math.floor(h-me),ie=Math.round(ee*.18);let fe=o==="IN"?ee+ie:ee;return t.useEffect(()=>{Ce(),g()},[]),t.useEffect(()=>{(async()=>{const i={products:p==="avua Plus"?[{id:d.product1.id,base_price:d.product1.base_price,quantity:d.product1.quantity,discount:d?.product1?.discount?d?.product1?.discount:0},{id:d.product2.id,base_price:d.product2.base_price,quantity:d.product2.quantity,discount:d?.product2?.discount?d?.product2?.discount:0}]:[{id:d.id,base_price:d.base_price,quantity:d.quantity,discount:d?.discount?d?.discount:0}],currency_id:p==="avua Plus"?d.product1.currency_id:d.currency_id,country_code:o==="IN"?o:"US",coupon_id:z.id?z.id:null,is_avua_plus:p==="avua Plus"?!0:null};try{const y=await es(i,r);console.log("CREATE ORDER RESPONSE",y.data),ae(y.data.client_secret)}catch(y){console.log("Error fetching create Profile:",y)}})()},[]),e.jsxs("div",{className:"w-full h-full flex flex-col md:flex-row items-center",children:[e.jsx("div",{className:"w-full md:w-1/2 md:h-screen bg-[#2B1845] flex flex-col items-center",children:e.jsx("div",{className:"w-full p-7 md:flex justify-center",children:e.jsxs("div",{className:"flex flex-col space-y-3",children:[e.jsxs("div",{className:"flex space-x-2 mt-20",children:[e.jsx(Te,{onClick:_e,color:"#B8B8B8"}),e.jsx("img",{src:U.pricing.avua_prising_logo,alt:""})]}),e.jsx("p",{className:"text-h5 font-poppins text-[#B8B8B8] font-[500]",children:p}),e.jsxs("div",{className:"flex items-center text-white2 space-x-2",children:[e.jsx("p",{className:"text-h2",children:p==="avua Plus"?"":x}),e.jsx("p",{className:"w-auto h-auto text-center font-poppins text-subtitle1 text-[#B8B8B8]",children:p==="Pay Per Use"?"Job Credits":p==="avua Pool"?" Profile Veiws":""})]}),e.jsxs("div",{className:"flex space-x-5",children:[e.jsx("div",{className:"flex-wrap h-fit mt-2",children:e.jsx("img",{src:U.pricing.avua_prising_logo,alt:""})}),e.jsx("div",{className:" w-full md:w-[328px] flex justify-between text-white2 md:flex-row",children:e.jsxs("div",{className:"flex flex-col",children:[p==="Pay Per Use"&&e.jsxs("div",{className:" w-full md:w-[328px] flex justify-between text-white2 md:flex-row",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx("p",{children:P}),e.jsxs("p",{className:"text-[#B8B8B8]",children:[o==="IN"?"â¹":"$",w," Ã ",x," Qty"]})]}),o==="IN"?"â¹":"$"," ","",h]}),p==="avua Pool"&&e.jsxs("div",{className:" w-full md:w-[328px] flex justify-between text-white2 md:flex-row",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx("p",{children:P}),e.jsxs("p",{className:"text-[#B8B8B8]",children:[x," Qty"]})]}),o==="IN"?"â¹":"$",h]}),p==="avua Plus"&&e.jsxs("div",{className:" w-full md:w-[328px] flex justify-between text-white2 md:flex-row",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx("p",{children:P}),e.jsx("p",{className:"text-[#B8B8B8]",children:x})]}),o==="IN"?"â¹":"$",h]}),e.jsx("img",{src:U.pricing.drop_down,alt:"drop_down",className:"h-3 w-3",onClick:()=>S(!K)}),K&&e.jsxs("div",{className:"w-full h-[34px] bg-white rounded-full flex justify-between items-center mt-1 px-1",children:[e.jsx("input",{type:"text",onChange:i=>{Q(i.target.value),f("")},className:"focus:outline-none px-2 text-[#263238] placeholder:text-[#263238] text-caption font-poppins",placeholder:"Add promocode"}),$?e.jsxs("div",{className:"mr-6",children:[" ",e.jsx(D,{color:"#06B002"})]}):e.jsx("button",{onClick:Se,className:" bg-[#2B1845] w-[72px] h-[28px] rounded-full",children:e.jsx("p",{className:"",children:"Apply"})})]}),Y&&e.jsx("p",{className:" font-poppins mt-2 text-caption",children:Y})]})})]}),e.jsx("div",{className:"w-full md:w-[328px] border border-[#B8B8B8] flex justify-center items-center md:ml-12"}),e.jsxs("div",{className:"w-full md:w-[328px] flex justify-between text-white2 md:ml-[50px]",children:[e.jsxs("div",{className:"flex flex-col",children:[$&&e.jsx("p",{children:"Promo code discount"}),e.jsx("p",{children:"Subtotal"}),e.jsx("p",{children:o==="IN"?"GST 18%":""})]}),e.jsxs("div",{className:"flex flex-col",children:[$&&e.jsxs("p",{className:"pl-5",children:[o==="IN"?"â¹":"$"," ","",me]}),e.jsxs("p",{className:"pl-5",children:[o==="IN"?"â¹":"$"," ","",ee]}),o==="IN"?e.jsxs("p",{className:"text-[#B8B8B8] ml-5",children:[" ",o==="IN"?"â¹":"$"," ",ie]}):e.jsx(e.Fragment,{})]})]}),e.jsx("div",{className:"w-full md:w-[328px] border border-[#B8B8B8] flex justify-center items-center md:ml-12"}),e.jsxs("div",{className:"w-full md:w-[328px] flex justify-between text-white2 md:ml-[50px]",children:[e.jsx("div",{className:"flex flex-col",children:e.jsx("p",{children:"Total"})}),e.jsx("div",{className:"flex flex-col",children:e.jsxs("p",{children:[o==="IN"?"â¹":"$"," ","",fe]})})]})]})})}),e.jsxs("div",{className:"w-full md:w-1/2 h-screen bg-white2 flex flex-row items-center overflow-y-auto",children:[e.jsx(Ve.div,{initial:{width:"100%"},animate:{width:n?"0%":"100%",padding:n?"0":M?"1rem":"7rem"},transition:{type:"tween",duration:.5},className:" w-full flex flex-col justify-center items-center ",children:!n&&e.jsxs("div",{className:" w-fit h-full space-y-7 flex flex-col justify-start items-start p-9",children:[e.jsx("p",{className:" font-[500] text-h4 text-[#5C5C5C]",children:"It's Almost Done..."}),e.jsxs("div",{className:" w-full flex space-x-2 mt-6",children:[e.jsx("input",{className:`w-[80%] h-[58px] border border-[#B8B8B8] rounded-full p-4 focus:outline-none 2`,type:"text",placeholder:"First Name ",name:"firstName",value:F.values.firstName,readOnly:!0,onClick:i=>i.target.blur()}),e.jsx("input",{className:`w-[80%] h-[58px] border border-[#B8B8B8] rounded-full p-4 focus:outline-none 3`,type:"text",placeholder:"last Name",name:"lastName",value:F.values.lastName,readOnly:!0})]}),e.jsx("input",{type:"text",className:"w-[100%] h-[58px] border border-[#B8B8B8] rounded-full p-3 focus:outline-none",placeholder:"Phone Number",name:"phoneNumber",value:`${F.values.country_code||""} ${F.values.cid||""} ${F.values.phoneNumber||""}`,readOnly:!0}),e.jsx("input",{type:"email",className:"w-[100%] h-[58px] border border-[#B8B8B8] rounded-full p-3 focus:outline-none",placeholder:"Email",n
3ame:"email",value:F.values.email,readOnly:!0}),e.jsx("div",{className:"w-full border border-grayLight "}),B===null&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{onClick:we,className:" flex",children:[e.jsxs("button",{className:"flex justify-center items-center space-x-2",children:[e.jsx("p",{children:" Add Billing Address"}),e.jsx(He,{})]}),e.jsx("span",{className:" text-accentError pb-5",children:"*"})]}),e.jsx("p",{className:" text-accentError text-caption font-poppins mt-3",children:T})]}),B!==null&&e.jsx("div",{className:" w-full flex flex-col",children:B.map((i,y)=>e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"font-[500] text-subtitle1 text-[#5C5C5C]",children:"Billing Address"}),e.jsxs("div",{className:" relative md:w-[474px] h-fit flex flex-col rounded-md bg-fr shadow-lg mt-3 p-6",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("p",{className:" font-poppins font-[500] text-h5 text-[#2E2E2E]",children:i.company_name}),e.jsxs("div",{className:" absolute flex flex-col right-3 justify-center items-center cursor-pointer",children:[e.jsx("img",{className:" cursor-pointer",src:U.jobspace.moreIcon,alt:"",onClick:Pe}),O&&e.jsxs("div",{className:" flex bg-white p-2 cursor-pointer mt-1",onClick:()=>J(!0),children:[e.jsx("img",{src:U.jobspace.editIcon,className:"mr-2"}),e.jsx("p",{children:"Edit"})]})]})]}),e.jsxs("div",{className:" font-poppins text-subtitle1 text-[#8A8A8A]",children:[e.jsx("p",{children:i.address_line1}),e.jsx("p",{children:i.address_line2}),e.jsx("p",{children:`${i.city}, ${i.state}, ${i.country}`}),e.jsx("p",{children:i.pincode}),e.jsx("p",{children:i.gstin}),e.jsx("p",{className:" text-accentError text-caption font-poppins mt-3",children:T})]})]},y)]}))}),e.jsx("div",{className:"w-full flex justify-end cursor-pointer",onClick:()=>{if(!B?.length){q("Billing address is required");return}c(!0)},children:e.jsx("div",{className:" bg-[#ffffff] p-[10px] rounded-full shadow-lg ",children:e.jsx("img",{className:"w-[24px] h-[24px]",src:U?.Dashboard?.arrowRight})})})]})}),n&&e.jsx(Ve.div,{initial:{width:"100%"},animate:{width:n?"100%":"0",padding:n?M?"2rem":"7rem":"0"},transition:{type:"tween",duration:.5},className:" w-full md:w-1/2 h-screen flex flex-col justify-center items-center ",children:e.jsx("div",{className:"w-full",children:!!X?.length&&e.jsx(ls,{stripe:xs,options:{clientSecret:X},children:e.jsx(cs,{setCardDetailsScreen:c})})})})]}),G&&e.jsx("div",{className:"fixed flex justify-center items-center w-screen h-screen backdrop-blur-md z-50",children:e.jsx(ps,{getbillingAddress:g,setIsOpen:J,fetchAddress:B,isOpen:G,setIsEdit:I,coutryCode:o})})]})},_s=()=>{const k=se(a=>a.auth.token),p=se(a=>a.employerProfileData.is_international),[x,w]=t.useState(null),[o,h]=t.useState(),[P,d]=t.useState("pricing-page"),[r,G]=t.useState(""),[J,B]=t.useState(""),[m,O]=t.useState(),[I,T]=t.useState(),[q,H]=t.useState(),[Q,$]=t.useState(1),[W,Y]=t.useState(""),[f,z]=t.useState(!1),[s,te]=t.useState(""),[E,K]=t.useState(!0),[S,X]=t.useState(!1),[ae,n]=t.useState(!1),[c,M]=t.useState(1),[ne,we]=t.useState(1),[Se,F]=t.useState(!1),[_e,Ce]=t.useState("Premium"),[g,Pe]=t.useState(!1),[me,ee]=t.useState(1),ie=se(a=>a.employerProfileData),fe=qe();Ye();const[i,y]=t.useState(!1),[Ee,Be]=t.useState(!1),[Fe,he]=t.useState(!1);if(!ie.isAdmin){fe("/employer/dashboard");return}const[le,Ae]=ke.useState({views:100,base_price:0,quantity:1,currency_id:"",id:""}),[_,ye]=t.useState({id:"",StandardSliderValue:1,mainValue:0,discountedValue:0,quantity:1,discount:0,currency:"",code:""}),[C,je]=t.useState({id:null,mainValue:0,discountedValue:0,quantity:1,currency:"",code:"",BasicSliderValue:1,discount:0}),[A,ge]=t.useState({id:"",isChecked:!1,IncogSliderValue:1,mainValue:0,discountedValue:0,quantity:1,discount:20,currency:"",code:""}),[Z,be]=ke.useState({pool1:{id:"",base_price:"",views:50,quantity:0,currency_id:""},pool2:{id:"",base_price:"",views:100,quantity:0,currency_id:""},pool3:{id:"",base_price:"",views:300,quantity:0,currency_id:""}}),De=async()=>{const a=p===null||p?"US":"IN";try{const l=(await ns(k,a)).data,V=l?.find(j=>j.description.includes("pool_1")),N=l.find(j=>j.description.includes("pool_2")),v=l.find(j=>j.description.includes("pool_3"));V&&be(j=>({...j,pool1:{id:V.id,base_price:V.pricing.base_price,views:parseInt(V.description.split(",")[1].trim().split(" ")[0]),quantity:0,currency_id:V.pricing.currency.id}})),N&&be(j=>({...j,pool2:{id:N.id,base_price:N.pricing.base_price,views:parseInt(N.description.split(",")[1].trim().split(" ")[0]),quantity:0,currency_id:N.pricing.currency.id}})),v&&be(j=>({...j,pool3:{id:v.id,base_price:v.pricing.base_price,views:parseInt(v.description.split(",")[1].trim().split(" ")[0]),quantity:0,currency_id:v.pricing.currency.id}})),console.log(Z.pool3.base_price,"***********************"),Ae({views:parseInt(V.description.split(",")[1].trim().split(" ")[0]),base_price:V.pricing.base_price,quantity:1,currency_id:V.pricing.currency.id,id:V.id})}catch(u){console.log(u)}},Le={id:g?C.id:S?A.id:_.id,base_price:g?q:S?I:m,quantity:g?C.quantity:S?A.quantity:_.quantity,discount:g?C.discount:S?A.discount:_.discount,currency_id:g?C.currency:S?A.currency:_.currency};let L=I,re=L*.9,ce=L*.8;x!=="IN"&&(L=I,re=Math.round(L*(1-.2512563)),ce=Math.round(L*(1-.502513)));let oe=q,de=oe*.9,ue=oe*.8;x!=="IN"&&(de=Math.round(q*(1-.2512563)),ue=Math.round(q*(1-.502513)));let pe=m*.9,xe=m*.8;x!=="IN"&&(pe=Math.round(m*(1-.2512563)),xe=Math.round(m*(1-.502513)));const Re=async()=>{const a=p===null||p?"US":"IN";try{n(!0),w(a),te(a);const[u,l,V]=await Promise.all([ts(a,k),as(a,k),De()]);if(u.msg==="success"){console.log(u.data);
3const N=u?.data?.filter(j=>!j.incognito),v=u?.data?.filter(j=>j.incognito);O(N[0]?.pricing?.base_price),T(v[0]?.pricing?.base_price),B(u.data),ye({id:N[0].id,mainValue:N[0]?.pricing?.base_price,discountedValue:N[0]?.pricing?.base_price,quantity:1,currency:N[0]?.pricing?.currency?.id,code:N[0]?.pricing?.currency?.code,StandardSliderValue:1}),ge({id:v[0].id,IncogSliderValue:1,mainValue:v[0]?.pricing?.base_price,discountedValue:v[0]?.pricing?.base_price,quantity:1,currency:v[0]?.pricing?.currency?.id,code:v[0]?.pricing?.currency?.code})}l.msg==="success"&&(H(l.data[0]?.pricing?.base_price),je({id:l.data[0].id,mainValue:l.data[0]?.pricing?.base_price,discountedValue:l.data[0]?.pricing?.base_price,quantity:1,currency:l.data[0]?.pricing?.currency?.id,code:l.data[0]?.pricing?.currency?.code,BasicSliderValue:1}))}catch(u){console.error("Error fetching geo data and employer products:",u)}finally{n(!1)}};t.useCallback(a=>{E&&(ye(u=>{let l={...u};return a===0||a===1?l={...l,mainValue:m,discountedValue:m,quantity:1,StandardSliderValue:1,discount:0}:a===5?l={...l,mainValue:pe,discountedValue:pe*a,quantity:5,StandardSliderValue:5,discount:10}:a===10&&(l={...l,mainValue:xe,discountedValue:xe*a,quantity:10,StandardSliderValue:10,discount:20}),l}),console.log("NOR VALUE:",_))},[E,ye,m,pe,xe]),t.useCallback(a=>{S&&(ge(u=>{let l={...u};return a===0||a===1?l={...l,mainValue:L,discountedValue:L*1,quantity:1,IncogSliderValue:1,discount:0}:a===5?l={...l,mainValue:re,discountedValue:re*a,quantity:5,IncogSliderValue:5,discount:10}:a===10&&(l={...l,mainValue:ce,discountedValue:ce*a,quantity:10,discount:20,IncogSliderValue:10}),console.log("Update Incognito Values:",l),l}),console.log("INCO VALUE:",A))},[S,ge,L,re,ce]),t.useCallback(a=>{g&&(je(u=>{let l={...u};return a===0||a===1?l={...l,mainValue:oe,discountedValue:oe*1,quantity:1,BasicSliderValue:1,discount:0}:a===5?l={...l,mainValue:de,discountedValue:de*a,quantity:5,BasicSliderValue:5,discount:10}:a===10&&(l={...l,mainValue:ue,discountedValue:ue*a,quantity:10,discount:20,BasicSliderValue:10}),console.log("Update Basic Values:",l),l}),console.log("INCO VALUE:",C))},[g,je,C,de,ue]);const Ne=(a,u)=>a==="IN"?u===5?10:u===10?20:0:u===5?25:u===10?50:0;Ne(x,_.StandardSliderValue),Ne(x,C.BasicSliderValue),Ne(x,A.IncogSliderValue);const Ue={product1:{views:100,base_price:m,quantity:3,currency_id:_.currency,id:_.id},product2:{views:300,base_price:Z.pool2.base_price,quantity:1,currency_id:Z.pool2.currency_id,id:Z.pool2.id}},Je=()=>{let a=null;return x==="IN"?(a=m*3+Z.pool2.base_price,a=a*.8,a):(a=m*3+Z.pool2.base_price,a=a*(1-.077),a=Math.round(a),a)};return t.useEffect(()=>{Re()},[]),console.log(C),e.jsxs(e.Fragment,{children:[P==="pricing-page"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"w-full flex flex-col justify-center items-center mb-12",children:[e.jsx(is,{employerHeader:!0}),e.jsxs("div",{className:"w-full sm:w-[85%] flex flex-col justify-center items-center gap-1 bg-[#F8F9FE] md:mx-[40px] p-6 md:px-[10%]",children:[e.jsx("p",{className:"md:text-h2 text-h3 text-center font-poppins font-[700] text-[#2E2E2E] mt-9 p-4",children:"Find your next great hire at avua"}),e.jsx("p",{className:"text-[16px] text-center text-[#7B7B7B] font-[400] mb-[28px]",children:"Every organization has unique hiring needs. Connect with our sales team to explore how avua can support your recruitment goals."}),e.jsx("div",{className:"w-full border-[12px] md:border-[40px] rounded-[20px] border-[#F4EDFF] bg-[#F4EDFF] min-h-[380px] mb-[20px] sm:mb-[80px]",children:e.jsxs("div",{className:"bg-white rounded-[10px] w-full p-4 md:p-[40px] rounded-[10px]",children:[e.jsxs("div",{className:"w-full flex justify-between items-center mb-[20px] flex-col md:flex-row",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-poppins font-[500] text-[32px] pb-[5px] leading-[120%]",children:"For tailored hiring solution"}),e.jsx("p",{className:"font-poppins font-[400] text-[14px] text-[#7B7B7B]",children:"Our sales team is here to help you optimize your recruitment process."})]}),e.jsx("div",{className:"hidden md:inline-block",children:e.jsx("button",{onClick:()=>{y(!0),he(!0)},className:"font-[600] text-[16px] font-poppins px-[20px] py-[10px] md:px-[40px] md:py-[18px] rounded-[20px]",style:{color:"#ffffff",border:"none",background:"linear-gradient(to right, #864EFF, #502F99)"},children:"Contact Sales"})})]}),e.jsx("hr",{className:"border-[#D9D9D9] hidden md:block"}),e.jsx("p",{className:"text-[14px] font-[600] mt-[20px] mb-[10px]",children:"What's included?"}),e.jsxs("div",{className:"flex justify-between md:flex-row flex-col",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex gap-[10px] items-center my-[5px]",children:[e.jsx(D,{style:{color:"#2B1845",width:"10px"}}),e.jsx("p",{className:"font-poppins font-[400] text-[14px] text-[#2B1845]",children:"Advertise job openings"})]}),e.jsxs("div",{className:"flex gap-[10px] items-center my-[5px]",children:[e.jsx(D,{style:{color:"#2B1845",width:"10px"}}),e.jsx("p",{className:"font-poppins font-[400] text-[14px] text-[#2B1845]",children:"Utilize a specialized industry database"})]}),e.jsxs("div",{className:"flex gap-[10px] items-center my-[5px]",children:[e.jsx(D,{style:{color:"#2B1845",width:"10px"}}),e.jsx("p",{className:"font-poppins font-[400] text-[14px] text-[#2B1845]",children:"Connect with pre-screened candidates"})]}),e.jsxs("div",{className:"flex gap-[10px] items-center my-[5px]",children:[e.jsx(D,{style:{color:"#2B1845",width:"10px"}}),e.jsx("p",{className:"font-poppins font-[400] text-[14px] text-[#2B1845]",children:"Conduct AI-powered interviews"})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex gap-[10px] items-center md:my-[5px]",children:[e.jsx(D,{style:{color:"#2B1845",width:"10px"}}),e.jsx("p",{className:"font-poppins font-[400] text-[14px] text-[#2B1845]",children:"Tap into our exclusive talent pool"})]}),e.jsxs("div",{className:"flex gap-[10px] items-center my-[5px]",children:[e.jsx(D,{style:{color:"#2B1845",width:"10px"}}),e.jsx("p",{className:"font-poppins font-[400] text-[14px] text-[#2B1845]",children:"Leverage innovative AI recruitment tools"})]}),e.jsxs("div",{className:"flex gap-[10px] items-center my-[5px]",children:[e.jsx(D,{style:{color:"#2B1845",width:"10px"}}),e.jsx("p",{className:"font-poppins font-[400] text-[14px] text-[#2B1845]",children:"Benefit from patented AI matching technology"})]}),e.jsxs("div",{className:"flex gap-[10px] items-center my-[5px]",children:[e.jsx(D,{style:{color:"#2B1845",width:"10px"}}),e.jsx("p",{className:"font-poppins font-[400] text-[14px] text-[#2B1845]",children:"Streamline hiring with cutting-edge automation"})]})]}),e.jsx("div",{className:"md:hidden",children:e.jsx("button",{onClick:()=>{y(!0),he(!0)},className:"font-[600] text-[16px] font-poppins px-[20px] py-[10px] rounded-[35px] my-[20px]",style:{color:"#ffffff",border:"none",background:"linear-gradient(to right, #864EFF, #502F99)"},children:"Contact Sales"})})]})]})})]}),e.jsx(us,{countryCode:s})]}),e.jsx(Ke,{})]}),P==="payment-page"&&e.jsx(e.Fragment,{children:e.jsx(ms,{setStep:d,cardType:r,discount:r==="Pay Per Use"?f?A.discountedValue:E?_.discountedValue:g?C.discountedValue:"":r==="avua Pool"?le.base_price:r==="avua Plus"?`${Je()}`:"",mainValue:r==="Pay Per Use"?f?A.mainValue:E?_.mainValue:g?C.mainValue:"":r==="avua Pool"?le.base_price:r==="avua Plus"?"avua plus Mainvalue":"",geoData:x,Quntity:r==="Pay Per Use"?f?A.quantity:E?_.quantity:g?C.quantity:"":r==="avua Pool"?le.views:"",cardTitle:r==="Pay Per Use"?f?"Incognito Jobs":E?"Premium job":g?"Basic job":"":r==="avua Pool"?"avua Pool":r==="avua Plus"?"avua Plus":"",product:r==="avua Pool"?le:r==="Pay Per Use"?Le:r==="avua Plus"?Ue:null})}),e.jsx(Xe,{}),i&&e.jsx(os,{setIsRequestCallClick:y,isPricingPageButton:Fe,setIsPricingPageButton:he,setIsFormSubmited:Be}),Ee&&e.jsx("div",{className:"fixed top-0 bottom-0 left-0 right-0 backdrop-blur-md flex justify-center items-center shadow-lg z-50 px-5",children:e.jsxs("div",{className:"bg-white shadow-lg rounded-[20px] w-full md:w-[499px] px-[60px] py-[40px] flex flex-col justify-center items-center gap-[30px] relative",children:[e.jsx("img",{src:U.verify.x_circle,alt:"",className:"absolute right-2 md:w-[725] top-3 cursor-pointer",onClick:()=>Be(!1)}),e.jsx("img",{src:U.verify.Vetting_check,alt:"",className:"h-[55px] w-[55px]"}),e.jsxs("div",{className:"flex flex-col gap-[10px]",children:[e.jsx("p",{className:"text-[#1B1B1B] font-poppins font-[500] text-[23px] leading-[27.6px] text-center",children:"Request sent"}),e.jsx("p",{className:"text-[#7B7B7B] font-poppins font-[400] text-[16px] leading-[24px]",children:"Our team will reach out to you soon"})]})]})})]})};export{_s as default};
4//# sourceMappingURL=Pricing-DuTctCrP.js.map
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.