import Vue from 'vue'
import Select from './select'

import elementUtil from '../../common/scripts/elementUtil'

class VueSelect {
  constructor () {
    this._vm = undefined
  }
  show (option) {
    elementUtil.createElement('vum-show-select')

    this._vm = new Vue(Select)
    this._vm.$mount('[vum-show-select]')

    setTimeout(() => {
      this._vm.show(option)
    })
  }

  hide (index) {
    this._vm.returnItem(index)
  }
}

export default new VueSelect()
