/* global React, ReactDOM, PostAnalyzeHero, SchedSection, PlatformsSection, AnalyticsSection, ReceiptsSection, PAPipelineSection, FinalSection, MPAPage */
// Post & Analyze feature page — assembly + layout tweak (desktop / mobile).
const PA_TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{
  "layout": (window.SZ_LAYOUT || "desktop")
} /*EDITMODE-END*/;

const PA_LOCALS = { '/post-analyze': 'Hero — Post & Analyze', '11 Scheduler': '01 The Scheduler', '15 Pricing': '06 Pricing', '16 FAQ': '07 FAQ' };

const PostAnalyzePage = () => {
  const [t, setTweak] = window.useTweaks(PA_TWEAK_DEFAULTS);
  const mobile = t.layout === 'mobile';
  return (
    <React.Fragment>
      {mobile ? <MPAPage /> :
      <div style={{ fontFamily: 'var(--font-sans)' }}>
          <div data-screen-label="Hero — Post & Analyze"><PostAnalyzeHero /></div>
          <div data-screen-label="01 The Scheduler"><SchedSection /></div>
          <div data-screen-label="02 Platforms"><PlatformsSection /></div>
          <div data-screen-label="03 Analytics"><AnalyticsSection /></div>
          <div data-screen-label="04 Receipts"><ReceiptsSection /></div>
          <div data-screen-label="05 Before the post"><PAPipelineSection /></div>
          <div data-screen-label="06 Pricing"><window.PricingSection /></div>
          <div data-screen-label="07 FAQ"><window.FAQSection /></div>
          <div data-screen-label="CTA + Footer"><FinalSection /></div>
          <window.SozeeNav revealAfter="always" logoHref="/" siteHref="/" localLabels={PA_LOCALS} />
        </div>
      }
      <window.TweaksPanel>
        <window.TweakSection label="Layout" />
        <window.TweakRadio label="Viewport" value={t.layout}
        options={[{ value: 'desktop', label: 'Desktop' }, { value: 'mobile', label: 'Mobile' }]}
        onChange={(v) => setTweak('layout', v)} />
      </window.TweaksPanel>
    </React.Fragment>);

};
ReactDOM.createRoot(document.getElementById('root')).render(<PostAnalyzePage />);