import {Navbar1} from "@/components/layouts/Navbar"
import {SideBarOld} from '@/components/layouts/SideBar/SideBarOld'
import '@/styles/globals.css'
import { ThemeProvider } from 'next-themes'
import { Building2, Users, Cog, Activity, Mail } from 'lucide-react'

const centralConfigData = {
  navMain: [
    {
      title: "租户管理",
      url: "/central-config/tenant",
      icon: <Building2 className="w-4 h-4" />,
      items: [
        {
          title: "企业审核",
          url: "/central-config/tenant/enterprise-audit",
          isActive: false
        },
        {
          title: "审核历史",
          url: "/central-config/tenant/audit-history",
          isActive: false
        },
        {
          title: "企业信息",
          url: "/central-config/tenant/enterprise-info",
          isActive: false
        },
        {
          title: "用户管理",
          url: "/central-config/tenant/user-management",
          isActive: false
        }
      ]
    },
    {
      title: "用户管理",
      url: "/central-config/user",
      icon: <Users className="w-4 h-4" />,
      items: [
        {
          title: "员工管理",
          url: "/central-config/user/employee",
          isActive: false
        },
        {
          title: "角色管理",
          url: "/central-config/user/role",
          isActive: false
        },
        {
          title: "菜单管理",
          url: "/central-config/user/menu",
          isActive: false
        },
        {
          title: "权限配置管理",
          url: "/central-config/user/permission",
          isActive: false
        }
      ]
    },
    {
      title: "系统参数",
      url: "/central-config/system",
      icon: <Cog className="w-4 h-4" />,
      items: [
        {
          title: "系统设置",
          url: "/central-config/system/settings",
          isActive: false
        },
        {
          title: "分类字典",
          url: "/central-config/system/category",
          isActive: false
        },
        {
          title: "数据字典",
          url: "/central-config/system/dictionary",
          isActive: false
        }
      ]
    },
    {
      title: "系统监控",
      url: "/central-config/monitor",
      icon: <Activity className="w-4 h-4" />,
      items: [
        {
          title: "登录日志",
          url: "/central-config/monitor/login-log",
          isActive: false
        },
        {
          title: "操作日志",
          url: "/central-config/monitor/operation-log",
          isActive: false
        },
        {
          title: "性能监控",
          url: "/central-config/monitor/performance",
          isActive: false
        },
        {
          title: "网络日志",
          url: "/central-config/monitor/network-log",
          isActive: false
        }
      ]
    },
    {
      title: "消息中心",
      url: "/central-config/message",
      icon: <Mail className="w-4 h-4" />,
      items: [
        {
          title: "消息发送",
          url: "/central-config/message/send",
          isActive: false
        },
        {
          title: "消息模版",
          url: "/central-config/message/template",
          isActive: false
        },
        {
          title: "消息日志",
          url: "/central-config/message/log",
          isActive: false
        }
      ]
    }
  ]
}

export default function RootLayout({
  children,
}: {
  children: React.ReactNode
}) {
  return (
    <html lang="zh-CN" suppressHydrationWarning>
      <body suppressHydrationWarning>
        <ThemeProvider
          attribute="class"
          defaultTheme="system"
          enableSystem
          disableTransitionOnChange
        >
          <div className="bodyFlexUpDown">
            <Navbar1 />
            <div className="bodySon2">
              <SideBarOld data={centralConfigData}>
                {children}
              </SideBarOld>
            </div>
          </div>
        </ThemeProvider>
      </body>
    </html>
  )
}