import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
import { createBEM } from '@zarm-design/bem';
import * as React from 'react';
import { ConfigContext } from '../config-provider';
var List = /*#__PURE__*/React.forwardRef(function (props, ref) {
  var className = props.className,
      bordered = props.bordered,
      children = props.children,
      restProps = _objectWithoutProperties(props, ["className", "bordered", "children"]);

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

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