/* global React, ReactDOM, CopilotHero, QuickstartsSection, GenUISection, ChatEditSection, PublishingSection, CheckpointsSection, CPPipelineSection, FinalSection, MCPPage */
// Copilot feature page — assembly + layout tweak (desktop / mobile).
const CP_TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{
  "layout": (window.SZ_LAYOUT || "desktop")
}/*EDITMODE-END*/;

const CP_LOCALS = { '/copilot': 'Hero — Copilot', '10 Copilot': 'Hero — Copilot', '15 Pricing': '07 Pricing', '16 FAQ': '08 FAQ' };

const CopilotPage = () => {
  const [t, setTweak] = window.useTweaks(CP_TWEAK_DEFAULTS);
  const mobile = t.layout === 'mobile';
  return (
    <React.Fragment>
      {mobile ? <MCPPage /> : (
        <div style={{ fontFamily: 'var(--font-sans)' }}>
          <div data-screen-label="Hero — Copilot"><CopilotHero /></div>
          <div data-screen-label="01 Quick starts"><QuickstartsSection /></div>
          <div data-screen-label="02 Generative UI"><GenUISection /></div>
          <div data-screen-label="03 Conversational editing"><ChatEditSection /></div>
          <div data-screen-label="04 Publishing"><PublishingSection /></div>
          <div data-screen-label="05 Checkpoints"><CheckpointsSection /></div>
          <div data-screen-label="06 In the studio"><CPPipelineSection /></div>
          <div data-screen-label="07 Pricing"><window.PricingSection /></div>
          <div data-screen-label="08 FAQ"><window.FAQSection /></div>
          <div data-screen-label="CTA + Footer"><FinalSection /></div>
          <window.SozeeNav revealAfter="always" logoHref="/" siteHref="/" localLabels={CP_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(<CopilotPage />);
