text: import Loading from './Loading'
  
  import { VueInstance } from '../../utils/config'
  import { merge } from '../../utils/helpers'
  import { use, registerComponent, registerComponentProgrammatic } from '../../utils/plugins'
  
  let localVueInstance
  
  const LoadingProgrammatic = {
      open(params) {
          const defaultParam = {
              programmatic: true
          }
          const propsData = merge(defaultParam, params)
  
          const vm = typeof window !== 'undefined' && window.Vue ? window.Vue : localVueInstance || VueInstance
          const LoadingComponent = vm.extend(Loading)
          return new LoadingComponent({
              el: document.createElement('div'),
              propsData
          })
      }
  }
  
  const Plugin = {
      install(Vue) {
          localVueInstance = Vue
          registerComponent(Vue, Loading)
          registerComponentProgrammatic(Vue, 'loading', LoadingProgrammatic)
      }
  }
  
  use(Plugin)
  
  export default Plugin
  
  export {
      LoadingProgrammatic,
      Loading as BLoading
  }
  