"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const vue = require("vue");
const comp = require("../../ui/src/comp.js");
const XEUtils = require("xe-utils");
require("../../ui/index.js");
const event = require("../../../../@vxe-ui/core/es/src/event.js");
const icon = require("../../../../@vxe-ui/core/es/src/icon.js");
const i18n = require("../../../../@vxe-ui/core/es/src/i18n.js");
const VxeEmptyComponent = comp.defineVxeComponent({
  name: "VxeEmpty",
  props: {
    imageUrl: String,
    imageStyle: Object,
    icon: String,
    status: String,
    content: [String, Number]
  },
  emits: [],
  setup(props, context) {
    const { emit } = context;
    const xID = XEUtils.uniqueId();
    const refElem = vue.ref();
    const reactData = vue.reactive({});
    const refMaps = {
      refElem
    };
    const computeMaps = {};
    const $xeEmpty = {
      xID,
      props,
      context,
      reactData,
      getRefMaps: () => refMaps,
      getComputeMaps: () => computeMaps
    };
    const dispatchEvent = (type, params, evnt) => {
      emit(type, event.createEvent(evnt, { $empty: $xeEmpty }, params));
    };
    const collapsePaneMethods = {
      dispatchEvent
    };
    const collapsePanePrivateMethods = {};
    Object.assign($xeEmpty, collapsePaneMethods, collapsePanePrivateMethods);
    const renderVN = () => {
      const { imageUrl, imageStyle, icon: icon$1, status, content } = props;
      return vue.h("div", {
        ref: refElem,
        class: ["vxe-empty", {
          [`theme--${status}`]: status
        }]
      }, [
        vue.h("div", {
          class: "vxe-empty--inner"
        }, [
          imageUrl ? vue.h("div", {
            class: "vxe-empty--img-wrapper"
          }, [
            vue.h("img", {
              src: imageUrl,
              style: imageStyle
            })
          ]) : vue.h("div", {
            class: "vxe-empty--icon-wrapper"
          }, [
            vue.h("i", {
              class: icon$1 || icon.getIcon().EMPTY_DEFAULT
            })
          ]),
          vue.h("div", {
            class: "vxe-empty--content-wrapper"
          }, `${content || i18n.getI18n("vxe.empty.defText")}`)
        ])
      ]);
    };
    $xeEmpty.renderVN = renderVN;
    return $xeEmpty;
  },
  render() {
    return this.renderVN();
  }
});
exports.default = VxeEmptyComponent;
