import _extends from "@babel/runtime/helpers/extends";
import _defineProperty from "@babel/runtime/helpers/defineProperty";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["dark", "light", "centered", "children", "className", "margin", "fullHeight", "noMargin", "withHover"];
import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { settings } from '../../globals/js';
var prefix = settings.prefix;
/** A Module is identifiable as a single, contained unit. */

var Module = function Module(_ref) {
  var _classnames;

  var dark = _ref.dark,
      light = _ref.light,
      centered = _ref.centered,
      children = _ref.children,
      className = _ref.className,
      margin = _ref.margin,
      fullHeight = _ref.fullHeight,
      noMargin = _ref.noMargin,
      withHover = _ref.withHover,
      other = _objectWithoutProperties(_ref, _excluded);

  var wrapperClasses = classnames((_classnames = {}, _defineProperty(_classnames, "".concat(prefix, "--module--dark"), dark), _defineProperty(_classnames, "".concat(prefix, "--module--no-margin"), noMargin), _defineProperty(_classnames, "".concat(prefix, "--module--full-height"), fullHeight), _defineProperty(_classnames, "".concat(prefix, "--module--margin-x"), margin === 'xs'), _defineProperty(_classnames, "".concat(prefix, "--module--margin-md"), margin === 'md'), _defineProperty(_classnames, "".concat(prefix, "--module--margin-lg"), margin === 'lg'), _defineProperty(_classnames, "".concat(prefix, "--module--light"), light), _defineProperty(_classnames, "".concat(prefix, "--module--with-hover"), withHover), _classnames), className, ["".concat(prefix, "--module")]);
  return /*#__PURE__*/React.createElement("div", _extends({
    className: wrapperClasses
  }, other), /*#__PURE__*/React.createElement("div", {
    className: "".concat(prefix, "--module__inner")
  }, children));
};

Module.propTypes = {
  /**
   * * Specify the content of the `Module`, usually a `ModuleHeader` `ModuleBody` and `ModuleFooter`component.
   */
  children: PropTypes.node,

  /**
   * The CSS class name for the slider.
   */
  className: PropTypes.string,

  /**
   * Disables the default margin
   */
  noMargin: PropTypes.bool,

  /**
   * Use 100% height of parent container
   */
  fullHeight: PropTypes.bool,

  /**
   * Light appearance (for white backgrounds)
   */
  light: PropTypes.bool,

  /**
   * Dark appearance
   */
  dark: PropTypes.bool,

  /**
   * Additional hover styling
   */
  withHover: PropTypes.bool
};
export default Module;