Liferay.Loader.define("portal-search-ranking-web@3.0.53/js/components/add_result/AddResult.es",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/modal","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../shared/ErrorBoundary.es","./AddResultModal.es"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=_interopRequireDefault(r("@frontend-taglib-clay$clayui/button")),n=r("@frontend-taglib-clay$clayui/modal"),u=(_interopRequireDefault(r("liferay!frontend-js-react-web$prop-types")),function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();if(t&&t.has(e))return t.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var u=a?Object.getOwnPropertyDescriptor(e,n):null;u&&(u.get||u.set)?Object.defineProperty(r,n,u):r[n]=e[n]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react"))),l=_interopRequireDefault(r("../shared/ErrorBoundary.es")),o=_interopRequireDefault(r("./AddResultModal.es"));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var d=function AddResult({fetchDocumentsSearchUrl:e,onAddResultSubmit:t}){const[r,d]=(0,u.useState)(!1),{observer:i,onClose:c}=(0,n.useModal)({onClose:()=>d(!1)});return u.default.createElement(u.default.Fragment,null,u.default.createElement(a.default,{key:"ADD_RESULT_BUTTON",onClick:function _handleAddResultButton(){d(!0)}},Liferay.Language.get("add-result")),u.default.createElement(l.default,{component:Liferay.Language.get("add-result"),toast:!0},r?u.default.createElement(o.default,{fetchDocumentsSearchUrl:e,observer:i,onAddResultSubmit:t,onClose:c}):null))};t.default=d}}));
//# sourceMappingURL=AddResult.es.js.map