"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[9740],{9740:(e,t,n)=>{n.r(t),n.d(t,{default:()=>h});var a=n(69060),s=n(66152),l=n(95705),i=n(66156),o=n(70780),r=n(61180),c=n(78256),d=n(82496);const h=e=>{let{closeDeleteModalAndRefresh:t,deleteOpen:n,selectedItem:h}=e;const p=(0,i.Ab)(),[u,m]=(0,a.useState)(!1),[y,x]=(0,a.useState)("");if(!h)return null;return(0,d.jsx)(o.c,{title:"Delete Key",confirmText:"Delete",isOpen:n,titleIcon:(0,d.jsx)(s.sB6,{}),isLoading:u,onConfirm:()=>{m(!0),r.m.kms.kmsDeleteKey(h).then((e=>{t(!0)})).catch((async e=>{const n=await e.json();p((0,l.aW)((0,c.K)(n))),t(!1)})).finally((()=>m(!1)))},onClose:()=>t(!1),confirmButtonProps:{disabled:y!==h||u},confirmationContent:(0,d.jsxs)(a.Fragment,{children:[(0,d.jsx)(s.yeN,{item:!0,xs:12,children:(0,d.jsx)(s.ioY,{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.yeN,{item:!0,xs:12,children:(0,d.jsx)(s.q22,{id:"retype-key",name:"retype-key",onChange:e=>{x(e.target.value)},onPaste:e=>e.preventDefault(),label:"",value:y})})]})})}}}]);
//# sourceMappingURL=9740.424d346a.chunk.js.map