import React from "react";
import ReactDOM from "react-dom/client";
import { App as AntApp, ConfigProvider } from "antd";
import zhCN from "antd/locale/zh_CN";
import App from "./App";
import "./styles.css";

ReactDOM.createRoot(document.getElementById("root")!).render(
  <React.StrictMode>
    <ConfigProvider
      locale={zhCN}
      theme={{
        token: {
          colorPrimary: "#0f5c45",
          colorInfo: "#0f5c45",
          colorSuccess: "#0f5c45",
          colorWarning: "#c45c26",
          colorError: "#b42318",
          borderRadius: 8,
          fontFamily: '"Manrope", "Segoe UI", sans-serif',
          colorBgLayout: "#eef3f0",
          colorBgContainer: "#ffffff",
          controlHeight: 36,
        },
        components: {
          Layout: {
            siderBg: "#ffffff",
            headerBg: "#ffffff",
            bodyBg: "#eef3f0",
          },
          Menu: {
            itemBorderRadius: 8,
            itemMarginInline: 8,
          },
          Card: {
            borderRadiusLG: 12,
          },
        },
      }}
    >
      <AntApp>
        <App />
      </AntApp>
    </ConfigProvider>
  </React.StrictMode>
);
