import { Outlet, useLocation } from 'react-router-dom'
import Header from './Header'
import { Footer } from './Footer'
import { MarketStrip } from './MarketStrip'
import { LangProvider } from '@/context/LangContext'

export default function RootLayout() {
  const { pathname } = useLocation()
  return (
    <LangProvider>
      <div style={{ minHeight: '100dvh', display: 'flex', flexDirection: 'column' }}>
        <Header />
        {pathname === '/pulse' && <MarketStrip />}
        <main style={{ flex: 1 }}>
          <Outlet />
        </main>
        <Footer />
      </div>
    </LangProvider>
  )
}
