'use strict';

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

var vue = require('vue');
require('../../../utils/index.js');
var collapse = require('./collapse.js');
var createNamespace = require('../../../utils/create-namespace.js');

"use strict";
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
  ...{ name: "LlCollapse" },
  __name: "collapse",
  props: collapse.collapseProps,
  setup(__props) {
    const bem = createNamespace.createNamespace("collapse");
    const attrs = vue.useAttrs();
    const props = __props;
    return (_ctx, _cache) => {
      const _component_ll_icon = vue.resolveComponent("ll-icon");
      const _component_a_collapse = vue.resolveComponent("a-collapse");
      return vue.openBlock(), vue.createBlock(_component_a_collapse, vue.mergeProps(vue.unref(attrs), {
        class: vue.unref(bem).b()
      }), vue.createSlots({
        _: 2
        /* DYNAMIC */
      }, [
        vue.renderList(Object.keys(_ctx.$slots).filter(
          (slot) => slot !== "expandIcon"
        ), (item) => {
          return {
            name: item,
            fn: vue.withCtx((data) => [
              vue.renderSlot(_ctx.$slots, item, vue.normalizeProps(vue.guardReactiveProps(data || {})))
            ])
          };
        }),
        _ctx.$slots.expandIcon || props.expandIcon ? {
          name: "expandIcon",
          fn: vue.withCtx((data) => [
            _ctx.$slots.expandIcon ? vue.renderSlot(_ctx.$slots, "expandIcon", vue.normalizeProps(vue.mergeProps({ key: 0 }, data))) : (vue.openBlock(), vue.createBlock(_component_ll_icon, {
              key: 1,
              style: vue.normalizeStyle({
                transform: data.isActive ? "rotate(90deg)" : "rotate(0deg)",
                transition: "all 0.3s ease"
              }),
              "icon-name": props.expandIcon
            }, null, 8, ["style", "icon-name"]))
          ]),
          key: "0"
        } : void 0
      ]), 1040, ["class"]);
    };
  }
});

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