<template>
  <router-view />
</template>

<script lang="ts" setup>
import { onBeforeMount } from 'vue';

import { useUser } from './services/user';
import { changeTheme, registerTheme } from './services/echarts';
import { useEnterprise } from './services/enterprise';

const { getUser } = useUser();
const { getEnterprise } = useEnterprise();

onBeforeMount(() => {
  getEnterprise();
  setTimeout(() => {
    registerTheme();
    changeTheme('le-dark');
  });
  setTimeout(() => {
    getUser();
  }, 1000);
});
</script>
<style lang="postcss" scoped></style>
