/* fäm Properties — Tweaks panel Wires the host edit-mode protocol + a small panel that lets a manager: - swap the campaign (Palm Central / The Edit / Mercedes Branded / Villa 101) - change hero treatment (Cinematic / Editorial / Full-dark) - toggle the DXBinteract data block / awards strip - choose accent (curated 3-swatch) */ const { useState, useEffect } = React; const TWEAK_DEFAULTS = window.__TWEAKS; function App(){ const [t, setTweak] = useTweaks(TWEAK_DEFAULTS); // Apply tweaks to the static HTML page useEffect(() => { window.__applyCampaign && window.__applyCampaign(t.campaign); }, [t.campaign]); useEffect(() => { window.__applyHeroTreatment && window.__applyHeroTreatment(t.heroTreatment); }, [t.heroTreatment]); useEffect(() => { window.__applyAccent && window.__applyAccent(t.accent); }, [t.accent]); useEffect(() => { window.__toggleSection && window.__toggleSection('data', t.showDataBlock); }, [t.showDataBlock]); useEffect(() => { window.__toggleSection && window.__toggleSection('trust', t.showAwards); }, [t.showAwards]); return ( setTweak('campaign', v)} /> setTweak('heroTreatment', v)} /> setTweak('accent', v)} /> setTweak('showDataBlock', v)} /> setTweak('showAwards', v)} /> ); } // Mount once const mountEl = document.createElement('div'); mountEl.id = '__fam_tweaks_root'; document.body.appendChild(mountEl); ReactDOM.createRoot(mountEl).render();