// Main App — composes the landing page with i18n + theme providers
// Nav, GlobeIcon and DownloadModal live in design/sections/nav.jsx (shared with /legal).

const DEFAULTS = /*EDITMODE-BEGIN*/{
  "showTicker": true,
  "showTestimonials": false
}/*EDITMODE-END*/;

function Page() {
  const [tw, setTweak] = useTweaks(DEFAULTS);
  return (
    <>
      <div className="page-bg"/>
      <Nav/>
      <Hero/>
      {tw.showTicker && <AffirmationTicker/>}
      <div id="practice"><ProblemSection/></div>
      <HowItWorks/>
      <MoodSection/>
      {tw.showTestimonials && <div id="stories"><Testimonials/></div>}
      <div id="story"><FounderStory/></div>
      <div id="pricing"><FinalCTA/></div>
      <PageFooter/>

      <TweaksPanel title="Tweaks">
        <TweakSection title="Content">
          <TweakToggle
            label="Show affirmation ticker"
            value={tw.showTicker}
            onChange={v => setTweak("showTicker", v)}
          />
        </TweakSection>
      </TweaksPanel>
    </>
  );
}

function App() {
  return (
    <I18nProvider>
      <ThemeProvider>
        <Page/>
      </ThemeProvider>
    </I18nProvider>
  );
}

ReactDOM.createRoot(document.getElementById("root")).render(<App/>);
