import { defineComponent as f, openBlock as t, createElementBlock as r, normalizeClass as l, unref as s, normalizeStyle as g, createElementVNode as o, Fragment as y, renderList as k, toDisplayString as i, createVNode as b, withCtx as x, createTextVNode as h } from "vue";
import { useNamespace as C, ElButton as E } from "element-plus";
import { wetErrorPageProps as N } from "../types.mjs";
const v = { class: "center__desc" }, P = /* @__PURE__ */ f({
  __name: "index",
  props: N,
  emits: ["backhome"],
  setup(p, { emit: m }) {
    const n = C("errorpage"), e = p, d = m, a = {
      404: {
        title: "404",
        desc: "对不起，资源不存在"
      },
      500: {
        title: "500",
        desc: "服务器错误，请稍后再试"
      }
    };
    return (w, c) => (t(), r("div", {
      class: l([s(n).b()]),
      style: g({
        "--wet-error-page-bg": `url(${e.backgroundImage || ""})`
      })
    }, [
      o("div", {
        class: l([s(n).e("center")])
      }, [
        o("h1", null, [
          (t(!0), r(y, null, k(a[e.type].title.split(""), (u, _) => (t(), r("span", {
            class: "center__desc-span",
            key: _
          }, i(u), 1))), 128))
        ]),
        o("div", v, i(a[e.type].desc), 1),
        b(s(E), {
          type: "primary",
          onClick: c[0] || (c[0] = () => d("backhome"))
        }, {
          default: x(() => [
            h("返回首页")
          ]),
          _: 1
        })
      ], 2)
    ], 6));
  }
});
export {
  P as default
};
