import { createApp } from "vue";
import "@/assets/css/common.scss";
import "@/assets/css/transition.scss";
import "@/assets/css/element.scss";
import "dayjs/locale/zh-cn";
import App from "./App";
import pinia from "./pinia";
import router from "./router";
import "normalize.css";
import "animate.css";
import "viewerjs/dist/viewer.css";
import VueViewer from "v-viewer";
import print from "vue3-print-nb";
import button from "@/assets/js/button";
import "./addRouters";
import "element-plus/es/components/loading/style/css";
import "element-plus/es/components/message/style/css";
import "element-plus/es/components/message-box/style/css";
import "element-plus/es/components/notification/style/css";
import { install } from "@icon-park/vue-next/es/all";
import LayoutTable from "@/components/table/index.vue";
import LayoutCard from "@/components/card/index.vue";
import ElDialog from "element-plus/es/components/dialog/index";

ElDialog.props.closeOnClickModal.default = false;
ElDialog.props.closeOnPressEscape.default = false;
const app = createApp(App);
app.component("layout-table", LayoutTable);
app.component("layout-card", LayoutCard);
install(app, "icon");
app
  .use(pinia)
  .use(router)
  .use(VueViewer, {
    defaultOptions: {
      zIndex: 9999,
    },
  })
  .use(print)
  .use(button)
  .mount("#app");
