"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[8825],{88825:(e,t,n)=>{n.r(t),n.d(t,{default:()=>h});var a=n(65043),s=n(89923),l=n(64159),i=n(20554),r=n(58661),o=n(56629),c=n(53518),d=n(70579);const h=e=>{let{closeDeleteModalAndRefresh:t,deleteOpen:n,selectedItem:h}=e;const p=(0,i.jL)(),[x,u]=(0,a.useState)(!1),[m,y]=(0,a.useState)("");if(!h)return null;return(0,d.jsx)(r.A,{title:"Delete Key",confirmText:"Delete",isOpen:n,titleIcon:(0,d.jsx)(s.xWY,{}),isLoading:x,onConfirm:()=>{u(!0),o.F.kms.kmsDeleteKey(h).then((e=>{t(!0)})).catch((async e=>{const n=await e.json();p((0,l.C9)((0,c.S)(n))),t(!1)})).finally((()=>u(!1)))},onClose:()=>t(!1),confirmButtonProps:{disabled:m!==h||x},confirmationContent:(0,d.jsxs)(a.Fragment,{children:[(0,d.jsx)(s.xA9,{item:!0,xs:12,children:(0,d.jsx)(s.Wei,{variant:"error",title:"WARNING",message:"Please note that this is a dangerous operation. Once a key has been deleted all data that has been encrypted with it cannot be decrypted anymore, and therefore, is lost.",sx:{margin:"15px 0"}})}),"To continue please type ",(0,d.jsx)("b",{children:h})," in the box.",(0,d.jsx)(s.xA9,{item:!0,xs:12,children:(0,d.jsx)(s.cl_,{id:"retype-key",name:"retype-key",onChange:e=>{y(e.target.value)},onPaste:e=>e.preventDefault(),label:"",value:m})})]})})}}}]);
//# sourceMappingURL=8825.e5adf924.chunk.js.map