import React from 'react';
import { PisellCustomCheckboxGroup } from '@pisell/materials';
import HolderItem from "../HolderItem";
/**
 * @title: HolderList 选项列表组件
 * @description: 抽离的选项列表组件，可以在 Modal 外部独立使用
 * @Author: WangHan
 * @Date: 2025-01-XX
 */
var HolderList = function HolderList(_ref) {
  var _ref$dataSource = _ref.dataSource,
    dataSource = _ref$dataSource === void 0 ? [] : _ref$dataSource,
    _ref$selectedValues = _ref.selectedValues,
    selectedValues = _ref$selectedValues === void 0 ? [] : _ref$selectedValues,
    displayConfig = _ref.displayConfig,
    renderAddItem = _ref.renderAddItem,
    _ref$columns = _ref.columns,
    columns = _ref$columns === void 0 ? 3 : _ref$columns,
    _ref$horizontalGap = _ref.horizontalGap,
    horizontalGap = _ref$horizontalGap === void 0 ? 16 : _ref$horizontalGap,
    _ref$verticalGap = _ref.verticalGap,
    verticalGap = _ref$verticalGap === void 0 ? 16 : _ref$verticalGap,
    _ref$allowAdd = _ref.allowAdd,
    allowAdd = _ref$allowAdd === void 0 ? true : _ref$allowAdd,
    onClick = _ref.onClick;
  return /*#__PURE__*/React.createElement(PisellCustomCheckboxGroup, {
    dataSource: dataSource,
    renderItem: function renderItem(item) {
      return /*#__PURE__*/React.createElement(HolderItem, {
        item: item,
        displayConfig: displayConfig,
        value: selectedValues
      });
    },
    renderAddItem: renderAddItem,
    columns: columns,
    horizontalGap: horizontalGap,
    verticalGap: verticalGap,
    allowAdd: allowAdd,
    onClick: onClick
  });
};
export default HolderList;