import type { ZodError } from 'zod';

/** Extract the first Zod validation error message. Replaces 61 inline duplicates. */
export function firstZodIssue(error: ZodError): string {
  return error.issues[0]?.message ?? 'Validation error';
}