/* global React, ReactDOM, BrandPortalHero, OldWaySection, CPMSection, CatalogSection, InFrameSection, SafetySection, BPReceiptsSection, PlansSection, FinalSection, MBPPage */
// Brand Portal solutions page — assembly + layout tweak (desktop / mobile).
const BP_TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{
  "layout": (window.SZ_LAYOUT || "desktop")
} /*EDITMODE-END*/;

const BP_LOCALS = { '/brand-portal': 'Hero — Brand Portal' };

const BrandPortalPage = () => {
  const [t, setTweak] = window.useTweaks(BP_TWEAK_DEFAULTS);
  const mobile = t.layout === 'mobile';
  return (
    <React.Fragment>
      {mobile ? <MBPPage /> :
      <div style={{ fontFamily: 'var(--font-sans)' }}>
          <div data-screen-label="Hero — Brand Portal"><BrandPortalHero /></div>
          <div data-screen-label="01 The old way"><OldWaySection /></div>
          <div data-screen-label="02 Pay per view"><CPMSection /></div>
          <div data-screen-label="03 Catalog"><CatalogSection /></div>
          <div data-screen-label="04 In frame"><InFrameSection /></div>
          <div data-screen-label="05 Brand safety"><SafetySection /></div>
          <div data-screen-label="06 Receipts"><BPReceiptsSection /></div>
          <div data-screen-label="07 Plans"><PlansSection /></div>
          <div data-screen-label="08 FAQ"><window.BrandFAQSection /></div>
          <div data-screen-label="CTA + Footer"><FinalSection /></div>
          <window.SozeeNav revealAfter="always" logoHref="/" siteHref="/" localLabels={BP_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(<BrandPortalPage />);