"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[1064],{31064:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var l=n(69060),o=n(70780),s=n(66152),c=n(95705),i=n(66156),a=n(61180),r=n(78256),u=n(61060),p=n(82496);const d=e=>{let{closeDeleteModalAndRefresh:t,deleteOpen:n,selectedPolicy:d}=e;const f=(0,i.Ab)(),[y,h]=(0,l.useState)(!1);if(!d)return null;return(0,p.jsx)(o.c,{title:"Delete Policy",confirmText:"Delete",isOpen:n,titleIcon:(0,p.jsx)(s.sB6,{}),isLoading:y,onConfirm:()=>{h(!0),a.m.policy.removePolicy((0,u.CO)(d)).then((e=>{t(!0)})).catch((async e=>{const n=await e.json();f((0,c.aW)((0,r.K)(n))),t(!1)})).finally((()=>h(!1)))},onClose:()=>t(!1),confirmationContent:(0,p.jsxs)(l.Fragment,{children:["Are you sure you want to delete policy ",(0,p.jsx)("br",{}),(0,p.jsx)("b",{children:d}),"?"]})})}}}]);
//# sourceMappingURL=1064.1ab42ca4.chunk.js.map