Liferay.Loader.define("redirect-web@2.0.49/js/ChainedRedirectionsModal",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/form","@frontend-taglib-clay$clayui/modal","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=_interopRequireDefault(r("@frontend-taglib-clay$clayui/button")),l=r("@frontend-taglib-clay$clayui/form"),n=_interopRequireDefault(r("@frontend-taglib-clay$clayui/modal")),i=(_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 l in e)if(Object.prototype.hasOwnProperty.call(e,l)){var n=a?Object.getOwnPropertyDescriptor(e,l):null;n&&(n.get||n.set)?Object.defineProperty(r,l,n):r[l]=e[l]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react")));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}}const noop=()=>{};var _default=({callback:e=noop,observer:t,onModalClose:r=noop,redirectEntryChainCause:u,saveButtonLabel:o})=>{const[c,d]=(0,i.useState)(!0);return i.default.createElement(n.default,{className:"portlet-redirect-modal",observer:t,size:"md",status:"warning"},i.default.createElement(n.default.Header,null,Liferay.Language.get("redirect-chain")),i.default.createElement("form",{onSubmit:t=>{t.preventDefault(),e(c)}},i.default.createElement(n.default.Body,null,i.default.createElement("p",{className:"portlet-redirect-modal-title"},i.default.createElement("strong",null,"sourceURL"===u?Liferay.Language.get("do-you-want-to-create-the-redirect-and-update-the-references"):Liferay.Language.get("do-you-want-to-create-this-redirect-and-update-it"))),i.default.createElement("div",{className:"portlet-redirect-modal-description"},i.default.createElement("p",null,"sourceURL"===u?Liferay.Language.get("there-are-other-redirects-pointing-to-the-source-url-of-this-redirect"):Liferay.Language.get("this-redirect-points-to-the-source-url-of-another-redirect")),i.default.createElement("p",null,"sourceURL"===u?Liferay.Language.get("update-the-references-of-the-other-redirects-to-avoid-this-chain"):Liferay.Language.get("update-this-redirect-to-avoid-this-chain"))),i.default.createElement("fieldset",{className:"fieldset"},i.default.createElement(l.ClayCheckbox,{checked:c,label:"sourceURL"===u?Liferay.Language.get("update-references"):Liferay.Language.get("update-redirect"),onChange:()=>d((e=>!e))}))),i.default.createElement(n.default.Footer,{last:i.default.createElement(a.default.Group,{spaced:!0},i.default.createElement(a.default,{displayType:"secondary",onClick:r},Liferay.Language.get("cancel")),i.default.createElement(a.default,{displayType:"primary",type:"submit"},o))})))};t.default=_default}}));
//# sourceMappingURL=ChainedRedirectionsModal.js.map