import { z } from "zod";

// See schemas/auth.ts for the shared client/server validation rationale.

/**
 * Payload accepted by `DELETE /auth/me`. Deleting an account is
 * irreversible, so it's gated behind re-entering the current password —
 * same idea as `loginSchema`'s password field (presence only, the API does
 * the real `argon2.verify`), not a fresh set of complexity rules.
 */
export const deleteAccountSchema = z.object({
  password: z.string().min(1, "Le mot de passe est requis"),
});
/** Inferred TS type for {@link deleteAccountSchema}'s validated output. */
export type DeleteAccountInput = z.infer<typeof deleteAccountSchema>;
