1import{c as k,r,k as b,j as e,A as N,L as v,m as w,a as S,s as C}from"./index-BkHgB4vv.js";import{F as E}from"./category-page-DhMRXHJ0.js";import{T as M}from"./tool-next-step-Cc2oUhmB.js";import{S as L}from"./inline-contact-DkX8KXix.js";import{C as R}from"./copy-C7Ky4oXG.js";import"./brief-form-CtlFke9F.js";const $=[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]],G=k("calculator",$);function F(){const[n,d]=r.useState("mexico"),[a,x]=r.useState(3500),[c,u]=r.useState(12),[f,m]=r.useState(!1),s=b.find(t=>t.countrySlug===n)??b[0],i=r.useMemo(()=>{const t=a*(s.employerBurdenPct/100),p=a*s.thirteenthMonths/12,l=a+t+p,y=l*(c/100),j=l+y;return{contributions:t,thirteenth:p,eor:y,total:j,annual:j*12}},[a,s,c]),o=t=>t.toLocaleString("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0});function h(){if(typeof navigator>"u")return;const t=`<a href="${w}">Global Hiring Cost Calculator</a>, free tool by Gracemark`;navigator.clipboard?.writeText(t)}return e.jsxs("div",{className:"min-h-screen bg-ivory",children:[e.jsx(L,{}),e.jsxs("main",{id:"main",className:"max-w-5xl mx-auto px-6 py-16",children:[e.jsxs("div",{className:"mb-4 inline-flex items-center gap-2 rounded-full bg-terracotta/10 px-3 py-1 text-xs uppercase tracking-widest text-terracotta font-semibold",children:[e.jsx(G,{className:"size-3.5"})," Free tool"]}),e.jsx("h1",{className:"text-4xl md:text-5xl font-display text-ink",children:"Global hiring cost calculator"}),e.jsx("p",{"data-speakable":!0,className:"mt-4 text-xl text-ink/80 max-w-2xl",children:"The true employer cost of hiring in 16+ countries: gross salary, statutory contributions, 13th-month pay, and a typical EOR fee. Instant, no signup."}),e.jsxs("div",{className:"mt-10 grid md:grid-cols-[1fr_1fr] gap-6",children:[e.jsxs("section",{className:"rounded-xl border border-ink/10 bg-white p-6",children:[e.jsx("h2",{className:"font-display text-lg text-ink mb-4",children:"Inputs"}),e.jsxs("label",{className:"block mb-4",children:[e.jsx("span",{className:"text-xs uppercase tracking-widest text-ink/60 font-semibold",children:"Country"}),e.jsx("select",{value:n,onChange:t=>d(t.target.value),className:"mt-1.5 w-full rounded-md border border-ink/15 bg-ivory px-3 py-2.5 text-sm text-ink focus:border-terracotta outline-none",children:b.map(t=>e.jsxs("option",{value:t.countrySlug,children:[t.flag," ",t.country]},t.countrySlug))})]}),e.jsxs("label",{className:"block mb-4",children:[e.jsx("span",{className:"text-xs uppercase tracking-widest text-ink/60 font-semibold",children:"Gross monthly salary (USD)"}),e.jsx("input",{type:"number",min:500,max:5e4,step:100,value:a,onChange:t=>x(Math.max(0,Number(t.target.value)||0)),className:"mt-1.5 w-full rounded-md border border-ink/15 bg-ivory px-3 py-2.5 text-sm text-ink focus:border-terracotta outline-none font-mono"}),e.jsx("input",{type:"range",min:500,max:15e3,step:100,value:Math.min(a,15e3),onChange:t=>x(Number(t.target.value)),className:"mt-2 w-full accent-terracotta"})]}),e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"text-xs uppercase tracking-widest text-ink/60 font-semibold",children:"EOR service fee (%)"}),e.jsx("input",{type:"range",min:0,max:20,step:1,value:c,onChange:t=>u(Number(t.target.value)),className:"mt-2 w-full accent-terracotta"}),e.jsxs("div",{className:"mt-1 text-sm font-mono text-ink/70",children:[c,"% (typical: 8â15%)"]})]})]}),e.jsxs("section",{className:"rounded-xl border border-ink/10 bg-ink text-ivory p-6",children:[e.jsxs("h2",{className:"font-display text-lg text-ivory/80 mb-4",children:["Estimated all-in cost, ",s.flag," ",s.country]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("div",{className:"text-xs uppercase tracking-widest text-ivory/50",children:"Per month"}),e.jsx("div",{className:"font-display text-5xl mt-1",children:o(i.total)}),e.jsxs("div",{className:"text-sm text-ivory/60 mt-1",children:["â ",o(i.annual)," / year"]})]}),e.jsxs("dl",{className:"space-y-2 text-sm",children:[e.jsx(g,{label:"Gross salary",value:o(a)}),e.jsx(g,{label:`Employer contributions (${s.employerBurdenPct}%)`,value:o(i.contributions)}),s.thirteenthMonths>0&&e.jsx(g,{label:`${s.thirteenthMonths===2?"13th & 14th":"13th"}-month accrual`,value:o(i.thirteenth)}),e.jsx(g,{label:`EOR service fee (${c}%)`,value:o(i.eor)}),e.jsxs("div",{className:"pt-2 border-t border-ivory/10 flex justify-between font-display text-base",children:[e.jsx("span",{children:"Total employer cost"}),e.jsx("span",{children:o(i.total)})]})]}),e.jsxs("div",{className:"mt-6 flex flex-wrap gap-3",children:[e.jsxs("button",{onClick:()=>m(!0),className:"inline-flex items-center gap-2 rounded-md bg-terracotta px-4 py-2.5 text-sm font-semibold text-ivory hover:opacity-90",children:["Get a role-specific quote ",e.jsx(N,{className:"size-4"})]}),e.jsxs("button",{onClick:h,className:"inline-flex items-center gap-2 rounded-md border border-ivory/30 px-4 py-2.5 text-sm font-semibold text-ivory hover:bg-ivory/10",children:[e.jsx(R,{className:"size-4"})," Copy embed link"]})]})]})]}),f&&e.jsx(T,{country:s.country,gross:a,onClose:()=>m(!1)}),e.jsxs("section",{className:"mt-16",children:[e.jsx("h2",{className:"font-display text-2xl text-ink mb-4",children:"How the calculation works"}),e.jsx("p",{className:"text-ink/70 max-w-3xl",children:"We start from your gross monthly salary, add each country's statutory employer contributions (pension, health, unemployment), accrue any 13th/14th-month pay, then add a typical EOR service fee. The result is the actual amount you'll spend to employ someone in that country each month, c
1ompliantly and without opening an entity."}),e.jsx("p",{className:"mt-4 max-w-3xl text-sm text-ink/60",children:"Basis and date: statutory employer contribution rates and 13th month rules held in our country dataset, reviewed by the Gracemark workforce team in September 2026. Figures are indicative estimates in USD for comparison between markets, not a quote. Rates change, so we confirm the current position for your specific role and country before you commit."})]}),e.jsxs("section",{className:"mt-12",children:[e.jsx("h2",{className:"font-display text-2xl text-ink mb-6",children:"Explore each country in depth"}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:b.map(t=>e.jsxs(v,{to:"/cost-to-hire-in/$country",params:{country:t.countrySlug},className:"rounded-md border border-ink/10 bg-white px-3 py-2.5 text-sm text-ink hover:border-terracotta hover:text-terracotta",children:[t.flag," ",t.country," ",e.jsx("span",{className:"text-ink/40 text-xs",children:"â"})]},t.countrySlug))})]})]}),e.jsx(M,{current:"/cost-calculator"}),e.jsx(E,{})]})}function g({label:n,value:d}){return e.jsxs("div",{className:"flex justify-between text-ivory/80",children:[e.jsx("span",{children:n}),e.jsx("span",{className:"font-mono",children:d})]})}function T({country:n,gross:d,onClose:a}){const[x,c]=r.useState(""),[u,f]=r.useState(""),[m,s]=r.useState(!1),[i,o]=r.useState(!1),[h,t]=r.useState("");async function p(l){if(l.preventDefault(),m)return;s(!0),t("");const y=await C({name:u,email:x,countries:n,outcome:`Hire in ${n}`,source:"cost-calculator",segment:"calculator",notes:`Calculator: ${n}, gross ~$${d}/mo`});s(!1),y?o(!0):t("That didn't go through. Please try again, or email [email protected].")}return e.jsx("div",{className:"mt-8 rounded-xl border border-terracotta/30 bg-white p-6 md:p-8",children:i?e.jsxs("div",{children:[e.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-terracotta/10 text-terracotta mb-3",children:e.jsx(S,{className:"size-5"})}),e.jsx("p",{className:"font-display text-lg text-ink",children:"On its way."}),e.jsxs("p",{className:"text-sm text-ink/70 mt-1",children:["A ",n," specialist will send you a full role-specific breakdown within 1 business day."]})]}):e.jsxs("form",{onSubmit:p,className:"grid md:grid-cols-[1fr_1fr_auto] gap-3",children:[e.jsx("input",{type:"text",placeholder:"Your name",value:u,onChange:l=>f(l.target.value),maxLength:120,className:"rounded-md border border-ink/15 bg-ivory px-3 py-2.5 text-sm text-ink outline-none focus:border-terracotta"}),e.jsx("input",{type:"email",required:!0,placeholder:"Work email",value:x,onChange:l=>c(l.target.value),maxLength:255,className:"rounded-md border border-ink/15 bg-ivory px-3 py-2.5 text-sm text-ink outline-none focus:border-terracotta"}),e.jsx("button",{type:"submit",disabled:m,className:"inline-flex items-center justify-center gap-2 rounded-md bg-ink px-5 py-2.5 text-sm font-semibold text-ivory hover:opacity-90 disabled:opacity-60",children:m?"Sendingâ¦":"Send my quote"}),e.jsx("button",{type:"button",onClick:a,className:"md:col-span-3 text-xs text-ink/50 hover:text-ink",children:"No thanks"}),h?e.jsx("p",{className:"md:col-span-3 text-sm text-red-600",children:h}):null]})})}export{F as component};
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.