Liferay.Loader.define("@liferay/analytics-settings-web@5.0.42/js/components/DisconnectModal",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/modal","liferay!frontend-js-react-web$react","../utils/api","./LoadingInline"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=u(a("@frontend-taglib-clay$clayui/button")),r=u(a("@frontend-taglib-clay$clayui/modal")),l=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(a,r,l):a[r]=e[r]}a.default=e,t&&t.set(e,a);return a}(a("liferay!frontend-js-react-web$react")),o=a("../utils/api"),c=u(a("./LoadingInline"));function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function u(e){return e&&e.__esModule?e:{default:e}}var d=({observer:e,onOpenChange:t})=>{const[a,i]=(0,l.useState)(!1);return l.default.createElement(r.default,{center:!0,observer:e,status:"warning"},l.default.createElement(r.default.Header,null,Liferay.Language.get("disconnecting-data-source")),l.default.createElement(r.default.Body,null,l.default.createElement("h4",{className:"modal-description"},Liferay.Language.get("are-you-sure-you-want-to-disconnect-your-analytics-cloud-workspace-from-this-dxp-instance")),l.default.createElement("p",{className:"text-secondary"},Liferay.Language.get("this-will-stop-any-syncing-of-analytics-or-contact-data-to-your-analytics-cloud-workspace"))),l.default.createElement(r.default.Footer,{last:l.default.createElement(n.default.Group,{spaced:!0},l.default.createElement(n.default,{displayType:"secondary",onClick:()=>t(!1)},Liferay.Language.get("cancel")),l.default.createElement(n.default,{disabled:a,displayType:"warning",onClick:async()=>{i(!0),await(0,o.deleteConnection)(),i(!1),t(!1),window.location.reload()}},a&&l.default.createElement(c.default,null),Liferay.Language.get("disconnect")))}))};t.default=d}}));
//# sourceMappingURL=DisconnectModal.js.map