/* global React, Placeholder */ const { useState: useStateHC } = React; /* ============================================================ Hero ============================================================ */ function Hero({ t, lang, layout, onCalc, onModels }) { return ( {t.hero.eyebrow} {t.hero.since} {t.hero.title1}{" "} {t.hero.title2}{" "} {t.hero.title3}{" "} {t.hero.title4} {t.hero.lead} {t.hero.ctaPrimary} → {t.hero.ctaSecondary} {t.hero.chipLabel} {t.hero.chipPrice} → {Object.entries(t.hero.meta).map(([k, m]) => ( {m.v} {m.l} ))} ); } /* ============================================================ Cost Calculator ============================================================ */ function Calculator({ t, lang }) { const [area, setArea] = useStateHC(80); const [tier, setTier] = useStateHC("essential"); // Rates per sqm for p-wood products (€/sqm) const rates = { essential: 650, signature: 800, premium: 1050 }; const ranges = { essential: 100, signature: 120, premium: 200 }; const rate = rates[tier]; const low = area * (rate - ranges[tier]); const high = area * (rate + ranges[tier]); const mid = area * rate; const breakdown = { materials: 0.45, installation: 0.22, finishes: 0.20, engineering: 0.13 }; const fmt = (n) => lang === "el" ? n.toLocaleString("el-GR", { maximumFractionDigits: 0 }) : n.toLocaleString("en-US", { maximumFractionDigits: 0 }); const cur = "€"; return ( {t.calc.eyebrow} {t.calc.title} {t.calc.lead} {t.calc.areaLabel} {area} {t.calc.unit} setArea(parseInt(e.target.value, 10))} /> 20135250 {t.calc.tierLabel} {Object.keys(t.calc.tiers).map((k) => ( setTier(k)} > {t.calc.tiers[k]} ))} {t.calc.tierDesc[tier]} {t.calc.disclaimer} {t.calc.priceLabel} {cur}{fmt(mid)} {t.calc.rangeLabel}: {cur}{fmt(low)} — {cur}{fmt(high)} · {cur}{fmt(rate)} {t.calc.perSqm} {Object.entries(t.calc.breakdown).map(([k, label]) => ( {label} {cur}{fmt(mid * breakdown[k])} ))} {t.calc.ctaPrimary} → +30 6932 320666 ); } Object.assign(window, { Hero, Calculator });
{t.hero.lead}
{t.calc.lead}
{t.calc.tierDesc[tier]}