Liferay.Loader.define("@liferay/search-experiences-web@3.0.30/sxp_blueprint_admin/js/shared/ErrorBoundary",["module","exports","require","@frontend-taglib-clay$clayui/empty-state","frontend-js-web","liferay!frontend-js-react-web$react","../utils/errorMessages"],(function(e,r,t){window;{Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(t("@frontend-taglib-clay$clayui/empty-state")),n=t("frontend-js-web"),o=function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=_getRequireWildcardCache();if(r&&r.has(e))return r.get(e);var t={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var o=a?Object.getOwnPropertyDescriptor(e,n):null;o&&(o.get||o.set)?Object.defineProperty(t,n,o):t[n]=e[n]}t.default=e,r&&r.set(e,t);return t}(t("liferay!frontend-js-react-web$react")),i=t("../utils/errorMessages");function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}class ErrorBoundary extends o.Component{constructor(...e){super(...e),function _defineProperty(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}(this,"state",{hasError:!1})}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(){this.props.toast&&(0,n.openToast)({message:i.DEFAULT_ERROR,type:"danger"})}render(){return this.state.hasError?!this.props.toast&&o.default.createElement(a.default,{description:i.DEFAULT_ERROR,imgSrc:"/o/admin-theme/images/states/empty_state.gif",title:Liferay.Language.get("unable-to-load-content")}):this.props.children}}var s=ErrorBoundary;r.default=s}}));
//# sourceMappingURL=ErrorBoundary.js.map