const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{
  "showFounders": true
}/*EDITMODE-END*/;

function NascoTweaksApp() {
  const [t, setTweak] = useTweaks(TWEAK_DEFAULTS);

  React.useEffect(function () {
    document.body.classList.toggle('hide-founders', !t.showFounders);
  }, [t.showFounders]);

  return (
    <TweaksPanel>
      <TweakSection label="About Section" />
      <TweakToggle
        label="Show founders"
        value={t.showFounders}
        onChange={function (v) { setTweak('showFounders', v); }}
      />
    </TweaksPanel>
  );
}

const nascoTweaksRootEl = document.getElementById('tweaks-root');
if (!nascoTweaksRootEl._reactRootContainer && !nascoTweaksRootEl.__nascoRoot) {
  nascoTweaksRootEl.__nascoRoot = ReactDOM.createRoot(nascoTweaksRootEl);
  nascoTweaksRootEl.__nascoRoot.render(<NascoTweaksApp />);
}
