import React from 'react';
import Iconfont from "../../../../iconfont";
import { PREFIX } from "../../index";
import "./index.less";
var Holders = function Holders(props) {
  var _props$dataSource = props.dataSource,
    dataSource = _props$dataSource === void 0 ? {} : _props$dataSource;
  var holders = dataSource.holders,
    holder_id = dataSource.holder_id;
  if (!holder_id) return null;
  var renderHolder = function renderHolder(id) {
    if (!id) return null;
    var holder = holders.find(function (item) {
      return item.id === id;
    });
    return /*#__PURE__*/React.createElement("div", {
      className: "holder-item",
      key: id
    }, /*#__PURE__*/React.createElement(Iconfont, {
      className: "holder-icon",
      type: "pisell2-user-check-01"
    }), /*#__PURE__*/React.createElement("span", {
      className: "holder-label"
    }, (holder === null || holder === void 0 ? void 0 : holder.label) || id));
  };
  return /*#__PURE__*/React.createElement("div", {
    className: "".concat(PREFIX, "__holders")
  }, Array.isArray(holder_id) ? holder_id === null || holder_id === void 0 ? void 0 : holder_id.map(function (id) {
    return renderHolder(id);
  }) : renderHolder(holder_id));
};
export default Holders;