"use strict";

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

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

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

var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));

var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));

var _bem = require("@zarm-design/bem");

var React = _interopRequireWildcard(require("react"));

var _configProvider = require("../config-provider");

var List = /*#__PURE__*/React.forwardRef(function (props, ref) {
  var className = props.className,
      bordered = props.bordered,
      children = props.children,
      restProps = (0, _objectWithoutProperties2.default)(props, ["className", "bordered", "children"]);

  var _React$useContext = React.useContext(_configProvider.ConfigContext),
      prefixCls = _React$useContext.prefixCls;

  var bem = (0, _bem.createBEM)('list', {
    prefixCls: prefixCls
  });
  var cls = bem([{
    unbordered: !bordered
  }, className]);
  return /*#__PURE__*/React.createElement("ul", (0, _extends2.default)({
    ref: ref,
    className: cls
  }, restProps), children);
});
List.displayName = 'List';
List.defaultProps = {
  bordered: true
};
var _default = List;
exports.default = _default;