"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.CollectionErrorState = void 0;
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/CollectionErrorState/CollectionErrorState.tsx";
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
const RequestId = /*#__PURE__*/_react.default.lazy(() => Promise.resolve().then(() => _interopRequireWildcard(require(/* webpackChunkName: "RequestId" */'../RequestId'))).then(module => ({
  default: module.RequestId
})));
const CollectionErrorState = ({
  dataHook = 'collection-error-state',
  title,
  subtitle,
  action,
  requestId
}) => {
  const {
    environment
  } = (0, _react2.useWixPatternsContainer)();
  return /*#__PURE__*/_react.default.createElement(_designSystem.Box, {
    direction: "vertical",
    align: "center",
    width: "100%",
    padding: "SP7 0",
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 29,
      columnNumber: 5
    }
  }, /*#__PURE__*/_react.default.createElement(_designSystem.EmptyState, {
    dataHook: dataHook,
    theme: "page-no-border",
    title: title,
    subtitle: subtitle,
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 30,
      columnNumber: 7
    }
  }, action && /*#__PURE__*/_react.default.createElement(_designSystem.TextButton, {
    dataHook: "collection-error-state-action-button",
    prefixIcon: action == null ? void 0 : action.prefixIcon,
    onClick: action == null ? void 0 : action.onClick,
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 37,
      columnNumber: 11
    }
  }, action == null ? void 0 : action.text)), requestId && /*#__PURE__*/_react.default.createElement(_react.default.Suspense, {
    fallback: null,
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 47,
      columnNumber: 9
    }
  }, /*#__PURE__*/_react.default.createElement(_designSystem.Box, {
    align: "center",
    padding: "SP2",
    position: "absolute",
    bottom: "0",
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 48,
      columnNumber: 11
    }
  }, /*#__PURE__*/_react.default.createElement(RequestId, {
    value: requestId,
    locale: environment.language,
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 49,
      columnNumber: 13
    }
  }))));
};
exports.CollectionErrorState = CollectionErrorState;
//# sourceMappingURL=CollectionErrorState.js.map