import "../../../../../node_modules/element-plus/es/index.mjs";
/* empty css                                                             */
import { computed, createElementBlock, openBlock, createCommentVNode, createElementVNode, createBlock, normalizeClass, createVNode, withCtx, unref, toDisplayString } from "vue";
import { Grid as grid_default } from "../../../../../node_modules/@element-plus/icons-vue/dist/index.mjs";
import H2Wrapper from "./H2Wrapper.vue.mjs";
import SubTitle from "./SubTitle.vue.mjs";
/* empty css               */
import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.mjs";
import { ElIcon } from "../../../../../node_modules/element-plus/es/components/icon/index.mjs";
const _hoisted_1 = { class: "sub-table-container" };
const _hoisted_2 = {
  key: 0,
  style: { "margin-bottom": "12px" }
};
const _hoisted_3 = {
  key: 0,
  class: "empty-state"
};
const _hoisted_4 = {
  key: 1,
  class: "table-content"
};
const _hoisted_5 = { class: "table-icon" };
const _hoisted_6 = { class: "table-info" };
const _hoisted_7 = ["title"];
const _hoisted_8 = ["title"];
const _sfc_main = {
  __name: "SubTable",
  props: {
    componentData: {
      type: Object,
      required: true
    }
  },
  setup(__props) {
    const props = __props;
    const titleMode = computed(() => {
      var _a;
      const mode = ((_a = props.componentData) == null ? void 0 : _a.titleMode) || "none";
      return mode;
    });
    const tableName = computed(() => {
      var _a;
      return ((_a = props.componentData) == null ? void 0 : _a.subTableName) || "";
    });
    const tableKey = computed(() => {
      var _a;
      return ((_a = props.componentData) == null ? void 0 : _a.subTableKey) || "";
    });
    return (_ctx, _cache) => {
      const _component_el_icon = ElIcon;
      return openBlock(), createElementBlock("div", _hoisted_1, [
        titleMode.value !== "none" ? (openBlock(), createElementBlock("div", _hoisted_2, [
          titleMode.value === "label" ? (openBlock(), createBlock(H2Wrapper, {
            key: 0,
            componentData: __props.componentData
          }, null, 8, ["componentData"])) : titleMode.value === "subLabel" ? (openBlock(), createBlock(SubTitle, {
            key: 1,
            componentData: __props.componentData
          }, null, 8, ["componentData"])) : createCommentVNode("", true)
        ])) : createCommentVNode("", true),
        createElementVNode("div", {
          class: normalizeClass(["sub-table-display", { "is-empty": !tableName.value, "has-table": tableName.value }])
        }, [
          !tableName.value ? (openBlock(), createElementBlock("div", _hoisted_3, [
            createVNode(_component_el_icon, { class: "icon" }, {
              default: withCtx(() => [
                createVNode(unref(grid_default))
              ]),
              _: 1
            }),
            _cache[0] || (_cache[0] = createElementVNode("div", { class: "text" }, "未配置子列表", -1))
          ])) : (openBlock(), createElementBlock("div", _hoisted_4, [
            createElementVNode("div", _hoisted_5, [
              createVNode(_component_el_icon, null, {
                default: withCtx(() => [
                  createVNode(unref(grid_default))
                ]),
                _: 1
              })
            ]),
            createElementVNode("div", _hoisted_6, [
              createElementVNode("div", {
                class: "table-name",
                title: tableName.value
              }, toDisplayString(tableName.value), 9, _hoisted_7),
              createElementVNode("div", {
                class: "table-key",
                title: tableKey.value
              }, toDisplayString(tableKey.value), 9, _hoisted_8)
            ])
          ]))
        ], 2)
      ]);
    };
  }
};
const SubTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8c97b459"]]);
export {
  SubTable as default
};
