// MyPTO Supportcenter — artikelsida (SEO-vänlig, data-driven renderare)
// Läser vilken artikel som ska visas från window.__ARTICLE_SLUG (satt i varje HTML)
// eller från ?slug= i URL:en. Allt innehåll kommer från window.PTO_ARTICLES.
const { useState: useStateA, useEffect: useEffectA } = React;

function hexA(hex, a) {
  const h = hex.replace('#', '');
  return `rgba(${parseInt(h.substring(0,2),16)},${parseInt(h.substring(2,4),16)},${parseInt(h.substring(4,6),16)},${a})`;
}
const ACCENT = C.green, ACCENT_DEEP = C.greenDeep;
const gradientBgA = `radial-gradient(ellipse at 90% -5%, rgba(160,200,29,0.08) 0%, transparent 50%), linear-gradient(180deg, #FAF7F0 0%, #F4EFE6 100%)`;

// Vilken artikel?
function resolveSlug() {
  if (window.__ARTICLE_SLUG) return window.__ARTICLE_SLUG;
  const p = new URLSearchParams(window.location.search);
  return p.get('slug') || (window.PTO_ARTICLES[0] && window.PTO_ARTICLES[0].slug);
}

// ═══════════════ NAVBAR ═══════════════
const ArticleNav = () => (
  <nav style={{ position: 'fixed', top: 0, left: 0, right: 0, zIndex: 50, background: 'rgba(61,61,61,0.96)', backdropFilter: 'blur(12px)', borderBottom: '1px solid rgba(160,200,29,0.15)', height: 72, display: 'flex', alignItems: 'center', padding: '0 clamp(16px,4vw,40px)', justifyContent: 'space-between' }}>
    <a href="/support" style={{ display: 'flex', alignItems: 'center', gap: 10, textDecoration: 'none' }}>
      <img src="assets/logo-mark.png" style={{ width: 36, height: 36, objectFit: 'contain' }} alt="Private Training Online"/>
      <span style={{ fontFamily: F.heading, fontWeight: 800, textTransform: 'uppercase', letterSpacing: '0.08em', color: 'white', fontSize: 17, lineHeight: 1 }}>Support<span style={{ color: C.green }}>center</span></span>
    </a>
    <a href="/support/artiklar" className="nav-back" style={{ display: 'inline-flex', alignItems: 'center', gap: 8, fontFamily: F.heading, fontSize: 13, fontWeight: 700, textTransform: 'uppercase', letterSpacing: '0.1em', color: 'rgba(255,255,255,0.82)', textDecoration: 'none' }}>
      <span style={{ transform: 'rotate(180deg)', display: 'inline-flex' }}><Icon name="arrow" size={15} color="rgba(255,255,255,0.82)"/></span> Alla artiklar
    </a>
  </nav>
);

// ═══════════════ BREADCRUMB ═══════════════
const Breadcrumb = ({ cat, title }) => {
  const cm = CATEGORY_META[cat];
  return (
    <nav aria-label="Brödsmulor" style={{ display: 'flex', alignItems: 'center', gap: 8, flexWrap: 'wrap', marginBottom: 22 }}>
      {[['Supportcenter', '/support'], [cm.title, '/support/' + cm.id]].map(([t, h]) => (
        <React.Fragment key={t}>
          <a href={h} style={{ fontFamily: F.body, fontSize: 13, color: C.muted, textDecoration: 'none', fontWeight: 500 }}>{t}</a>
          <Icon name="chevron-right" size={13} color={C.mutedLight}/>
        </React.Fragment>
      ))}
      <span style={{ fontFamily: F.body, fontSize: 13, color: C.charcoal, fontWeight: 600 }}>{title}</span>
    </nav>
  );
};

// ═══════════════ BYGGSTENAR ═══════════════
const H2 = ({ id, children }) => (
  <h2 id={id} style={{ fontFamily: F.heading, fontSize: 'clamp(24px,3vw,30px)', fontWeight: 800, textTransform: 'uppercase', letterSpacing: '0.02em', color: C.charcoal, margin: '40px 0 14px', scrollMarginTop: 96 }}>{children}</h2>
);
const P = ({ children }) => (
  <p style={{ fontFamily: F.body, fontSize: 16, lineHeight: 1.75, color: '#54524E', margin: '0 0 16px' }} dangerouslySetInnerHTML={typeof children === 'string' ? { __html: children } : undefined}>{typeof children === 'string' ? undefined : children}</p>
);
const Callout = ({ icon = 'sparkles', title, children, tone = 'green' }) => {
  const tones = {
    green: { bg: hexA(C.green, 0.09), border: hexA(C.green, 0.35), ic: C.greenDeep, icbg: hexA(C.green, 0.16) },
    amber: { bg: 'rgba(245,158,11,0.08)', border: 'rgba(245,158,11,0.32)', ic: '#b45309', icbg: 'rgba(245,158,11,0.16)' },
    sky:   { bg: 'rgba(14,165,233,0.08)', border: 'rgba(14,165,233,0.30)', ic: '#0369a1', icbg: 'rgba(14,165,233,0.16)' },
  };
  const t = tones[tone] || tones.green;
  return (
    <div style={{ display: 'flex', gap: 14, padding: '18px 20px', borderRadius: 18, background: t.bg, border: `1px solid ${t.border}`, margin: '22px 0' }}>
      <div style={{ width: 38, height: 38, borderRadius: 11, background: t.icbg, display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0 }}>
        <Icon name={icon} size={19} color={t.ic}/>
      </div>
      <div>
        {title && <p style={{ fontFamily: F.modern, fontSize: 14.5, fontWeight: 700, color: C.charcoal, margin: '0 0 4px' }}>{title}</p>}
        <p style={{ fontFamily: F.body, fontSize: 14.5, lineHeight: 1.65, color: '#54524E', margin: 0 }} dangerouslySetInnerHTML={{ __html: children }}/>
      </div>
    </div>
  );
};
const Steps = ({ items }) => (
  <ol style={{ listStyle: 'none', counterReset: 'step', padding: 0, margin: '8px 0 8px' }}>
    {items.map((it, i) => (
      <li key={i} style={{ display: 'flex', gap: 16, paddingBottom: i < items.length - 1 ? 22 : 0, position: 'relative' }}>
        <div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', flexShrink: 0 }}>
          <div style={{ width: 34, height: 34, borderRadius: '50%', background: C.green, color: '#1A2800', display: 'flex', alignItems: 'center', justifyContent: 'center', fontFamily: F.heading, fontSize: 16, fontWeight: 800, flexShrink: 0 }}>{i + 1}</div>
          {i < items.length - 1 && <div style={{ width: 2, flex: 1, background: hexA(C.green, 0.25), marginTop: 4 }}/>}
        </div>
        <div style={{ paddingTop: 4 }}>
          <p style={{ fontFamily: F.modern, fontSize: 15.5, fontWeight: 700, color: C.charcoal, margin: '0 0 3px' }}>{it.t}</p>
          <p style={{ fontFamily: F.body, fontSize: 14.5, lineHeight: 1.65, color: '#54524E', margin: 0 }} dangerouslySetInnerHTML={{ __html: it.d }}/>
        </div>
      </li>
    ))}
  </ol>
);
const BulletList = ({ items }) => (
  <ul style={{ listStyle: 'none', padding: 0, margin: '8px 0 18px', display: 'flex', flexDirection: 'column', gap: 10 }}>
    {items.map((it, i) => (
      <li key={i} style={{ display: 'flex', gap: 12, alignItems: 'flex-start' }}>
        <span style={{ flexShrink: 0, marginTop: 3, width: 20, height: 20, borderRadius: '50%', background: hexA(C.green, 0.16), display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
          <Icon name="check-simple" size={13} color={C.greenDeep}/>
        </span>
        <span style={{ fontFamily: F.body, fontSize: 15.5, lineHeight: 1.6, color: '#54524E' }} dangerouslySetInnerHTML={{ __html: it }}/>
      </li>
    ))}
  </ul>
);

// Rendera ett block ur artikelns body-array
const Block = ({ b }) => {
  switch (b[0]) {
    case 'h2':      return <H2 id={b[1]}>{b[2]}</H2>;
    case 'p':       return <P>{b[1]}</P>;
    case 'steps':   return <Steps items={b[1]}/>;
    case 'callout': return <Callout tone={b[1]} icon={b[2]} title={b[3]}>{b[4]}</Callout>;
    case 'list':    return <BulletList items={b[1]}/>;
    default:        return null;
  }
};

// ═══════════════ ARTIKELKROPP ═══════════════
const ArticleBody = ({ a }) => {
  const cm = CATEGORY_META[a.cat];
  return (
    <article>
      <header style={{ marginBottom: 8 }}>
        <Breadcrumb cat={a.cat} title={a.title}/>
        <a href={'/support/' + cm.id} style={{ display: 'inline-flex', alignItems: 'center', gap: 8, padding: '5px 13px', borderRadius: 9999, background: C.sage, marginBottom: 16, textDecoration: 'none' }}>
          <Icon name={cm.icon} size={13} color={C.greenDeep}/>
          <span style={{ fontFamily: F.modern, fontSize: 10, fontWeight: 800, textTransform: 'uppercase', letterSpacing: '0.16em', color: cm.eyebrow }}>{cm.title}</span>
        </a>
        <h1 style={{ fontFamily: F.heading, fontSize: 'clamp(32px,4.6vw,52px)', fontWeight: 800, textTransform: 'uppercase', letterSpacing: '0.01em', lineHeight: 1.02, color: C.charcoal, margin: '0 0 16px' }}>{a.title}</h1>
        <div style={{ display: 'flex', alignItems: 'center', gap: 16, flexWrap: 'wrap', paddingBottom: 22, borderBottom: `1px solid ${C.line}` }}>
          {[['refresh', 'Uppdaterad ' + a.updatedLabel], ['timer', a.read + ' läsning'], ['check-simple', (a.helpful || 96) + ' % tyckte detta hjälpte']].map(([ic, tx]) => (
            <span key={tx} style={{ display: 'inline-flex', alignItems: 'center', gap: 7, fontFamily: F.body, fontSize: 13, color: C.mutedLight }}>
              <Icon name={ic} size={15} color={C.mutedLight}/> {tx}
            </span>
          ))}
        </div>
      </header>

      <p style={{ fontFamily: F.body, fontSize: 18, lineHeight: 1.7, color: C.charcoal, fontWeight: 500, margin: '24px 0 8px' }}>{a.lead}</p>

      {a.body.map((b, i) => <Block key={i} b={b}/>)}

      {a.faq && a.faq.length > 0 && (
        <>
          <H2 id="faq">Vanliga frågor</H2>
          <ArticleFaq items={a.faq}/>
        </>
      )}
    </article>
  );
};

// ═══════════════ INLINE FAQ ═══════════════
const ArticleFaq = ({ items }) => {
  const [open, setOpen] = useStateA(-1);
  return (
    <div style={{ display: 'flex', flexDirection: 'column', gap: 10, marginTop: 8 }}>
      {items.map((item, i) => {
        const isOpen = open === i;
        return (
          <div key={i} style={{ background: 'white', border: `1px solid ${isOpen ? hexA(C.green, 0.4) : C.line}`, borderRadius: 16, overflow: 'hidden', transition: 'all 0.2s' }}>
            <button onClick={() => setOpen(isOpen ? -1 : i)} style={{ width: '100%', display: 'flex', alignItems: 'center', gap: 12, padding: '15px 18px', background: 'none', border: 'none', cursor: 'pointer', textAlign: 'left' }}>
              <span style={{ flex: 1, fontFamily: F.modern, fontSize: 15, fontWeight: 600, color: C.charcoal }}>{item.q}</span>
              <span style={{ flexShrink: 0, transition: 'transform 0.2s', transform: isOpen ? 'rotate(180deg)' : 'none' }}><Icon name="chevron-down" size={17} color={isOpen ? C.greenDeep : C.muted}/></span>
            </button>
            <div style={{ maxHeight: isOpen ? 240 : 0, overflow: 'hidden', transition: 'max-height 0.3s ease' }}>
              <p style={{ fontFamily: F.body, fontSize: 14.5, color: '#54524E', lineHeight: 1.7, margin: 0, padding: '0 18px 17px' }}>{item.a}</p>
            </div>
          </div>
        );
      })}
    </div>
  );
};

// ═══════════════ TOC (sticky scrollspy) ═══════════════
const TocSidebar = ({ toc }) => {
  const [active, setActive] = useStateA(toc[0] && toc[0].id);
  useEffectA(() => {
    const obs = new IntersectionObserver((entries) => {
      entries.forEach(e => { if (e.isIntersecting) setActive(e.target.id); });
    }, { rootMargin: '-90px 0px -65% 0px', threshold: 0 });
    toc.forEach(t => { const el = document.getElementById(t.id); if (el) obs.observe(el); });
    return () => obs.disconnect();
  }, [toc]);
  return (
    <aside className="toc" style={{ position: 'sticky', top: 96, alignSelf: 'start' }}>
      <p style={{ fontFamily: F.modern, fontSize: 10, fontWeight: 700, textTransform: 'uppercase', letterSpacing: '0.18em', color: C.mutedLight, margin: '0 0 14px' }}>I den här artikeln</p>
      <div style={{ display: 'flex', flexDirection: 'column', gap: 2, borderLeft: `2px solid ${C.line}` }}>
        {toc.map(t => (
          <a key={t.id} href={'#' + t.id} style={{ marginLeft: -2, paddingLeft: 14, borderLeft: `2px solid ${active === t.id ? C.green : 'transparent'}`, fontFamily: F.body, fontSize: 13.5, fontWeight: active === t.id ? 600 : 400, color: active === t.id ? ACCENT_DEEP : C.muted, textDecoration: 'none', padding: '7px 0 7px 14px', transition: 'all 0.15s' }}>{t.label}</a>
        ))}
      </div>
    </aside>
  );
};

// ═══════════════ "VAR DETTA TILL HJÄLP?" ═══════════════
const Feedback = () => {
  const [vote, setVote] = useStateA(null);
  return (
    <div style={{ marginTop: 44, padding: '24px 26px', borderRadius: 20, background: 'white', border: `1px solid ${C.line}`, display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 16, flexWrap: 'wrap' }}>
      {vote ? (
        <div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
          <div style={{ width: 40, height: 40, borderRadius: 12, background: hexA(C.green, 0.14), display: 'flex', alignItems: 'center', justifyContent: 'center' }}><Icon name="check-simple" size={20} color={C.greenDeep}/></div>
          <p style={{ fontFamily: F.modern, fontSize: 15, fontWeight: 600, color: C.charcoal, margin: 0 }}>{vote === 'yes' ? 'Vad bra — tack för din feedback!' : 'Tack! Vi använder din feedback för att förbättra artikeln.'}</p>
        </div>
      ) : (
        <>
          <p style={{ fontFamily: F.modern, fontSize: 16, fontWeight: 700, color: C.charcoal, margin: 0 }}>Var den här artikeln till hjälp?</p>
          <div style={{ display: 'flex', gap: 10 }}>
            {[['yes', 'Ja', 'check-simple'], ['no', 'Nej', 'x']].map(([v, label, ic]) => (
              <button key={v} onClick={() => setVote(v)} style={{ display: 'inline-flex', alignItems: 'center', gap: 8, padding: '10px 22px', borderRadius: 9999, border: `1.5px solid ${C.line}`, background: 'white', fontFamily: F.heading, fontSize: 13, fontWeight: 700, textTransform: 'uppercase', letterSpacing: '0.08em', color: C.charcoal, cursor: 'pointer', transition: 'all 0.15s' }}
                onMouseEnter={e => { e.currentTarget.style.borderColor = ACCENT; e.currentTarget.style.background = hexA(C.green, 0.08); }}
                onMouseLeave={e => { e.currentTarget.style.borderColor = C.line; e.currentTarget.style.background = 'white'; }}>
                <Icon name={ic} size={15} color={C.muted}/> {label}
              </button>
            ))}
          </div>
        </>
      )}
    </div>
  );
};

// ═══════════════ RELATERADE ARTIKLAR ═══════════════
const Related = ({ slugs }) => {
  const items = (slugs || []).map(s => window.getArticle(s)).filter(Boolean);
  if (!items.length) return null;
  return (
    <section style={{ marginTop: 48 }}>
      <h2 style={{ fontFamily: F.heading, fontSize: 24, fontWeight: 800, textTransform: 'uppercase', letterSpacing: '0.02em', color: C.charcoal, margin: '0 0 18px' }}>Relaterade artiklar</h2>
      <div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(220px, 1fr))', gap: 14 }}>
        {items.map(r => (
          <a key={r.slug} href={'/support/' + r.slug} style={{ display: 'flex', flexDirection: 'column', gap: 12, padding: 20, borderRadius: 20, background: 'white', border: `1px solid ${C.line}`, textDecoration: 'none', transition: 'all 0.2s' }}
            onMouseEnter={e => { e.currentTarget.style.transform = 'translateY(-3px)'; e.currentTarget.style.boxShadow = '0 16px 38px rgba(61,61,61,0.1)'; e.currentTarget.style.borderColor = hexA(C.green, 0.4); }}
            onMouseLeave={e => { e.currentTarget.style.transform = 'translateY(0)'; e.currentTarget.style.boxShadow = 'none'; e.currentTarget.style.borderColor = C.line; }}>
            <div style={{ width: 42, height: 42, borderRadius: 12, background: C.sage, display: 'flex', alignItems: 'center', justifyContent: 'center' }}><Icon name={r.icon} size={20} color={C.greenDeep}/></div>
            <div>
              <p style={{ fontFamily: F.modern, fontSize: 15, fontWeight: 600, color: C.charcoal, margin: '0 0 6px', lineHeight: 1.35 }}>{r.title}</p>
              <p style={{ fontFamily: F.body, fontSize: 12, color: C.mutedLight, margin: 0 }}>{CATEGORY_META[r.cat].short} · {r.read}</p>
            </div>
          </a>
        ))}
      </div>
    </section>
  );
};

// ═══════════════ HJÄLP-CTA (med valfri kontextuell produkt-CTA) ═══════════════
const HelpCta = ({ cta }) => (
  <section style={{ marginTop: 28, position: 'relative', overflow: 'hidden', background: C.dark, borderRadius: 26, padding: 'clamp(26px,4vw,38px)' }}>
    <div style={{ position: 'absolute', top: -70, right: -30, width: 240, height: 240, borderRadius: '50%', background: `radial-gradient(circle, ${hexA(C.green, 0.16)}, transparent 70%)`, pointerEvents: 'none' }}/>
    <div style={{ position: 'relative', display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 20, flexWrap: 'wrap' }}>
      <div style={{ maxWidth: 460 }}>
        <p style={{ fontFamily: F.modern, fontSize: 10, fontWeight: 700, textTransform: 'uppercase', letterSpacing: '0.2em', color: C.green, margin: '0 0 8px' }}>{cta ? cta.eyebrow : 'Fick du inte svar?'}</p>
        <h2 style={{ fontFamily: F.heading, fontSize: 'clamp(24px,3vw,32px)', fontWeight: 800, textTransform: 'uppercase', letterSpacing: '0.02em', color: 'white', margin: '0 0 8px', lineHeight: 1 }}>{cta ? cta.title : 'Vi hjälper dig vidare'}</h2>
        <p style={{ fontFamily: F.body, fontSize: 14.5, color: 'rgba(255,255,255,0.65)', lineHeight: 1.6, margin: 0 }}>{cta ? cta.text : 'Fråga PTO-assistenten direkt eller skicka ett ärende — vi svarar inom 24 timmar.'}</p>
      </div>
      <div style={{ display: 'flex', gap: 12, flexWrap: 'wrap' }}>
        {cta ? (
          <a href={cta.href} style={{ display: 'inline-flex', alignItems: 'center', gap: 8, padding: '13px 24px', background: C.green, color: '#1A2800', borderRadius: 9999, fontFamily: F.heading, fontSize: 13, fontWeight: 700, textTransform: 'uppercase', letterSpacing: '0.1em', textDecoration: 'none', boxShadow: `0 12px 30px ${hexA(C.green, 0.36)}` }}>
            <Icon name={cta.icon || 'arrow'} size={15} color="#1A2800"/> {cta.label}
          </a>
        ) : (
          <a href="/support?ai=1" style={{ display: 'inline-flex', alignItems: 'center', gap: 8, padding: '13px 24px', background: C.green, color: '#1A2800', borderRadius: 9999, fontFamily: F.heading, fontSize: 13, fontWeight: 700, textTransform: 'uppercase', letterSpacing: '0.1em', textDecoration: 'none', boxShadow: `0 12px 30px ${hexA(C.green, 0.36)}` }}>
            <Icon name="sparkles" size={15} color="#1A2800"/> Fråga assistenten
          </a>
        )}
        <a href="/support?ticket=1" style={{ display: 'inline-flex', alignItems: 'center', gap: 8, padding: '13px 24px', background: 'transparent', color: 'white', borderRadius: 9999, border: '1.5px solid rgba(255,255,255,0.3)', fontFamily: F.heading, fontSize: 13, fontWeight: 700, textTransform: 'uppercase', letterSpacing: '0.1em', textDecoration: 'none' }}>
          <Icon name="send" size={15} color="white"/> Skicka ärende
        </a>
      </div>
    </div>
  </section>
);

// ═══════════════ FOOTER ═══════════════
const ArticleFooter = () => (
  <footer style={{ background: C.dark, marginTop: 56, padding: '40px clamp(16px,4vw,40px) 26px' }}>
    <div style={{ maxWidth: 1080, margin: '0 auto', display: 'flex', alignItems: 'center', justifyContent: 'space-between', flexWrap: 'wrap', gap: 16 }}>
      <a href="/support" style={{ display: 'flex', alignItems: 'center', gap: 10, textDecoration: 'none' }}>
        <img src="assets/logo-mark.png" style={{ width: 30, height: 30, objectFit: 'contain' }} alt="PTO"/>
        <span style={{ fontFamily: F.heading, fontWeight: 800, textTransform: 'uppercase', letterSpacing: '0.08em', color: 'white', fontSize: 16 }}>Private Training Online</span>
      </a>
      <div style={{ display: 'flex', alignItems: 'center', gap: 20, flexWrap: 'wrap' }}>
        <a href={'mailto:' + CONTACT.email} style={{ fontFamily: F.body, fontSize: 13, color: 'rgba(255,255,255,0.6)', textDecoration: 'none' }}>{CONTACT.email}</a>
        <span style={{ fontFamily: F.heading, fontSize: 11.5, fontWeight: 700, textTransform: 'uppercase', letterSpacing: '0.1em', color: 'rgba(160,200,29,0.6)' }}>my.privatetrainingonline.se</span>
      </div>
    </div>
  </footer>
);

// ═══════════════ APP ═══════════════
const ArticleApp = () => {
  const slug = resolveSlug();
  const a = window.getArticle(slug);
  if (!a) {
    return <div style={{ minHeight: '100vh', background: gradientBgA, display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', gap: 16, padding: 24, textAlign: 'center' }}>
      <Icon name="help-circle" size={40} color={C.mutedLight}/>
      <p style={{ fontFamily: F.modern, fontSize: 18, fontWeight: 700, color: C.charcoal }}>Artikeln kunde inte hittas.</p>
      <a href="/support" style={{ fontFamily: F.heading, fontWeight: 700, textTransform: 'uppercase', letterSpacing: '0.1em', color: C.greenDeep, textDecoration: 'none' }}>Till Supportcenter →</a>
    </div>;
  }
  const toc = a.body.filter(b => b[0] === 'h2').map(b => ({ id: b[1], label: b[2] }));
  if (a.faq && a.faq.length) toc.push({ id: 'faq', label: 'Vanliga frågor' });
  return (
    <div style={{ minHeight: '100vh', background: gradientBgA }}>
      <ArticleNav/>
      <main style={{ maxWidth: 1080, margin: '0 auto', padding: '104px clamp(16px,4vw,40px) 0' }}>
        <div className="article-layout" style={{ display: 'grid', gridTemplateColumns: 'minmax(0, 1fr) 240px', gap: 'clamp(28px,5vw,64px)', alignItems: 'start' }}>
          <div style={{ minWidth: 0 }}>
            <ArticleBody a={a}/>
            <Feedback/>
            <Related slugs={a.related}/>
            <HelpCta cta={a.cta}/>
          </div>
          <TocSidebar toc={toc}/>
        </div>
      </main>
      <ArticleFooter/>
    </div>
  );
};

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