const { useEffect } = React;
const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{
"accent": "#60a5fa",
"background": "glow",
"heroLayout": "center",
"heroCopy": "benefit",
"compact": false
}/*EDITMODE-END*/;
const ACCENTS = [
"#e8e253", // mustard (default)
"#9d7cff", // violet
"#4ade80", // green
"#60a5fa", // blue
"#f97a6e", // coral
"#fafafa" // white
];
const HERO_COPY = {
default: {
h1: 'Reservas sin límites,
negocio sin caos.',
sub: "RubeloreOS es la plataforma todo-en-uno para salones, barberías, spas y centros de bienestar. Reservas online, equipo, ventas y clientes — en un solo sitio.",
badge: "Nueva versión · agendas con IA y POS integrado"
},
bold: {
h1: 'El sistema operativo de tu negocio de belleza.',
sub: "Una plataforma. Cero fricción. Reservas, agenda, equipo, POS y marketing — todo conectado y trabajando para ti, 24/7.",
badge: "Más de 120.000 negocios confían en RubeloreOS"
},
benefit: {
h1: 'Llena tu agenda.
Cobra sin esperar.',
sub: "Reservas online 24/7, recordatorios automáticos que reducen ausencias hasta un 70% y un POS que cobra en segundos. Lo que necesitas, donde lo necesitas.",
badge: "+28% de ingresos en los primeros 3 meses"
}
};
function applyTweaks(t) {
// Accent color
document.documentElement.style.setProperty('--accent', t.accent);
// Derive a slightly dimmer accent for hover
document.documentElement.style.setProperty('--accent-dim', t.accent);
// Accent ink: white text only if accent is very light
const ink = t.accent === '#fafafa' ? '#0a0a0a' : '#0a0a0a';
document.documentElement.style.setProperty('--accent-ink', ink);
// Background
document.body.dataset.bg = t.background;
// Hero layout
const hero = document.querySelector('.hero');
if (hero) hero.dataset.layout = t.heroLayout;
// Hero copy
const copy = HERO_COPY[t.heroCopy] || HERO_COPY.default;
const h1 = document.querySelector('[data-copy="hero-h1"]');
const sub = document.querySelector('[data-copy="hero-sub"]');
const badge = document.querySelector('[data-copy="hero-badge"]');
if (h1) h1.innerHTML = copy.h1;
if (sub) sub.textContent = copy.sub;
if (badge) badge.textContent = copy.badge;
// Compact mode
document.documentElement.style.setProperty(
'--section-pad',
t.compact ? '60px' : '100px'
);
document.querySelectorAll('section').forEach(s => {
if (!s.classList.contains('hero') && !s.classList.contains('stats')) {
s.style.paddingTop = t.compact ? '60px' : '';
s.style.paddingBottom = t.compact ? '60px' : '';
}
});
}
function TweaksApp() {
const [t, setTweak] = window.useTweaks(TWEAK_DEFAULTS);
// Apply on every change
useEffect(() => { applyTweaks(t); }, [t]);
return (
setTweak('accent', v)}
/>
setTweak('heroLayout', v)}
/>
setTweak('heroCopy', v)}
/>
setTweak('background', v)}
/>
setTweak('compact', v)}
/>
);
}
const root = ReactDOM.createRoot(document.getElementById('tweaks-root'));
root.render();