import { createRoot } from "react-dom/client"
import App from "./App.tsx"
import { StoreContext } from "@/stores/utils"
import store from "@/stores"
import { ThemeConfig } from "antd"
import { XProvider } from "@ant-design/x"
import zhCN from "antd/locale/zh_CN" // 引入中文语言包
import "./index.scss"
import "antd/dist/reset.css"
import { setWindowHeight } from "@/utils/tools.ts"
setWindowHeight()
window.onresize = () => {
  setWindowHeight()
}

const config: ThemeConfig = {
  token: {
    colorPrimary: "#6633ff",
  },
}
createRoot(document.getElementById("root")!).render(
  <XProvider theme={config} locale={zhCN} wave={{ disabled: true }}>
    <StoreContext.Provider value={store}>
      <App />
    </StoreContext.Provider>
  </XProvider>
)
