'use strict';

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

var vue = require('vue');
require('./json-xml-table-row.vue.js');
require('../../../../utils/index.js');
require('../config/index.js');
var createNamespace = require('../../../../utils/create-namespace.js');
var jsonXmlTableRow_vue_vue_type_script_setup_true_lang = require('./json-xml-table-row.vue2.js');
var jsonXml = require('../config/json-xml.js');

"use strict";
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
  ...{ name: "LlJsonXmlTable" },
  __name: "json-xml-table",
  props: jsonXml.jsonXmlTableProps,
  emits: jsonXml.jsonXmlTableEmits,
  setup(__props, { emit: __emit }) {
    const bem = createNamespace.createNamespace("json-xml");
    const props = __props;
    const emits = __emit;
    const handleChange = (child) => {
      emits("change", [child]);
    };
    return (_ctx, _cache) => {
      const _component_a_col = vue.resolveComponent("a-col");
      const _component_a_row = vue.resolveComponent("a-row");
      return vue.openBlock(), vue.createElementBlock(
        "div",
        {
          class: vue.normalizeClass(vue.unref(bem).e("table"))
        },
        [
          props.type === "xml" ? (vue.openBlock(), vue.createElementBlock(
            "div",
            {
              key: 0,
              class: vue.normalizeClass(vue.unref(bem).m("xml"))
            },
            vue.toDisplayString('<?xml version="1.0" encoding="UTF-8"?>'),
            2
            /* CLASS */
          )) : vue.createCommentVNode("v-if", true),
          vue.createVNode(_component_a_row, {
            class: vue.normalizeClass(vue.unref(bem).m("table-header")),
            gutter: 20
          }, {
            default: vue.withCtx(() => [
              vue.createVNode(_component_a_col, {
                span: 7,
                style: { "padding-left": "60px" }
              }, {
                default: vue.withCtx(() => [..._cache[0] || (_cache[0] = [
                  vue.createTextVNode(
                    " \u540D\u79F0 ",
                    -1
                    /* CACHED */
                  )
                ])]),
                _: 1
                /* STABLE */
              }),
              vue.createVNode(_component_a_col, { span: 3 }, {
                default: vue.withCtx(() => [..._cache[1] || (_cache[1] = [
                  vue.createTextVNode(
                    " \u7C7B\u578B ",
                    -1
                    /* CACHED */
                  )
                ])]),
                _: 1
                /* STABLE */
              }),
              vue.createVNode(_component_a_col, { span: 4 }, {
                default: vue.withCtx(() => [..._cache[2] || (_cache[2] = [
                  vue.createTextVNode(
                    " Mock ",
                    -1
                    /* CACHED */
                  )
                ])]),
                _: 1
                /* STABLE */
              }),
              vue.createVNode(_component_a_col, { span: 4 }, {
                default: vue.withCtx(() => [..._cache[3] || (_cache[3] = [
                  vue.createTextVNode(
                    " \u4E2D\u6587\u540D ",
                    -1
                    /* CACHED */
                  )
                ])]),
                _: 1
                /* STABLE */
              }),
              vue.createVNode(_component_a_col, { span: 4 }, {
                default: vue.withCtx(() => [..._cache[4] || (_cache[4] = [
                  vue.createTextVNode(
                    " \u8BF4\u660E ",
                    -1
                    /* CACHED */
                  )
                ])]),
                _: 1
                /* STABLE */
              }),
              vue.createVNode(_component_a_col, { span: 2 }, {
                default: vue.withCtx(() => [..._cache[5] || (_cache[5] = [
                  vue.createTextVNode(
                    " \u64CD\u4F5C ",
                    -1
                    /* CACHED */
                  )
                ])]),
                _: 1
                /* STABLE */
              })
            ]),
            _: 1
            /* STABLE */
          }, 8, ["class"]),
          vue.createElementVNode(
            "div",
            {
              class: vue.normalizeClass(vue.unref(bem).m("table-body"))
            },
            [
              (vue.openBlock(true), vue.createElementBlock(
                vue.Fragment,
                null,
                vue.renderList(props.dataSource, (item, index) => {
                  return vue.openBlock(), vue.createBlock(jsonXmlTableRow_vue_vue_type_script_setup_true_lang.default, {
                    key: index,
                    list: props.dataSource,
                    data: item,
                    "tree-key": (index + 1).toString(),
                    onChange: handleChange
                  }, null, 8, ["list", "data", "tree-key"]);
                }),
                128
                /* KEYED_FRAGMENT */
              ))
            ],
            2
            /* CLASS */
          )
        ],
        2
        /* CLASS */
      );
    };
  }
});

exports.default = _sfc_main;
//# sourceMappingURL=json-xml-table.vue2.js.map
