import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
import React from 'react';
import classNames from 'classnames';
import Button from '../Button';

var Panel = function Panel(props) {
  var title = props.title,
      buttonProps = props.buttonProps,
      children = props.children,
      variant = props.variant,
      icon = props.icon,
      className = props.className,
      rest = _objectWithoutProperties(props, ["title", "buttonProps", "children", "variant", "icon", "className"]);

  var cn = classNames(['panel', "panel-".concat(variant), className]);
  return React.createElement("div", Object.assign({
    className: cn
  }, rest), React.createElement("div", {
    className: "panel-heading"
  }, React.createElement("h2", null, icon && React.createElement("span", {
    className: "".concat(icon, " m-r-sm")
  }), title), buttonProps && React.createElement("div", {
    className: "options"
  }, React.createElement(Button, buttonProps))), React.createElement("div", {
    className: "panel-body"
  }, children));
};

Panel.defaultProps = {
  buttonProps: null,
  variant: 'default',
  icon: null,
  className: null
};
export default Panel;