import { createApp as e, createVNode as n } from "vue";
import { APConfigProvider as o } from "../config-provider/index.mjs";
import "./index.vue.mjs";
import r from "./index.vue2.mjs";
class h {
  _options = {
    _globalMark: !0
  };
  container = null;
  app = null;
  instance = null;
  constructor(t) {
    t && (this._options = {
      ...this._options,
      ...t
    });
  }
  _getInstance() {
    return this.instance ? this.instance : (this.container = document.createElement("div"), this.app = e(n(o, null, {
      default: () => [n(r, {
        ref: (t) => this.instance = t
      }, null)]
    })), this.app.mount(this.container), document.body.appendChild(this.container.firstElementChild), this.instance);
  }
  open(t) {
    const i = {
      ...this._options,
      ...t
    };
    this._getInstance().start(i);
  }
}
export {
  h as LoadingBar
};
