"use client"

import { usePathname } from "next/navigation"
import { SiteHeader } from "@/components/layout/site-header"
import { SportsSidebar } from "@/components/layout/sports-sidebar"
import { RightPanel } from "@/components/layout/right-panel"
import { SiteFooter } from "@/components/layout/site-footer"

export default function LayoutClientWrapper({ children }: { children: React.ReactNode }) {
  const pathname = usePathname()
  const isLivePage = pathname === "/live"

  return (
    <div className="flex min-h-screen flex-col">
      <SiteHeader />
      <div className="flex w-full flex-1 gap-0">
        {!isLivePage && <SportsSidebar />}
        <main className="flex-1 px-2 py-3 min-w-0">{children}</main>
        <RightPanel />
      </div>
      <SiteFooter />
    </div>
  )
}
