"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.LoadingErrorState = LoadingErrorState;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _react = _interopRequireDefault(require("react"));
var _designSystem = require("@wix/design-system");
var _react2 = require("@wix/bex-core/react");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/components/ErrorState/LoadingErrorState.tsx";
function LoadingErrorState(props) {
  const {
    dataHook,
    title,
    subtitle,
    image,
    action,
    ...rest
  } = props;
  const {
    translate: t
  } = (0, _react2.useWixPatternsContainer)();
  return /*#__PURE__*/_react.default.createElement(_designSystem.EmptyState, (0, _extends2.default)({
    theme: "page-no-border",
    dataHook: dataHook,
    title: title ?? t('cairo.technical.error.title', {
      defaultValue: 'We couldn’t load your items'
    }),
    subtitle: subtitle ?? t('cairo.technical.error.text', {
      defaultValue: 'There was a technical problem on our end. Refresh the page and try again in a moment.'
    }),
    image: image
  }, rest, {
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 22,
      columnNumber: 5
    }
  }), action && /*#__PURE__*/_react.default.createElement(_designSystem.TextButton, {
    onClick: action.onClick,
    prefixIcon: action.prefixIcon,
    dataHook: "retry-button",
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 42,
      columnNumber: 9
    }
  }, action.text));
}
//# sourceMappingURL=LoadingErrorState.js.map