import Vue from 'vue'
import App from './FaceDetector.vue'
import ElementUI from 'element-ui'
import '@/styles/element-ui.scss'
import '@/assets/css/index.css'
/*
import '@/styles/index.scss'
*/
import '@/styles/theme.scss'
import '@/icons'

// 红色雷锋侧边栏
if (process.env.VUE_APP_PROJECT === 'leifengjinianguan') {
  import('@/styles/project/leifeng/index.scss')
} else {
  import('@/styles/index.scss')
}

const Store = require('electron-store')
const localStore = new Store()
Vue.use(ElementUI, { size: 'small' })
// 本地存储
Vue.localStore = Vue.prototype.$localStore = localStore
faceapi.env.monkeyPatch({
  Canvas: HTMLCanvasElement,
  Image: HTMLImageElement,
  ImageData: ImageData,
  Video: HTMLVideoElement,
  createCanvasElement: () => document.createElement('canvas'),
  createImageElement: () => document.createElement('img')
})

Vue.config.productionTip = false

new Vue({
  render: h => h(App)
}).$mount('#app')
