import { defineComponent, useAttrs, resolveComponent, createBlock, openBlock, mergeProps, unref, createSlots, withCtx, renderSlot, createElementBlock, Fragment, createCommentVNode, createTextVNode, toDisplayString, renderList, normalizeProps, guardReactiveProps } from 'vue';
import '../../../utils/index.mjs';
import { collapsePanelProps } from './collapse.mjs';
import { createNamespace } from '../../../utils/create-namespace.mjs';

"use strict";
var _sfc_main = /* @__PURE__ */ defineComponent({
  ...{ name: "LlCollapsePanel" },
  __name: "collapse-panel",
  props: collapsePanelProps,
  setup(__props) {
    const bem = createNamespace("collapse-panel");
    const attrs = useAttrs();
    return (_ctx, _cache) => {
      const _component_ll_icon = resolveComponent("ll-icon");
      const _component_a_collapse_panel = resolveComponent("a-collapse-panel");
      return openBlock(), createBlock(_component_a_collapse_panel, mergeProps({
        collapsible: _ctx.disabled || void 0
      }, unref(attrs), {
        class: unref(bem).b()
      }), createSlots({
        header: withCtx(() => [
          _ctx.$slots.header ? renderSlot(_ctx.$slots, "header", { key: 0 }) : (openBlock(), createElementBlock(
            Fragment,
            { key: 1 },
            [
              _ctx.headerIcon.iconName ? (openBlock(), createBlock(_component_ll_icon, mergeProps({ key: 0 }, _ctx.headerIcon, {
                style: {
                  marginRight: _ctx.iconSpace + "px"
                }
              }), null, 16, ["style"])) : createCommentVNode("v-if", true),
              createTextVNode(
                " " + toDisplayString(_ctx.header),
                1
                /* TEXT */
              )
            ],
            64
            /* STABLE_FRAGMENT */
          ))
        ]),
        extra: withCtx(() => [
          renderSlot(_ctx.$slots, "extra")
        ]),
        _: 2
        /* DYNAMIC */
      }, [
        renderList(Object.keys(_ctx.$slots).filter(
          (slot) => slot !== "extra" && slot !== "header"
        ), (item) => {
          return {
            name: item,
            fn: withCtx((data) => [
              renderSlot(_ctx.$slots, item, normalizeProps(guardReactiveProps(data || {})))
            ])
          };
        })
      ]), 1040, ["collapsible", "class"]);
    };
  }
});

export { _sfc_main as default };
//# sourceMappingURL=collapse-panel.vue2.mjs.map
