// App root — orchestrates everything + Tweaks const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{ "showLightning": true, "redIntensity": 1.0, "heroVideo": "ll-hero", "scrollSnap": false }/*EDITMODE-END*/; function App(){ const [quote,setQuote] = useState(null); // { type, prefill } const tweaks = (window.useTweaks||((d)=>[d,()=>{}]))(TWEAK_DEFAULTS); const [tw, setTweak] = Array.isArray(tweaks) ? tweaks : [TWEAK_DEFAULTS,()=>{}]; // Apply red intensity useEffect(()=>{ if (tw.redIntensity != null){ const root = document.documentElement; const i = tw.redIntensity; const r = Math.round(200*i + 30); const g = Math.round(16*i); const b = Math.round(46*i + 10); root.style.setProperty('--thraxel-red', `rgb(${r},${g},${b})`); } },[tw.redIntensity]); const openQuote = (type, prefill) => setQuote({ type, prefill }); const exploreCase = () => { const el = document.getElementById('gun-case-demo'); if (el) window.scrollTo({top: el.offsetTop - 60, behavior:'smooth'}); }; const TweaksPanel = window.TweaksPanel; const TweakSection = window.TweakSection; const TweakToggle = window.TweakToggle; const TweakSlider = window.TweakSlider; const TweakSelect = window.TweakSelect; return ( <>