"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/slicedToArray"),o=require("react"),s=require("@material-ui/core"),n=require("../../../../../Button/components/Button/index.js"),c=require("react/jsx-runtime");require("moment-timezone"),require("classnames");var i=require("../../../../../../icons/iconParkIcons.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("../../../../../../icons/customIcons/icons/AddMessage.js"),require("../../../../../../icons/customIcons/icons/Attention.js"),require("../../../../../../icons/customIcons/icons/Collapse.js"),require("../../../../../../icons/customIcons/icons/Dashboard.js"),require("../../../../../../icons/customIcons/icons/Expand.js"),require("../../../../../../icons/customIcons/icons/FolderClosed.js"),require("../../../../../../icons/customIcons/icons/FolderClosedFilled.js"),require("../../../../../../icons/customIcons/icons/FolderOpened.js"),require("../../../../../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../../../../../icons/customIcons/icons/LessOrEqual.js"),require("../../../../../../icons/customIcons/icons/Search.js"),require("../../../../../../icons/customIcons/icons/Wellhub.js"),require("../../../../../../icons/customIcons/icons/MultiRuler.js"),require("../../../../../../icons/customIcons/icons/Checkbox.js"),require("../../../../../../icons/customIcons/icons/CheckboxChecked.js"),require("../../../../../../icons/customIcons/icons/CheckboxIndeterminate.js"),require("../../../../../../icons/customIcons/icons/Radio.js"),require("../../../../../../icons/customIcons/icons/RadioChecked.js"),require("../../../../../../icons/customIcons/icons/SimulFrac.js"),require("../../../../../../icons/customIcons/icons/ZipperFrac.js"),require("../../../../../../icons/customIcons/icons/CautionFilled.js"),require("../../../../../../icons/customIcons/icons/MoreApp.js"),require("../../../../../Button/components/LiveButton/components/LiveButtonStateIndicator/index.js"),require("../../../../../Button/components/LiveButton/styles.js");var t=r(e),u=s.makeStyles({removeButtonIcon:{marginRight:8},paperClassName:{width:416}});exports.PAGE_NAME="DC_removeApp",exports.default=function(e){var r=e.appName,a=e.onAppRemove,l=u(),m=o.useState(!1),d=t.default(m,2),p=d[0],j=d[1],q=function(){return j(!1)};return c.jsxs(c.Fragment,{children:[c.jsxs(n,{color:"primary","data-testid":"".concat("DC_removeApp","_button"),onClick:function(){return j(!0)},children:[c.jsx(i.DeleteFourIcon,{className:l.removeButtonIcon}),"REMOVE APP"]}),c.jsxs(s.Dialog,{open:p,onClose:q,PaperProps:{elevation:1,className:l.paperClassName},children:[c.jsxs(s.DialogTitle,{"data-testid":"".concat("DC_removeApp","_title"),children:["Remove ",r,"?"]}),c.jsx(s.DialogContent,{children:c.jsx(s.DialogContentText,{children:"App and all related information will be removed immediately. App can be added again from AppStore."})}),c.jsxs(s.DialogActions,{children:[c.jsx(n,{color:"primary","data-testid":"".concat("DC_removeApp","_cancel"),onClick:q,children:"Cancel"}),c.jsx(n,{"data-testid":"".concat("DC_removeApp","_confirm"),onClick:function(){return a()},variation:"primary",children:"Remove"})]})]})]})};
