import React, { memo } from 'react';

var ExpandIcon = function ExpandIcon(props) {
  var expandable = props.expandable,
      prefixCls = props.prefixCls,
      onExpand = props.onExpand,
      needIndentSpaced = props.needIndentSpaced,
      expanded = props.expanded,
      record = props.record;

  if (expandable) {
    var expandClassName = expanded ? 'expanded' : 'collapsed';
    return /*#__PURE__*/React.createElement("span", {
      className: "".concat(prefixCls, "-expand-icon ").concat(prefixCls, "-").concat(expandClassName),
      onClick: function onClick(e) {
        return onExpand(record, e);
      }
    });
  }

  if (needIndentSpaced) {
    return /*#__PURE__*/React.createElement("span", {
      className: "".concat(prefixCls, "-expand-icon ").concat(prefixCls, "-spaced")
    });
  }

  return null;
};

ExpandIcon.displayName = 'RcExpandIcon';
export default /*#__PURE__*/memo(ExpandIcon);
//# sourceMappingURL=ExpandIcon.js.map
