<template>
  <a-config-provider
    :locale="locale"
    :theme="{
      token: {
        colorPrimary: '#00DD99',
        borderRadius: 0,
        paddingXS: 0,
      },
    }"
  >
    <router-view />
    <!-- <info-modal :visible="visible" v-if="visible" /> -->
  </a-config-provider>
</template>

<script setup lang="ts">
import InfoModal from './components/modal/index.vue'
import useUserStore from '@/store/modules/user'
const userStore = useUserStore()
import zhCN from 'ant-design-vue/es/locale/zh_CN'
import dayjs from 'dayjs'
import 'dayjs/locale/zh-cn'
dayjs.locale('zh-cn')
const locale = zhCN
const visible = computed(() => {
  return !!(!userStore?.userInfo?.infoState && userStore?.token)
})
// import { generateArray } from '@/utils/tools'
// console.log(generateArray(20))

// 事件跟踪函数
// const trackEvent = (eventName: string, eventParams: Record<string, any> = {}) => {
//   window.dataLayer?.push({
//     event: eventName,
//     ...eventParams
//   });
// };

// 使用示例
// const handleButtonClick = () => {
//   trackEvent('button_click', {
//     button_name: 'submit_button',
//     button_location: 'header'
//   });
// };
</script>
