'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var vue = require('vue');
var index = require('../../svg-icon/index.js');
var vueRouter = require('vue-router');

"use strict";
const _hoisted_1 = { class: "me-page-result" };
const _hoisted_2 = { class: "container" };
const _hoisted_3 = { class: "empty" };
const _hoisted_4 = { class: "empty-header" };
const _hoisted_5 = ["src"];
const _hoisted_6 = { class: "empty-title" };
const _hoisted_7 = { class: "empty-subtitle" };
const _hoisted_8 = { class: "empty-action" };
const __default__ = vue.defineComponent({
  name: "me-page-result"
});
var script = /* @__PURE__ */ vue.defineComponent({
  ...__default__,
  props: {
    title: { type: String, required: false, default: "\u9519\u8BEF\u64CD\u4F5C" },
    desc: { type: String, required: false, default: "We are sorry but our server encountered an internal error" },
    btnText: { type: String, required: false, default: "\u8FD4\u56DE\u4E0A\u4E00\u9875" },
    btnClickHandler: { type: Function, required: false },
    img: { type: String, required: false, default: "" }
  },
  setup(__props) {
    const props = __props;
    const router = vueRouter.useRouter();
    const ToBack = () => {
      if (router) {
        router.back();
      }
    };
    const handleAction = () => {
      if (props.btnClickHandler) {
        props.btnClickHandler();
      } else {
        ToBack();
      }
    };
    return (_ctx, _cache) => {
      return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
        vue.createElementVNode("div", _hoisted_2, [
          vue.createElementVNode("div", _hoisted_3, [
            vue.createElementVNode("div", _hoisted_4, [
              vue.createElementVNode("img", {
                alt: "",
                style: { "height": "36px" },
                src: __props.img
              }, null, 8, _hoisted_5)
            ]),
            vue.createElementVNode(
              "div",
              _hoisted_6,
              vue.toDisplayString(__props.title),
              1
              /* TEXT */
            ),
            vue.createElementVNode(
              "div",
              _hoisted_7,
              vue.toDisplayString(__props.desc),
              1
              /* TEXT */
            ),
            vue.createElementVNode("div", _hoisted_8, [
              vue.renderSlot(_ctx.$slots, "action", {}, () => [
                vue.createElementVNode("div", {
                  class: "empty-action__btn",
                  onClick: handleAction
                }, [
                  vue.createElementVNode("div", null, [
                    vue.createVNode(vue.unref(index.MeSvgIcon), {
                      style: { "width": "1.25rem", "height": "1.25rem", "margin": "0 12px 0 -4px" },
                      name: "ri-arrow-left-line"
                    })
                  ]),
                  vue.createTextVNode(
                    " " + vue.toDisplayString(__props.btnText),
                    1
                    /* TEXT */
                  )
                ])
              ])
            ])
          ])
        ])
      ]);
    };
  }
});

exports.default = script;
//# sourceMappingURL=page-result.vue2.js.map
