<script setup lang="ts">
import type { GlobalThemeOverrides } from "naive-ui";
import { zhCN } from "naive-ui";
import { useWebSocketStore } from "@/services";

const websocketStore = useWebSocketStore();

onMounted(() => {
  websocketStore.connect();
});

const themeOverrides: GlobalThemeOverrides = {
  common: {
    primaryColor: "#0094c5",
    primaryColorHover: "#00bfff",
    primaryColorPressed: "#007399",
    primaryColorSuppl: "#00bfff",
    fontWeightStrong: "600",
    borderRadius: "8px",
    borderRadiusSmall: "5px"
  },
  Button: {
    textColor: "#0094c5"
  }
};
</script>

<template>
  <NConfigProvider :theme-overrides="themeOverrides" :locale="zhCN">
    <NMessageProvider :max="3">
      <RouterView />
    </NMessageProvider>
  </NConfigProvider>
</template>
