import "../styles/reset.css";
import "./collapse.less";
import { PropTypes as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__, renderDirectiveType as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_renderDirectiveType__, withInstallProps as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_withInstallProps__ } from "../shared";
import { Fragment as __WEBPACK_EXTERNAL_MODULE_vue_Fragment__, computed as __WEBPACK_EXTERNAL_MODULE_vue_computed__, createVNode as __WEBPACK_EXTERNAL_MODULE_vue_createVNode__, defineComponent as __WEBPACK_EXTERNAL_MODULE_vue_defineComponent__, h as __WEBPACK_EXTERNAL_MODULE_vue_h__, inject as __WEBPACK_EXTERNAL_MODULE_vue_inject__, isVNode as __WEBPACK_EXTERNAL_MODULE_vue_isVNode__, provide as __WEBPACK_EXTERNAL_MODULE_vue_provide__, ref as __WEBPACK_EXTERNAL_MODULE_vue_ref__, renderSlot as __WEBPACK_EXTERNAL_MODULE_vue_renderSlot__, vShow as __WEBPACK_EXTERNAL_MODULE_vue_vShow__, watch as __WEBPACK_EXTERNAL_MODULE_vue_watch__, withDirectives as __WEBPACK_EXTERNAL_MODULE_vue_withDirectives__ } from "vue";
import { usePrefix as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_usePrefix__ } from "../config-provider";
import { default as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_collapse_transition_3d6ae990_default__ } from "../collapse-transition";
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__ from "../icon";

;// external "../shared"

;// external "vue"

;// ../../node_modules/@babel/runtime/helpers/esm/typeof.js
function _typeof(o) {
  "@babel/helpers - typeof";

  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
    return typeof o;
  } : function (o) {
    return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
  }, _typeof(o);
}

;// ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js

function toPrimitive(t, r) {
  if ("object" != _typeof(t) || !t) return t;
  var e = t[Symbol.toPrimitive];
  if (void 0 !== e) {
    var i = e.call(t, r || "default");
    if ("object" != _typeof(i)) return i;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return ("string" === r ? String : Number)(t);
}

;// ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js


function toPropertyKey(t) {
  var i = toPrimitive(t, "string");
  return "symbol" == _typeof(i) ? i : i + "";
}

;// ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js

function _defineProperty(e, r, t) {
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
    value: t,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : e[r] = t, e;
}

;// ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
function _arrayLikeToArray(r, a) {
  (null == a || a > r.length) && (a = r.length);
  for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
  return n;
}

;// ../../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js

function _arrayWithoutHoles(r) {
  if (Array.isArray(r)) return _arrayLikeToArray(r);
}

;// ../../node_modules/@babel/runtime/helpers/esm/iterableToArray.js
function _iterableToArray(r) {
  if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
}

;// ../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js

function _unsupportedIterableToArray(r, a) {
  if (r) {
    if ("string" == typeof r) return _arrayLikeToArray(r, a);
    var t = {}.toString.call(r).slice(8, -1);
    return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
  }
}

;// ../../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function _nonIterableSpread() {
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}

;// ../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js




function _toConsumableArray(r) {
  return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
}

;// external "../config-provider"

;// external "../collapse-transition"

;// external "../icon"
const icon_namespaceObject = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__;
;// ../../packages/collapse/src/props.ts

function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
/*
 * Tencent is pleased to support the open source community by making
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 *
 * Copyright (C) 2025 Tencent.  All rights reserved.
 *
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
 *
 * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
 *
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */

var propsCollapse = {
  /**
   * 渲染列表
   * 对象数组或者字符串数组，字符串数组默认会增加 name 字段，值为传入的字符串值
   */
  list: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.arrayOf(__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.any).def([]),
  /**
   * ID字段
   */
  idFiled: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.string.def('$index'),
  /**
   * Title 字段
   */
  titleField: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.string.def('name'),
  /**
   * Content 字段，默认渲染内容，不配置时自动读取 content 字段
   * 自定义配置slot时可以忽略
   */
  contentField: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.string.def('content'),
  /**
   * 当前激活Index
   */
  modelValue: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.oneOfType([__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.arrayOf(__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.number).def([]), __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.arrayOf(__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.string).def([]), __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.number.def(-1)]),
  /**
   * 是否使用手风琴效果
   */
  accordion: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool.def(false),
  /**
   * 是否使用带线条样式
   */
  hasHeaderBorder: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool.def(false),
  /**
   * 是否使用Hover效果
   */
  hasHeaderHover: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool.def(true),
  /**
   * 自定义图标
   */
  headerIcon: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.string.def(''),
  /**
   * 是否使用卡片样式
   */
  useCardTheme: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool.def(false),
  /**
   * 图标位置
   */
  headerIconAlign: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.string.def('left'),
  /**
   * 是否使用色块样式
   */
  useBlockTheme: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool.def(false)
};
var CollapsePanelEventProps = {
  itemClick: {
    type: Function
  }
};
var propsCollapsePanel = _objectSpread({
  name: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.oneOfType([__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.number, __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.string]).def(''),
  title: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.any,
  content: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.string,
  disabled: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool.def(false),
  isFormList: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool.def(false),
  renderDirective: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_renderDirectiveType__(),
  modelValue: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool.def(false),
  alone: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool.def(false),
  icon: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.string.def('angle-right')
}, CollapsePanelEventProps);
;// ../../packages/collapse/src/collapse-panel.tsx
/*
 * Tencent is pleased to support the open source community by making
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 *
 * Copyright (C) 2025 Tencent.  All rights reserved.
 *
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
 *
 * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
 *
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */





function _isSlot(s) {
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !__WEBPACK_EXTERNAL_MODULE_vue_isVNode__(s);
}
/* harmony default export */ const collapse_panel = (__WEBPACK_EXTERNAL_MODULE_vue_defineComponent__({
  name: 'CollapsePanel',
  props: propsCollapsePanel,
  emits: ['change', 'update:modelValue', 'after-leave', 'before-enter'],
  setup: function setup(props, _ref) {
    var emit = _ref.emit,
      slots = _ref.slots;
    var localActiveItems = null;
    var handleItemClick = null;
    var isActive = __WEBPACK_EXTERNAL_MODULE_vue_ref__(props.modelValue);
    __WEBPACK_EXTERNAL_MODULE_vue_watch__(function () {
      return props.modelValue;
    }, function (newVal) {
      isActive.value = newVal;
    });
    // 如果单独使用，避免报 injection "*" not found. 相比getCurrentInstance()?.parent.type.name 方法简洁
    if (!props.alone) {
      localActiveItems = __WEBPACK_EXTERNAL_MODULE_vue_inject__('localActiveItems');
      handleItemClick = __WEBPACK_EXTERNAL_MODULE_vue_inject__('handleItemClick');
      __WEBPACK_EXTERNAL_MODULE_vue_watch__(localActiveItems, function (newVal) {
        if (newVal !== null && newVal !== void 0 && newVal.length) {
          isActive.value = newVal.includes(props.name);
        } else {
          isActive.value = false;
        }
      }, {
        immediate: true
      });
    }
    var _usePrefix = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_usePrefix__(),
      resolveClassName = _usePrefix.resolveClassName;
    function toCamelCase(str) {
      var words = str.split('-');
      var camelCaseWords = words.map(function (word) {
        return word.charAt(0).toUpperCase() + word.slice(1);
      });
      return camelCaseWords.join('');
    }
    function clickItem() {
      var disabled = props.disabled,
        name = props.name,
        itemClick = props.itemClick;
      if (disabled) return;
      var data = {
        name: name
      };
      isActive.value = !isActive.value;
      emit('update:modelValue', isActive.value);
      emit('change', data);
      if (typeof itemClick === 'function') {
        itemClick(data);
      } else if (typeof handleItemClick === 'function') {
        handleItemClick({
          name: name
        });
      }
    }
    function getContent() {
      if (slots.content) {
        return slots.content(__WEBPACK_EXTERNAL_MODULE_vue_h__);
      }
      return props.content;
    }
    function renderPanel() {
      if (props.renderDirective === 'if' && !isActive.value) {
        return '';
      }
      return __WEBPACK_EXTERNAL_MODULE_vue_withDirectives__(__WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
        "class": "".concat(resolveClassName('collapse-content'), " ").concat(isActive.value && 'active' || '')
      }, [getContent()]), [[__WEBPACK_EXTERNAL_MODULE_vue_vShow__, isActive.value]]);
    }
    function renderHeader(icon) {
      if (slots.header) {
        if (typeof slots.header === 'function') {
          return slots.header(__WEBPACK_EXTERNAL_MODULE_vue_h__);
        }
        return slots.header;
      }
      var title;
      if (slots["default"]) {
        if (typeof slots["default"] === 'function') {
          title = slots["default"](__WEBPACK_EXTERNAL_MODULE_vue_h__);
        } else {
          title = slots["default"];
        }
      } else {
        title = props.title;
      }
      return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_vue_Fragment__, null, [__WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
        "class": "".concat(resolveClassName('collapse-header'))
      }, [__WEBPACK_EXTERNAL_MODULE_vue_createVNode__("span", {
        "class": "".concat(resolveClassName('collapse-title'))
      }, [title]), icon])]);
    }
    return {
      isActive: isActive,
      collapseIcon: icon_namespaceObject["".concat(toCamelCase(props.icon))],
      clickItem: clickItem,
      renderPanel: renderPanel,
      renderHeader: renderHeader,
      resolveClassName: resolveClassName
    };
  },
  render: function render() {
    var _slot;
    var _this = this;
    return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
      "class": "".concat(this.resolveClassName('collapse-item'), " ").concat(this.disabled ? 'is-disabled' : '', " ").concat(this.isActive ? "".concat(this.resolveClassName('collapse-item-active')) : '')
    }, [__WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
      "onClick": function onClick() {
        return _this.clickItem();
      }
    }, [this.renderHeader(__WEBPACK_EXTERNAL_MODULE_vue_createVNode__(this.collapseIcon, {
      "class": "".concat(this.resolveClassName('collapse-icon'), " ").concat(this.isActive && 'rotate-icon' || '')
    }, null))]), __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_collapse_transition_3d6ae990_default__, null, _isSlot(_slot = this.renderPanel()) ? _slot : {
      "default": function _default() {
        return [_slot];
      }
    })]);
  }
}));
;// ../../packages/collapse/src/collapse.tsx



function collapse_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function collapse_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? collapse_ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : collapse_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
/*
 * Tencent is pleased to support the open source community by making
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 *
 * Copyright (C) 2025 Tencent.  All rights reserved.
 *
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
 *
 * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
 *
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */




/* harmony default export */ const collapse = (__WEBPACK_EXTERNAL_MODULE_vue_defineComponent__({
  name: 'Collapse',
  props: propsCollapse,
  emits: ['item-click', 'update:modelValue', 'after-leave', 'before-enter'],
  setup: function setup(props, _ref) {
    var emit = _ref.emit,
      slots = _ref.slots;
    var localActiveItems = __WEBPACK_EXTERNAL_MODULE_vue_ref__([]);
    // 以保证当前的设置生效
    __WEBPACK_EXTERNAL_MODULE_vue_watch__(function () {
      return [props.modelValue];
    }, function () {
      var value = props.modelValue;
      if (Array.isArray(value)) {
        localActiveItems.value = _toConsumableArray(value);
      } else if (typeof value !== 'undefined') {
        localActiveItems.value = [value];
      } else {
        localActiveItems.value = [];
      }
    }, {
      immediate: true
    });
    var handleItemClick = function handleItemClick(item) {
      // 手风琴模式，只有一个Active，移除一个新增一个
      var name = item.name;
      if (props.accordion) {
        var activeItemIndex = localActiveItems.value.findIndex(function (local) {
          return local === name;
        });
        if (activeItemIndex >= 0) {
          localActiveItems.value.splice(activeItemIndex, 1);
        } else {
          localActiveItems.value = [name];
        }
      } else {
        var _activeItemIndex = localActiveItems.value.findIndex(function (local) {
          return local === name;
        });
        if (_activeItemIndex >= 0) {
          localActiveItems.value.splice(_activeItemIndex, 1);
        } else {
          localActiveItems.value.push(name);
        }
      }
      emit('item-click', item);
      emit('update:modelValue', localActiveItems.value);
    };
    __WEBPACK_EXTERNAL_MODULE_vue_provide__('localActiveItems', localActiveItems);
    __WEBPACK_EXTERNAL_MODULE_vue_provide__('handleItemClick', handleItemClick);
    var _usePrefix = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_usePrefix__(),
      resolveClassName = _usePrefix.resolveClassName;
    var className = resolveClassName('collapse-wrapper');
    // 线条样式
    if (props.hasHeaderBorder) {
      className += " ".concat(resolveClassName('collapse-header-border'));
    }
    // hover效果
    if (props.hasHeaderHover) {
      className += " ".concat(resolveClassName('collapse-header-hover'));
    }
    // 卡片样式
    if (props.useCardTheme) {
      className += " ".concat(resolveClassName('collapse-card'));
    }
    // 色块样式
    if (props.useBlockTheme) {
      className += " ".concat(resolveClassName('collapse-block'));
    }
    // 图标位置
    if (props.headerIconAlign === 'left') {
      className += " ".concat(resolveClassName('collapse-icon-left'));
    } else {
      className += " ".concat(resolveClassName('collapse-icon-right'));
    }
    if (!Array.isArray(props.list) || !props.list.length) {
      return function () {
        return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__('div', {
          "class": className
        }, [__WEBPACK_EXTERNAL_MODULE_vue_renderSlot__(slots, 'default', {
          props: {
            isList: true
          }
        })]);
      };
    }
    // 统一格式化传入数据格式为标准渲染格式
    var collapseData = __WEBPACK_EXTERNAL_MODULE_vue_computed__(function () {
      return (props.list || []).map(function (item, index) {
        if (typeof item === 'string' || typeof item === 'number' || typeof item === 'boolean') {
          return {
            $index: index,
            name: item
          };
        }
        return collapse_objectSpread({
          $index: index
        }, item);
      });
    });
    // 判定当前Item是否为激活状态
    var renderItems = function renderItems() {
      return collapseData.value.map(function (item, index) {
        var name = item[props.idFiled] || index;
        var title = item[props.titleField];
        var icon = props.headerIcon || 'angle-right';
        if (slots.title) {
          if (typeof slots.title === 'function') {
            title = slots.title(item, index);
          } else {
            title = slots.title;
          }
        }
        if (slots["default"]) {
          var _slots$default;
          title = (_slots$default = slots["default"]) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots, item, index);
        }
        return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(collapse_panel, {
          "key": index,
          "disabled": item.disabled,
          "icon": icon,
          "isFormList": true,
          "item-click": handleItemClick,
          "name": name,
          "title": title
        }, {
          content: function content() {
            var _slots$content, _slots$content2;
            return (_slots$content = (_slots$content2 = slots.content) === null || _slots$content2 === void 0 ? void 0 : _slots$content2.call(slots, item, index)) !== null && _slots$content !== void 0 ? _slots$content : item[props.contentField];
          }
        });
      });
    };
    return function () {
      return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
        "class": className
      }, [renderItems()]);
    };
  }
}));
;// ../../packages/collapse/src/index.ts



var BkCollapse = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_withInstallProps__(collapse, {
  CollapsePanel: collapse_panel
});

/* harmony default export */ const src = (BkCollapse);
export { collapse_panel as BkCollapsePanel, collapse as Collapse, src as default };
