import 'normalize.css'
import 'vant/lib/index.css'
import 'viewerjs/dist/viewer.css'
import '@/styles/index.scss'

import { createApp } from 'vue'
import App from './App.vue'

// ✅ 全量引入 Vant 组件库（推荐）
import Vant from 'vant'

import vueDompurifyHTMLPlugin from 'vue-dompurify-html'
import VueViewer from 'v-viewer'
import { setupStore } from '@/stores'
import router from './router'
import { setToastDefaultOptions } from 'vant'

// 全局设置：仅对 showFailToast 生效
setToastDefaultOptions('fail', { duration: 1200 })

const app = createApp(App)

// 全局注册 vant
app.use(Vant)

app.use(setupStore)
app.use(router)
app.use(VueViewer)
app.use(vueDompurifyHTMLPlugin)

app.mount('#app')
