/**
 * @author: 阿瑞
 * @功能: 应用布局文件
 * @版本: 1.0.0
 */

import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import ThemeProvider from "@/components/ThemeProvider";
import { NotificationProvider, NotificationContainer } from '@/components/ui/Notification';

// 设置 Ant Design 兼容 React 19
import '@ant-design/v5-patch-for-react-19';

// 引入 Ant Design 样式
//import 'antd/dist/reset.css';
// 引入自定义毛玻璃风格样式
import '@/styles/antd-glass.css';

const geistSans = Geist({
  variable: "--font-geist-sans",
  subsets: ["latin"],
});

const geistMono = Geist_Mono({
  variable: "--font-geist-mono",
  subsets: ["latin"],
});

/* 站点元数据 */
export const metadata: Metadata = {
  title: "私域管理系统 - 现代团队协作平台",
  description: "基于最新毛玻璃UI设计的SaaS管理平台，为多团队环境打造的高效协作工具",
  keywords: ["SaaS", "团队协作", "项目管理", "毛玻璃UI", "Next.js"],
  authors: [{ name: "阿瑞", url: "https://github.com/arei" }],
  creator: "阿瑞",
  icons: {
    icon: "/favicon.ico",
  }
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="zh-CN">
      <body
        className={`${geistSans.variable} ${geistMono.variable} antialiased`}
        suppressHydrationWarning={true}
      >
        <ThemeProvider>
          <NotificationProvider>
            {children}
            <NotificationContainer position="top-right" />
            <NotificationContainer position="top-left" />
            <NotificationContainer position="bottom-right" />
            <NotificationContainer position="bottom-left" />
            <NotificationContainer position="top-center" />
            <NotificationContainer position="bottom-center" />
          </NotificationProvider>
        </ThemeProvider>
      </body>
    </html>
  );
}
