var _excluded = ["children", "vertical", "horizontal", "className"];

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }

function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

import React from 'react';
import SimpleBar from 'simplebar-react';
import classnames from 'classnames';
import "./simplebar.less";
import "./index.less";

var ScrollArea = function ScrollArea(_ref) {
  var children = _ref.children,
      vertical = _ref.vertical,
      horizontal = _ref.horizontal,
      _ref$className = _ref.className,
      className = _ref$className === void 0 ? '' : _ref$className,
      props = _objectWithoutProperties(_ref, _excluded);

  var styled = classnames(_defineProperty({
    'c7n-scrollbar-default': true,
    'c7n-scrollbar-x': horizontal,
    'c7n-scrollbar-y': vertical
  }, className, className));
  return /*#__PURE__*/React.createElement(SimpleBar, Object.assign({
    className: styled
  }, props), children);
};

ScrollArea.defaultProps = {
  horizontal: false,
  vertical: false
};
export default ScrollArea;