import{l as u,aP as l,o as m,j as i,E as r,dO as c,a9 as o,aQ as p,es as d}from"./app-BgLa5dit.js";import{C as f}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 h(e){return i.jsxs(r,{title:"Unverify email",closePopup:e.closePopup,children:[i.jsx("p",{children:"This user does not have a verified email address"}),i.jsx(o,{children:i.jsx(o.Submit,{variant:"link",onClick:e.closePopup,text:"Close"})})]})}function S(e){const s=u(),a=l(),t=m(f.getUser(e.customerId,e.userId));function n(){p(a,d.deleteUserEmail(e.userId,()=>s.success("Successfully unverified user email"),()=>s.error("Failed to unverify user email"),e.closePopup))}return t.data?t.data.email?i.jsxs(c,{title:"Unverify email",onClickConfirm:n,closePopup:e.closePopup,confirmButtonVariant:"danger",children:[i.jsx("p",{children:"Are you sure you want to unverify this user's email?"}),i.jsx("p",{children:"This cannot be undone and they will need to verify a new email themselves."})]}):i.jsx(h,{closePopup:e.closePopup}):i.jsx(r,{title:"Unverify email",showLoadingSpinner:!0,closePopup:e.closePopup})}export{S as DeleteUserEmailView};
//# sourceMappingURL=BP2U5vyh.chunk.js.map
