import{l as p,o as m,k as d,R as h,j as t,E as x,a9 as a}from"./app-BgLa5dit.js";import{I as f}from"./Bm4DWMcW.chunk.js";import{C as I}from"./q-IBKcuF.chunk.js";import"./DUpYPoLs.chunk.js";import"./EZim8aq-.chunk.js";import"./BD9MrUJP.chunk.js";import"./s6cGcwlA.chunk.js";import"./Zwjmkasg.chunk.js";import"./4qGb1BIY.chunk.js";import"./DnXDEnAR.chunk.js";import"./DpUpv6rY.chunk.js";import"./CG7zbly5.chunk.js";import"./m4aqaK_l.chunk.js";import"./MEkA24R1.chunk.js";import"./C53kfXmd.chunk.js";function B(s){var l,n;const i=p(),e=m(I.customer(s.customerId)),u=d(),[o,r]=h.useState(!1);async function c(){r(!0);try{await u(f.disableIpAuth(s.ipAuthId)),i.success("Successfully disabled IP auth."),s.closePopup()}catch{i.error("Failed to disable IP auth. Please try again.")}finally{r(!1)}}return e!=null&&e.data?t.jsxs(x,{size:"md",title:"Disable IP Auth",closePopup:s.closePopup,children:[t.jsxs("p",{children:["Are you sure you want to disable IP auth for ",t.jsxs("strong",{children:[(l=e.data)==null?void 0:l.name," - ",(n=e.data)==null?void 0:n.crmId," "]}),"?"]}),t.jsx("p",{children:"This will also remove all existing IP ranges."}),t.jsxs(a,{children:[t.jsx(a.Cancel,{text:"Cancel",onClick:s.closePopup}),t.jsx(a.Submit,{text:"Disable",variant:"danger",showSpinner:o,disabled:o,onClick:c})]})]}):t.jsx(t.Fragment,{})}export{B as DisableCustomerIpAuthView};
//# sourceMappingURL=DELGjdQn.chunk.js.map
