import { createApp } from "vue";
import "./style.css";
import ElementPlus from "element-plus";
import zhCn from "element-plus/dist/locale/zh-cn.mjs";
import "element-plus/dist/index.css";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
import App from "./App.vue";

import router from "@/router";
import store from "@/store";

import "animate.css/animate.min.css";

import SvgIcon from "./components/SvgIcon/index.vue";
import "virtual:svg-icons-register";

import Viewer from "v-viewer";
import "viewerjs/dist/viewer.css";

const app = createApp(App);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

app.use(ElementPlus, {
  locale: zhCn,
});
app.use(router);
app.use(store);

app.component("svg-icon", SvgIcon);

app.use(Viewer, {
  Options: {
    inline: true,
    button: true, //右上角按钮
    navbar: true, //底部缩略图
    title: true, //当前图片标题
    toolbar: true, //底部工具栏
    tooltip: true, //显示缩放百分比
    movable: true, //是否可以移动
    zoomable: true, //是否可以缩放
    rotatable: true, //是否可旋转
    scalable: true, //是否可翻转
    transition: true, //使用 CSS3 过度
    fullscreen: true, //播放时是否全屏
    keyboard: true, //是否支持键盘
    url: "data-source",
  },
});

app.mount("#app");
app.config.devtools = true;
