// Inboxli — section components (bilingual: copy comes from i18n.js)
const { useState: useStateS } = React;
// ============ LANGUAGE SWITCH ============
function FlagEN() {
return (
);
}
function FlagSR() {
return (
);
}
function LangSwitch({ compact }) {
const lang = useLang();
const copy = INBOXLI_COPY[lang];
return (
);
}
// ============ NAV ============
function Nav() {
const [open, setOpen] = useStateS(false);
const c = useCopy().nav;
return (
);
}
// ============ HERO ============
function Hero({ headline, sub, primaryCta, secondaryCta }) {
const c = useCopy().hero;
return (
{c.kicker}
{headline.before}
{headline.marker && <>{headline.marker}{" "}>}
{headline.italic && <>{headline.italic}{" "}>}
{headline.after}
{sub}
);
}
function HeroCollage() {
const c = useCopy().hero.collage;
return (
{/* inbox sticker */}
{c.inboxLabel}
{c.inboxTitleA}{c.inboxTitleMark} ★
{c.inboxBody}
VIP
open 64%
{/* loyalty card */}
{c.loyaltyLabel}
240✦
{c.nextTier}
{/* metric sticker */}
{c.repeatLabel}
{/* mini chart */}
{/* hand-drawn arrow + note */}
{c.note}
);
}
// ============ STATS ============
function Stats() {
const s = useCopy().stats;
return (
);
}
function LogoWall() {
const c = useCopy().logowall;
const all = ["Crux Pure", "CreGAAtine", "ZzzuperSleep", "KeyMolecule", "Kamatica.rs", "NajboljaMamaNaSvetu"];
const mobileA = ["Crux Pure", "CreGAAtine", "Kamatica.rs"];
const mobileB = ["ZzzuperSleep", "KeyMolecule", "NajboljaMamaNaSvetu"];
return (
{/* Desktop: single row with all 6 */}
{[...all, ...all].map((name, i) =>
- {name}
)}
{/* Mobile: two rows, different brands, opposite directions */}
{[...mobileA, ...mobileA, ...mobileA, ...mobileA].map((name, i) =>
- {name}
)}
{[...mobileB, ...mobileB, ...mobileB, ...mobileB].map((name, i) =>
- {name}
)}
);
}
// ============ LOSS / ROI CALCULATOR ============
function LossSection() {
const lang = useLang();
const c = INBOXLI_COPY[lang].loss;
const [monthlyRev, setMonthlyRev] = useStateS(40000); // EUR
const [aov, setAov] = useStateS(45); // EUR
const [repeatRate, setRepeatRate] = useStateS(15); // %
const TARGET = 38;
const monthlyOrders = aov > 0 ? monthlyRev / aov : 0;
const gap = Math.max(0, (TARGET - repeatRate) / 100);
const annualLost = Math.round(monthlyOrders * gap * aov * 12);
const monthlyLost = Math.round(annualLost / 12);
const newCAC = Math.round(monthlyOrders * gap * 15 * 12);
const fmt = (n) =>
lang === "sr" ?
"€" + Math.round(n).toLocaleString("sr-RS").replace(/,/g, ".") :
"€" + Math.round(n).toLocaleString("en-US");
return (
{c.kicker}
{c.h2a}{c.h2i}{c.h2b}
{c.lead}
{c.bigA}{c.bigAccent}{c.bigB}
{c.subA}{c.subEm}{c.subB}
{c.handNote}
{/* ===== ROI Calculator ===== */}
{c.calc.tag}
{c.calc.h3}
{c.calc.sub}
setMonthlyRev(+e.target.value)} />
setAov(+e.target.value)} />
setRepeatRate(+e.target.value)} />
{c.calc.outLbl}
−{fmt(annualLost)}
{c.calc.monthly}
{fmt(monthlyLost)}
{c.calc.saved}
{fmt(newCAC)}{c.calc.perYear}
{c.calc.footA}{TARGET}{c.calc.footB}
{c.calc.handNote}
);
}
// ============ BEFORE / AFTER ============
function BeforeAfter() {
const c = useCopy().bafter;
return (
{c.kicker}
{c.h2a}{c.h2i}{c.h2b}
{c.lead}
{c.beforeEyebrow}
{c.beforeH3}
{c.before.map((b, i) => - {b}
)}
{c.bottomLbl}
{c.beforeResult}
{c.afterEyebrow}
{c.afterH3}
{c.after.map((a, i) => - {a}
)}
{c.bottomLbl}
{c.afterResult}
);
}
// ============ SERVICES ============
function Services() {
const c = useCopy().services;
return (
{c.kicker}
{c.h2a}{c.h2i}
{c.lead}
{c.items.map((it) =>
{it.n} /
{it.title}
{it.copy}
{it.bullets.map((b) => - {b}
)}
)}
{c.ctaNote}
);
}
// ============ CASES ============
function CaseVisual({ kind, v }) {
if (kind === "welcome") {
return (
);
}
if (kind === "vip") {
return (
);
}
return (
);
}
function Cases() {
const c = useCopy().cases;
const imgs = ["peach", "sage", "lilac"];
const visuals = ["welcome", "vip", "package"];
return (
{c.kicker}
{c.h2a}{c.h2mark}{c.h2b}
{c.lead}
{c.items.map((it, i) =>
{it.badge}
{it.brand}
{it.title}
{it.metrics.map((m, j) =>
)}
)}
);
}
// ============ PROCESS ============
function Process() {
const c = useCopy().process;
return (
{c.kicker}
{c.h2a}{c.h2i}
{c.lead}
{c.ctaNote}
);
}
// ============ TESTIMONIALS ============
function Testimonials() {
const c = useCopy().testimonials;
const colors = ["#F4C7B5", "#C9DDB8", "#D8C8E2", "#FFE6A8", "#B8D6E8", "#F4B4A2"];
return (
{c.kicker}
{c.h2}
{c.lead}
{c.items.map((t, i) =>
)}
);
}
// ============ FAQ ============
function FAQ() {
const [open, setOpen] = useStateS(0);
const c = useCopy().faq;
return (
{c.kicker}
{c.h2a}{c.h2hand}{c.h2b}
{c.items.map((it, i) =>
setOpen(open === i ? -1 : i)}>
{it.q}
+
{it.a}
)}
);
}
// ============ FINAL CTA ============
function FinalCTA() {
const c = useCopy().finalCta;
return (
{c.orbitA}
{c.orbitB}
{c.kicker}
{c.h2a}{c.h2mark}{c.h2b}
{c.h2c}{c.h2i}
{c.lead}
);
}
// ============ FOOTER ============
function Footer() {
const c = useCopy().footer;
return (
);
}
Object.assign(window, {
LangSwitch, Nav, Hero, Stats, LogoWall, LossSection, BeforeAfter, Services, Cases, Process, Testimonials, FAQ, FinalCTA, Footer
});