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

export default function DashboardLayout({ children }: { children: React.ReactNode }) {
  return (
    <div className="flex min-h-screen bg-slate-50 transition-colors dark:bg-slate-950">
      <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 dark:border-slate-800 dark:bg-slate-950/90">
          <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 dark:text-slate-500">
              Workspace preferences
            </p>
            <div className="flex flex-col items-center gap-3 sm:flex-row">
              <DashboardLanguageSwitcher />
              <DashboardThemeSwitcher />
            </div>
          </div>
        </footer>
      </div>
    </div>
  )
}
