import Sidebar from '@/components/layout/Sidebar'
import TopBar from '@/components/layout/TopBar'
import { DashboardLanguageSwitcher } from '@/components/I18nProvider'

export default function DashboardLayout({ children }: { children: React.ReactNode }) {
  return (
    <div className="flex min-h-screen bg-slate-50">
      <Sidebar />
      <div className="ml-64 flex min-h-screen min-w-0 flex-1 flex-col">
        <TopBar />
        <main className="flex-1 overflow-y-auto p-6">{children}</main>
        <footer className="border-t border-stone-200 bg-white/90 px-6 py-4 backdrop-blur-md transition-colors">
          <div className="flex flex-col items-center justify-between gap-3 lg:flex-row">
            <p className="text-xs font-medium uppercase tracking-[0.16em] text-stone-400">
              Workspace preferences
            </p>
            <div className="flex flex-col items-center gap-3 sm:flex-row">
              <DashboardLanguageSwitcher />
            </div>
          </div>
        </footer>
      </div>
    </div>
  )
}
