'use strict';

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

var vue = require('vue');
require('../../../utils/index.js');
require('../../form/src/components/form-component.vue.js');
var descriptions = require('./descriptions.js');
var createNamespace = require('../../../utils/create-namespace.js');
var formComponent_vue_vue_type_script_setup_true_lang = require('../../form/src/components/form-component.vue2.js');

"use strict";
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
  ...{ name: "LlDescriptions" },
  __name: "descriptions",
  props: descriptions.descriptionsProps,
  setup(__props) {
    const attrs = vue.useAttrs();
    const bem = createNamespace.createNamespace("descriptions");
    const formComponents = vue.ref([]);
    return (_ctx, _cache) => {
      const _component_ll_descriptions_item = vue.resolveComponent("ll-descriptions-item");
      const _component_ll_icon = vue.resolveComponent("ll-icon");
      const _component_a_descriptions = vue.resolveComponent("a-descriptions");
      return vue.openBlock(), vue.createBlock(_component_a_descriptions, vue.mergeProps({
        class: vue.unref(bem).b()
      }, vue.unref(attrs)), vue.createSlots({
        default: vue.withCtx(() => [
          vue.renderSlot(_ctx.$slots, "default", {}, () => [
            (vue.openBlock(true), vue.createElementBlock(
              vue.Fragment,
              null,
              vue.renderList(_ctx.list, (item, i) => {
                return vue.openBlock(), vue.createBlock(
                  _component_ll_descriptions_item,
                  vue.mergeProps({ ref_for: true }, item, { key: i }),
                  {
                    label: vue.withCtx(() => [
                      vue.renderSlot(_ctx.$slots, "label", { item }, () => [
                        vue.createTextVNode(
                          vue.toDisplayString(item.label),
                          1
                          /* TEXT */
                        )
                      ])
                    ]),
                    default: vue.withCtx(() => [
                      vue.renderSlot(_ctx.$slots, "item-content", { item }, () => [
                        item.type ? (vue.openBlock(), vue.createBlock(formComponent_vue_vue_type_script_setup_true_lang.default, {
                          key: 0,
                          ref_for: true,
                          ref: (el) => formComponents.value[i] = el,
                          item,
                          "form-data": _ctx.data
                        }, null, 8, ["item", "form-data"])) : (vue.openBlock(), vue.createElementBlock(
                          vue.Fragment,
                          { key: 1 },
                          [
                            vue.createTextVNode(
                              vue.toDisplayString(_ctx.data?.[item?.key] || ""),
                              1
                              /* TEXT */
                            )
                          ],
                          64
                          /* STABLE_FRAGMENT */
                        ))
                      ])
                    ]),
                    _: 2
                    /* DYNAMIC */
                  },
                  1040
                  /* FULL_PROPS, DYNAMIC_SLOTS */
                );
              }),
              128
              /* KEYED_FRAGMENT */
            ))
          ])
        ]),
        _: 2
        /* DYNAMIC */
      }, [
        _ctx.$slots["title"] || _ctx.title || _ctx.titleIcon?.iconName ? {
          name: "title",
          fn: vue.withCtx(() => [
            _ctx.titleIcon?.iconName ? (vue.openBlock(), vue.createBlock(
              _component_ll_icon,
              vue.normalizeProps(vue.mergeProps({ key: 0 }, _ctx.titleIcon)),
              null,
              16
              /* FULL_PROPS */
            )) : vue.createCommentVNode("v-if", true),
            vue.renderSlot(_ctx.$slots, "title", {}, () => [
              vue.createElementVNode(
                "span",
                {
                  style: vue.normalizeStyle({ fontSize: `${_ctx.titleSize}px`, color: _ctx.titleColor })
                },
                vue.toDisplayString(_ctx.title),
                5
                /* TEXT, STYLE */
              )
            ])
          ]),
          key: "0"
        } : void 0,
        _ctx.$slots["extra"] ? {
          name: "extra",
          fn: vue.withCtx(() => [
            vue.renderSlot(_ctx.$slots, "extra")
          ]),
          key: "1"
        } : void 0
      ]), 1040, ["class"]);
    };
  }
});

exports.default = _sfc_main;
//# sourceMappingURL=descriptions.vue2.js.map
