"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;

var _core = require("@emotion/core");

var _propTypes = _interopRequireDefault(require("prop-types"));

var _Button = _interopRequireDefault(require("@material-ui/core/Button"));

var _styles = require("@material-ui/styles");

var _index = require("../_Themes/index");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

var variant = {
  primary: "contained",
  secondary: "text"
};

var ButtonNew = function ButtonNew(_ref) {
  var label = _ref.label,
      onClick = _ref.onClick,
      type = _ref.type,
      href = _ref.href;
  return (0, _core.jsx)(_styles.ThemeProvider, {
    theme: _index.MaterialTheme
  }, (0, _core.jsx)(_Button["default"], {
    onClick: onClick,
    color: "secondary",
    variant: variant[type],
    href: href || undefined
  }, label));
};

ButtonNew.propTypes = {
  label: _propTypes["default"].string,
  onClick: _propTypes["default"].func,
  type: _propTypes["default"].string,
  href: _propTypes["default"].string
};
ButtonNew.defaultProps = {
  label: "Label",
  type: "primary"
};
ButtonNew.displayName = "ButtonNew";
var _default = ButtonNew;
exports["default"] = _default;