const { useState: useState2 } = React;
/* =========================================================
COUNTRIES
========================================================= */
window.Countries = function Countries() {
const lang = window.getLang();
const cn = window.COUNTRY_NAMES[lang] || window.COUNTRY_NAMES.UA;
return (
{t('co_eyebrow')}
{t('co_h2_a')} {t('co_h2_em')} {t('co_h2_b')}
{t('co_sub')}
);
};
/* =========================================================
CATEGORIES
========================================================= */
window.Categories = function Categories() {
const lang = window.getLang();
const cats = window.CATEGORY_NAMES[lang] || window.CATEGORY_NAMES.UA;
const icons = ['tool','package','sparkle','leaf'];
return (
{t('cat_eyebrow')}
{t('cat_h2_a')} {t('cat_h2_em')}
);
};
/* =========================================================
STEPS
========================================================= */
window.Steps = function Steps() {
const lang = window.getLang();
const steps = window.STEP_NAMES[lang] || window.STEP_NAMES.UA;
const icons = ['chat','search','file','truck'];
return (
{t('st_eyebrow')}
{t('st_h2_a')} {t('st_h2_em')}
{t('st_h2_b')}
{t('st_start')}
{steps.map((s,i) => (
{t('st_step')} {String(i+1).padStart(2,'0')}
{s.title}
{s.desc}
))}
);
};
/* =========================================================
CALCULATOR
========================================================= */
window.Calculator = function Calculator() {
const [country, setCountry] = useState2('PL');
const [hours, setHours] = useState2(220);
const [cat, setCat] = useState2('warehouse');
const lang = window.getLang();
const cn = window.COUNTRY_NAMES[lang] || window.COUNTRY_NAMES.UA;
const rates = {
PL: { min: 18, max: 24, currency: 'зл', eurRate: 0.23 },
CZ: { min: 140, max: 190, currency: 'крон', eurRate: 0.041 },
DE: { min: 12.5, max: 15, currency: '€', eurRate: 1 },
NL: { min: 12, max: 15, currency: '€', eurRate: 1 },
ES: { min: 10, max: 12, currency: '€', eurRate: 1 },
};
const r = rates[country];
const avg = (r.min + r.max) / 2;
const gross = Math.round(avg * hours);
const housingCost = country === 'PL' ? 800 : country === 'CZ' ? 4500 : 280;
const food = country === 'CZ' ? 3000 : country === 'PL' ? 600 : 200;
const net = gross - (cat === 'with-housing' ? 0 : housingCost) - food;
const netEUR = Math.round(net * r.eurRate);
return (
{t('cl_eyebrow')}
{t('cl_h2_a')} {t('cl_h2_em')} {t('cl_h2_b')}
{t('cl_sub')}
{hours}год
setHours(+e.target.value)}/>
{t('cl_hint')}
{r.min}–{r.max}
{r.currency}/год
{t('cl_net')}
≈ {netEUR.toLocaleString('uk-UA')} €
({net.toLocaleString('uk-UA')} {r.currency})
{t('cl_breakdown_gross')}{gross.toLocaleString('uk-UA')} {r.currency}
{t('cl_breakdown_housing')} {cat==='with-housing' ? t('cl_breakdown_employer') : ''}{cat==='with-housing'? '0' : '− '+housingCost.toLocaleString('uk-UA')} {r.currency}
{t('cl_breakdown_food')}− {food.toLocaleString('uk-UA')} {r.currency}
{t('cl_btn')}
{t('cl_note')}
);
};
/* =========================================================
STATS
========================================================= */
window.Stats = function Stats() {
return (
{t('stat_eyebrow')}
{t('stat_h2_a')} {t('stat_h2_em')}
);
};