"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[1936],{2735:function(e,r,t){t.d(r,{Qj:function(){return O},zx:function(){return k}});var n=t(65443),o=t.n(n),a=t(94159),l=t(6285);function c(){return c=Object.assign?Object.assign.bind():function(e){for(var r=1;ro()("leading-none","align-middle","py-2","px-4","no-select",e.className,{[d]:"pill"===e.buttonStyle,[b]:"roundrect"===e.buttonStyle,[g]:"authn"===e.buttonStyle,[h]:"cherry"===e.color,[m]:"strawberry"===e.color,[p]:"mango"===e.color,[v]:"not-black"===e.color,[y]:"red"===e.color,[x]:"accent"===e.color,[f]:"green"===e.color,[w]:"secondary"===e.color,[E]:"authn-primary"===e.color,[S]:"authn-other"===e.color}),k=a.forwardRef((({buttonStyle:e,color:r,className:t,...n},o)=>{const l=N({buttonStyle:e,color:r,className:t,...n});return a.createElement("button",c({},n,{className:l,ref:o}),n.children)}));k.displayName="Button";const O=a.forwardRef((({buttonStyle:e,color:r,...t},n)=>{const o=N({buttonStyle:e,color:r,...t});return a.createElement("a",c({},t,{className:o,ref:n}),t.children)}));O.displayName="LinkButton"},32259:function(e,r,t){t.r(r),t.d(r,{PurgeUserForm:function(){return u}});var n=t(94159),o=t(99838),a=t(2735),l=t(70496),c=t(71860);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var r=1;r{const{register:t,handleSubmit:u,watch:i}=(0,o.cI)(),d=i(),b=c.S.moderation.user.purge.useMutation(),{data:g}=c.S.moderation.user.hasActiveSubscription.useQuery({userId:r},{suspense:!0});return n.createElement("form",{className:"flex max-w-fit flex-col gap-2 rounded-lg border border-accent p-3",onSubmit:u((async()=>{await b.mutateAsync({userId:r})}))},n.createElement("h4",{className:"h4"},"purge user"),g?n.createElement(l.v,{level:"warning",className:"prose"},n.createElement("p",null,"This user (",e,") cannot currently be purged because they have one or more active subscriptions. Cancel and refund them manually first from the Stripe dashboard.")):n.createElement(n.Fragment,null,n.createElement(l.v,{level:"warning",className:"prose"},n.createElement("p",null,n.createElement("b",null,"HEADS UP!")," This will perform the following irreverseable operations:",n.createElement("ul",null,n.createElement("li",null,"purge this user's self-project;"),n.createElement("li",null,"purge all non-self projects for which this user is the sole editor;"),n.createElement("li",null,"permanently delete this user"))),n.createElement("p",null,"Only use this form if you're doing it at user request!")),n.createElement("label",null,"I've read the warnings and I'm still gonna do it:"),n.createElement("input",s({type:"checkbox"},t("confirmed",{required:!0}))),n.createElement(a.zx,{type:"submit",buttonStyle:"pill",color:"cherry",className:"w-fit",disabled:!d.confirmed},"purge user")))}}}]); //# sourceMappingURL=client-preact-components-pages-moderation-manage-user-purge-user.bd958b7f0dd7b5dadc3a.js.map