"use strict";

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 _propTypes = _interopRequireDefault(require("prop-types"));

var _react = _interopRequireDefault(require("react"));

var _classnames = _interopRequireDefault(require("classnames"));

var _excluded = ["filter", "children", "className"];

var ModuleHeader = function ModuleHeader(_ref) {
  var filter = _ref.filter,
      children = _ref.children,
      className = _ref.className,
      other = (0, _objectWithoutProperties2.default)(_ref, _excluded);
  var wrapperClasses = (0, _classnames.default)('wfp--module__header', className);
  return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({
    className: wrapperClasses
  }, other), /*#__PURE__*/_react.default.createElement("h1", {
    className: "wfp--module__title"
  }, children), filter && /*#__PURE__*/_react.default.createElement("div", {
    className: "wfp--module__filter"
  }, filter));
};

ModuleHeader.propTypes = {
  /**
   * Specify the content of the `ModuleHeaders`
   */
  children: _propTypes.default.node,

  /**
   * The CSS class name for the `ModuleHeaders`.
   */
  className: _propTypes.default.string
};
var _default = ModuleHeader;
exports.default = _default;