"use strict";

var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard")["default"];

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;

var _react = _interopRequireWildcard(require("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["default"].createElement("span", {
      className: "".concat(prefixCls, "-expand-icon ").concat(prefixCls, "-").concat(expandClassName),
      onClick: function onClick(e) {
        return onExpand(record, e);
      }
    });
  }

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

  return null;
};

ExpandIcon.displayName = 'RcExpandIcon';

var _default = /*#__PURE__*/(0, _react.memo)(ExpandIcon);

exports["default"] = _default;
//# sourceMappingURL=ExpandIcon.js.map
