import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import piniaStore from "./store";
import register from "./components/register";
import V3DragZoom from "v3-drag-zoom";
import { message, notification, Modal } from "@qmth/ui";
import "@qmth/ui/lib/style.css";
import "v3-drag-zoom/dist/style.css";
import "virtual:uno.css";
import "./styles/index.less";
// import "./ap/mock/index.ts";
import { setGlobalOptions } from "vue-request";

setGlobalOptions({
  manual: true, //当 manual 设置为 true 时，你需要手动触发 run 或者 runAsync 才会发起请求 ,见vue-request文档：https://www.attojs.com/api/#manual
});
window.$message = message;
window.$notification = notification;
window.$info = Modal.info;
window.$success = Modal.success;
window.$error = Modal.error;
window.$warning = Modal.warning;
window.$confirm = Modal.confirm;
window.$destroyAll = Modal.destroyAll;

const app = createApp(App);

app.use(router).use(piniaStore).use(register).use(V3DragZoom);
app.mount("#app");
