'use strict';

var index = require('../Button/index.js');
var useParrotTranslation = require('../../hooks/useParrotTranslation.js');
var cs = require('classnames');
var React = require('react');

function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }

var cs__default = /*#__PURE__*/_interopDefault(cs);
var React__default = /*#__PURE__*/_interopDefault(React);

const FailedLoadStyle = "E_fzh9mnb";
const FailedLoad = props => {
  const {
    error,
    refetch,
    className,
    title,
    refetchText
  } = props;
  const {
    t
  } = useParrotTranslation();
  return /* @__PURE__ */React__default.default.createElement("div", {
    className: cs__default.default(FailedLoadStyle, className),
    title
  }, /* @__PURE__ */React__default.default.createElement("div", {
    className: "error-text"
  }, String(error)), /* @__PURE__ */React__default.default.createElement(index, {
    type: "ordinary",
    onClick: () => refetch()
  }, refetchText || t("common.retry")));
};
var FailedLoad$1 = FailedLoad;

module.exports = FailedLoad$1;
