1import{t as e,u,T as t}from"./trpc-tanstack-CcrFfedX.js";import{u as n}from"./useMutation-DZfcQAwJ.js";function a(r){const s=u();return n({...e.user.login.mutationOptions(),onSuccess:async o=>{s.clear(),r?.onSuccess?.(o)},onError:o=>{console.error("Login error:",o),r?.onError?.(o)}})}function l(r){const s=u();return n({...e.user.logout.mutationOptions(),onSuccess:async()=>{s.clear(),r?.onSuccess?.()},onError:o=>{console.error("Logout error:",o)}})}function d(r){const s=u();return n({...e.user.signup.mutationOptions(),onSuccess:async o=>{s.clear(),r?.onSuccess?.(o)},onError:o=>{console.error("Signup error:",o),r?.onError?.(o)}})}function g(r){return n({...e.user.resetPassword.mutationOptions(),onSuccess:()=>{r?.onSuccess?.()},onError:s=>{console.error("Reset password error:",s),r?.onError?.(s)}})}function f(r){return n({...e.user.forgotPassword.mutationOptions(),onSuccess:()=>{r?.onSuccess?.()},onError:s=>{console.error("Forgot password error:",s),r?.onError?.(s)}})}function m(r){if(r instanceof Error){const s=r.message.toLowerCase();return s.includes("invalid email or password")||s.includes("invalid credentials")?"Invalid email or password":s.includes("user not found")?"No account found with this email":s.includes("email already exists")||s.includes("user already exists")?"An account with this email already exists":r.message}return r instanceof t?r.message:"An unexpected error occurred"}export{a,g as b,d as c,l as d,m as g,f as u}; 2//# sourceMappingURL=use-auth-mutations-DhV-tzHK.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.