import Button from '../Button/index.js';
import useParrotTranslation from '../../hooks/useParrotTranslation.js';
import cs from 'classnames';
import React__default from 'react';

const FailedLoadStyle = "E_4100_0_7_fzh9mnb";
const FailedLoad = props => {
  const {
    error,
    refetch,
    className,
    title,
    refetchText,
    "data-testid": dataTestId
  } = props;
  const {
    t
  } = useParrotTranslation();
  return /* @__PURE__ */React__default.createElement("div", {
    "data-testid": dataTestId,
    className: cs(FailedLoadStyle, className),
    title
  }, /* @__PURE__ */React__default.createElement("div", {
    className: "error-text"
  }, String(error)), /* @__PURE__ */React__default.createElement(Button, {
    type: "ordinary",
    "data-testid": dataTestId ? `${dataTestId}-retry` : void 0,
    onClick: () => refetch()
  }, refetchText || t("common.retry")));
};
var FailedLoad$1 = FailedLoad;

export { FailedLoad$1 as default };
