Liferay.Loader.define("@liferay/analytics-settings-web@5.0.47/js/components/connect/DisconnectModal",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/modal","liferay!frontend-js-react-web$react","../../App","../../utils/api","../Loading"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=_interopRequireDefault(a("@frontend-taglib-clay$clayui/button")),r=_interopRequireDefault(a("@frontend-taglib-clay$clayui/modal")),l=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 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")),i=a("../../App"),o=a("../../utils/api"),u=_interopRequireDefault(a("../Loading"));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 _default=({observer:e,onOpenChange:t})=>{const[a,c]=(0,l.useState)(!1),d=(0,i.useDispatch)();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("p",null,l.default.createElement("strong",null,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()=>{c(!0);const{ok:e}=await(0,o.deleteConnection)();c(!1),e&&(t(!1),d({payload:{connected:!1,token:""},type:i.Events.Connect}),d({payload:i.EPageView.Wizard,type:i.Events.ChangePageView}))}},a&&l.default.createElement(u.default,{inline:!0}),Liferay.Language.get("disconnect")))}))};t.default=_default}}));
//# sourceMappingURL=DisconnectModal.js.map