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