import { useMemo } from 'react'; export type PasswordStrength = 'weak' | 'medium' | 'strong' | null; /** Length-based password strength heuristic shared by every reset/create-password screen. */ export function usePasswordStrength(password: string): PasswordStrength { return useMemo(() => { if (password.length === 0) return null; if (password.length < 6) return 'weak'; if (password.length < 10) return 'medium'; return 'strong'; }, [password]); }