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 { RouterProvider } from 'react-router';
import { AuthProvider } from './auth/AuthProvider';
import { router } from './router';
import './styles.css';

ReactDOM.createRoot(document.getElementById('root')!).render(
  <React.StrictMode>
    <ConfigProvider
      locale={zhCN}
      theme={{
        token: { colorPrimary: '#2169a8', borderRadius: 10, colorBgLayout: '#f3f6fa', fontFamily: "Inter, 'PingFang SC', 'Microsoft YaHei', sans-serif" },
        components: { Layout: { siderBg: '#102f52', headerBg: '#ffffff' }, Menu: { darkItemBg: '#102f52', darkItemSelectedBg: '#2169a8' } },
      }}
    >
      <AntApp>
        <AuthProvider><RouterProvider router={router} /></AuthProvider>
      </AntApp>
    </ConfigProvider>
  </React.StrictMode>,
);
