1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1495],{11215:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/delete-account",function(){return t(19373)}])},19373:(e,s,t)=>{"use strict";t.r(s),t.d(s,{DeleteAccount:()=>N,default:()=>j});var l=t(6029),r=t(73492),o=t(34245),a=t(21053),n=t(64713),i=t(58718),c=t(65403),m=t(55729),u=t(39794),d=t(16972);let p=(0,m.forwardRef)((e,s)=>{let{orientation:t="horizontal",decorative:r=!0,className:o,labelClassName:a,label:n,...i}=e;return(0,l.jsxs)("div",{className:(0,u.cn)("flex items-center gap-2",{"h-fit w-full flex-row":"horizontal"===t,"h-full w-fit flex-col":"vertical"===t},o),children:[(0,l.jsx)(d.w,{className:"shrink",orientation:t}),(0,l.jsx)("p",{className:a,children:n}),(0,l.jsx)(d.w,{className:"shrink",orientation:t})]})});p.displayName="SeparatorWithLabel";var f=t(52789),x=t(66310),h=t(81278),v=t(1909);let w="Utilisateur ou mot de passe invalide";function N(){var e;let{toast:s}=(0,o.dj)(),t=(0,h.useRouter)(),{mutate:m,isPending:u}=(0,r.HCE)(),d=(0,v.mN)({resolver:(0,f.u)(r.oMU),defaultValues:r.iBS}),{handleSubmit:N,control:j,setError:g,formState:{errors:_}}=d,b=(e,l)=>{m({data:e,withData:l},{onSuccess:()=>{s({title:"Compte supprim\xe9",description:l?"Votre compte et vos donn\xe9es ont \xe9t\xe9 supprim\xe9s":"Votre compte a \xe9t\xe9 supprim\xe9"}),t.push("/")},onError:e=>{var t;if((0,x.F0)(e)&&(null==(t=e.response)?void 0:t.status)===401){g("root",{message:w}),g("emailOrConnectId",{message:w}),g("password",{message:w});return}s({title:"Une erreur est survenue",description:e.message})}})};return(0,l.jsx)("main",{className:"flex size-full grow flex-col items-center justify-center gap-4",children:(0,l.jsx)(a.Zp,{className:"rounded-md p-4",children:(0,l.jsx)(n.lV,{...d,children:(0,l.jsxs)("form",{className:"flex flex-col gap-2",children:[(0,l.jsx)(i.Z,{label:"Email ou ID Connect'Events",name:"emailOrConnectId",control:j}),(0,l.jsx)(i.Z,{type:"password",label:"Mot de passe",name:"password",control:j}),(null==(e=_.root)?void 0:e.message)?(0,l.jsx)("p",{className:"mx-auto w-fit text-sm text-destructive",children:_.root.message}):null,(0,l.jsx)(c.$,{type:"button",onClick:()=>{N(e=>b(e,!1))()},variant:"destructive",className:"font-semibold",isLoading:u,children:"Supprimer mon compte"}),(0,l.jsx)(p,{label:"OU"}),(0,l.jsx)(c.$,{type:"button",onClick:()=>N(e=>b(e,!0))(),variant:"destructive-filled",className:"font-semibold",isLoading:u,children:"Supprimer mon compte et mes donn\xe9es"})]})})})})}let j=N}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=11215)),_N_E=e.O()}]); 2//# sourceMappingURL=delete-account-0d39e9b51e09b555.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.