import Vue from 'vue'
import XLoading from './Loading.vue'

const $vue = new Vue({
  render(createElement) {
    return createElement(XLoading)
  }
})

$vue.$mount()

document.body.appendChild($vue.$el)

const load = $vue.$children[0]

function showLoading() {
  (load as any).showLoading()
}

function hideLoading() {
  (load as any).hideLoading()
}

export default {
  showLoading,
  hideLoading
}