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

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

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

var ButtonSkeleton = function ButtonSkeleton(_ref) {
  var small = _ref.small,
      href = _ref.href;
  var buttonClasses = (0, _classnames.default)({
    'wfp--skeleton': true,
    'wfp--btn': true,
    'wfp--btn--sm': small
  });
  var commonProps = {
    className: buttonClasses
  };

  var button = /*#__PURE__*/_react.default.createElement("button", (0, _extends2.default)({}, commonProps, {
    type: "button"
  }));

  var anchor = /*#__PURE__*/_react.default.createElement("a", (0, _extends2.default)({}, commonProps, {
    href: href,
    role: "button"
  })); // eslint-disable-line


  return href ? anchor : button;
};

ButtonSkeleton.propTypes = {
  small: _propTypes.default.bool,
  href: _propTypes.default.string
};
ButtonSkeleton.defaultProps = {
  small: false
};
var _default = ButtonSkeleton;
exports.default = _default;