/* ============================================================
TARIFIEL — Panel de Tweaks
Conmuta tipografía, color de marca, protagonismo de la mascota
y animaciones, aplicándolo en vivo a la landing (vanilla).
============================================================ */
const { useEffect } = React;
const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{
"headingFont": "Sora",
"brand": ["#6D29D5", "#5068F2", "#4BA4F2"],
"mascot": "Presente",
"radius": 22,
"anim": true
}/*EDITMODE-END*/;
const FONT_MAP = {
Sora: "'Sora', sans-serif",
Poppins: "'Poppins', sans-serif",
Syne: "'Syne', sans-serif"
};
const MASCOT_MAP = { "Sutil": "subtle", "Presente": "present", "Protagonista": "hero" };
function TarifielTweaks() {
const [t, setTweak] = useTweaks(TWEAK_DEFAULTS);
useEffect(() => {
const root = document.documentElement;
root.style.setProperty('--font-display', FONT_MAP[t.headingFont] || FONT_MAP.Sora);
const b = t.brand || TWEAK_DEFAULTS.brand;
root.style.setProperty('--c1', b[0]);
root.style.setProperty('--c2', b[1]);
root.style.setProperty('--c3', b[2]);
root.style.setProperty('--purple', b[0]);
root.style.setProperty('--violet', b[1]);
root.style.setProperty('--blue', b[2]);
root.style.setProperty('--r-card', (t.radius || 22) + 'px');
root.setAttribute('data-mascot', MASCOT_MAP[t.mascot] || 'present');
root.setAttribute('data-anim', t.anim ? 'on' : 'off');
}, [t]);
return (
setTweak('headingFont', v)}
/>
setTweak('brand', v)}
/>
setTweak('mascot', v)}
/>
setTweak('radius', v)}
/>
setTweak('anim', v)}
/>
{ window.__tarifielDemoResult && window.__tarifielDemoResult(); }}
/>
{ window.__tarifielReset && window.__tarifielReset(); }}
/>
);
}
ReactDOM.createRoot(document.getElementById('tweaks-root')).render();