import { createRoot } from "react-dom/client";
import { RouterProvider } from "react-router-dom";
import { Toaster } from "sonner";
import { router } from "./routes";
import "./utils/i18n"; // 初始化 i18n
import { env } from "./utils/env";
import "./index.css";
import "antd/dist/reset.css"; // 引入 Ant Design 样式（antd 5.x+ 使用 reset.css）

// 设置页面标题
document.title = env.appTitle;

createRoot(document.getElementById("root")!).render(
  <>
    <RouterProvider router={router} />
    <Toaster position="top-center" richColors />
  </>
);
