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

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

v.$mount()

document.body.appendChild(v.$el)

const load = v.$children[0]

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

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

export default {
  showLoading,
  hideLoading
}