import { useState, type InputHTMLAttributes } from 'react'
import Input from '@/components/ui/Input'
import Icon from '@/components/ui/Icon'
import { useT } from '@/i18n/useT'
type Props = Omit, 'type'>
/** Password input with a show/hide toggle; the toggle is a labelled button. */
export default function PasswordField({ className = '', ...rest }: Props) {
const [visible, setVisible] = useState(false)
const t = useT()
return (