"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[5787],{2735:function(e,r,t){t.d(r,{Qj:function(){return k},zx:function(){return O}});var o=t(65443),n=t.n(o),a=t(94159),l=t(6285);function c(){return c=Object.assign?Object.assign.bind():function(e){for(var r=1;rn()("leading-none","align-middle","py-2","px-4","no-select",e.className,{[u]:"pill"===e.buttonStyle,[i]:"roundrect"===e.buttonStyle,[g]:"authn"===e.buttonStyle,[h]:"cherry"===e.color,[y]:"strawberry"===e.color,[p]:"mango"===e.color,[v]:"not-black"===e.color,[f]:"red"===e.color,[x]:"accent"===e.color,[m]:"green"===e.color,[w]:"secondary"===e.color,[E]:"authn-primary"===e.color,[S]:"authn-other"===e.color}),O=a.forwardRef((({buttonStyle:e,color:r,className:t,...o},n)=>{const l=N({buttonStyle:e,color:r,className:t,...o});return a.createElement("button",c({},o,{className:l,ref:n}),o.children)}));O.displayName="Button";const k=a.forwardRef((({buttonStyle:e,color:r,...t},o)=>{const n=N({buttonStyle:e,color:r,...t});return a.createElement("a",c({},t,{className:n,ref:o}),t.children)}));k.displayName="LinkButton"},69458:function(e,r,t){t.r(r),t.d(r,{BanUserForm:function(){return d}});var o=t(71860),n=t(94159),a=t(99838),l=t(3160),c=t(2735),s=t(70496);const d=({userId:e})=>{const{register:r,handleSubmit:t}=(0,a.cI)(),d=(0,l.s0)(),b=o.S.moderation.user.ban.useMutation();return n.createElement("form",{className:"flex max-w-fit flex-col gap-2 rounded-lg border border-accent p-3",onSubmit:t((r=>b.mutateAsync({userId:e,banReason:r.banReason}).then((()=>d(0)))))},n.createElement("h4",{className:"h4"},"ban user"),n.createElement(s.v,{level:"warning",className:"prose"},n.createElement("p",null,n.createElement("b",null,"HEADS UP!"),' This will add the "suspended" permission to the user as well as the "suspended" flag to their self-project and all projcts which they are the sole editor of.'),n.createElement("p",null,"This will also delete ALL POSTS AND COMMENTS from those projects."),n.createElement("p",null,"This last part is very difficult to undo, so ONLY RUN THIS IF YOU ARE GOING SCORCHED EARTH!")),n.createElement("label",null,"reason for banning user:"),n.createElement("textarea",r("banReason",{required:!0})),n.createElement(c.zx,{type:"submit",buttonStyle:"pill",color:"cherry",className:"w-fit"},"ban user"))}}}]); //# sourceMappingURL=client-preact-components-pages-moderation-manage-user-ban-user-form.b74d5a13a4c9e4da5588.js.map