import { createApp } from 'vue'
import App from './App.vue'
import { setupI18n } from './locales'
import { setupAssets, setupScrollbarStyle } from './plugins'
import { setupStore } from './store'
import { setupRouter } from './router'
// import voiceInputButton from 'voice-input-button2'


// import IatRecorder from './utils/latRecorder.js'
// const iatRecorder = new IatRecorder('en_us', 'mandarin', '6d1b5e69') //小语种-中文方言-appId
// Vue.prototype.iatRecorder = iatRecorder

async function bootstrap() {
  const app = createApp(App)
  setupAssets()

  setupScrollbarStyle()

  setupStore(app)

  setupI18n(app)

  await setupRouter(app)

	// app.use(voiceInputButton, {
	// 	appId: '2eda6c2e', // 您申请的语音听写服务应用的ID
	// 	apiKey: 'MDEyMzE5YTc5YmQ5NjMwOTU1MWY4N2Y2', // 您开通的语音听写服务的 apiKey
	// 	apiSecret: '12ec1f9d113932575fc4b114a2f60ffd', // 您开通的语音听写服务的 apiSecret
	// 	color: '#fff', // 按钮图标的颜色
	// 	tipPosition: 'top' // 提示条位置
	// })

  app.mount('#app')
}

bootstrap()
