"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const index = require("../../../hooks/use-namespace/index.js");
const result = require("./result.js");
const Vue = require("vue");
var result_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ Vue.defineComponent({
  name: "ElResult",
  __name: "result",
  props: result.resultProps,
  setup(__props) {
    const props = __props;
    const ns = index.useNamespace("result");
    const resultIcon = Vue.computed(() => {
      const icon = props.icon;
      const iconClass = icon && result.IconMap[icon] ? result.IconMap[icon] : "icon-info";
      return {
        class: iconClass,
        component: result.IconComponentMap[iconClass] || result.IconComponentMap["icon-info"]
      };
    });
    return (_ctx, _cache) => {
      return Vue.openBlock(), Vue.createElementBlock("div", { class: Vue.normalizeClass(Vue.unref(ns).b()) }, [
        Vue.createElementVNode("div", { class: Vue.normalizeClass(Vue.unref(ns).e("icon")) }, [Vue.renderSlot(_ctx.$slots, "icon", {}, () => [resultIcon.value.component ? (Vue.openBlock(), Vue.createBlock(Vue.resolveDynamicComponent(resultIcon.value.component), {
          key: 0,
          class: Vue.normalizeClass(resultIcon.value.class)
        }, null, 8, ["class"])) : Vue.createCommentVNode("v-if", true)])], 2),
        __props.title || _ctx.$slots.title ? (Vue.openBlock(), Vue.createElementBlock("div", {
          key: 0,
          class: Vue.normalizeClass(Vue.unref(ns).e("title"))
        }, [Vue.renderSlot(_ctx.$slots, "title", {}, () => [Vue.createElementVNode("p", null, Vue.toDisplayString(__props.title), 1)])], 2)) : Vue.createCommentVNode("v-if", true),
        __props.subTitle || _ctx.$slots["sub-title"] ? (Vue.openBlock(), Vue.createElementBlock("div", {
          key: 1,
          class: Vue.normalizeClass(Vue.unref(ns).e("subtitle"))
        }, [Vue.renderSlot(_ctx.$slots, "sub-title", {}, () => [Vue.createElementVNode("p", null, Vue.toDisplayString(__props.subTitle), 1)])], 2)) : Vue.createCommentVNode("v-if", true),
        _ctx.$slots.extra ? (Vue.openBlock(), Vue.createElementBlock("div", {
          key: 2,
          class: Vue.normalizeClass(Vue.unref(ns).e("extra"))
        }, [Vue.renderSlot(_ctx.$slots, "extra")], 2)) : Vue.createCommentVNode("v-if", true)
      ], 2);
    };
  }
});
exports.default = result_vue_vue_type_script_setup_true_lang_default;
