'use client'; import { useEffect, useRef, useState, useActionState } from 'react'; import { createPortal } from 'react-dom'; import { useTranslations } from 'next-intl'; import { sendContactMail, type ContactFormState } from '@/app/actions/sendContactMail'; type Props = { isOpen: boolean; onClose: () => void; }; type FieldProps = { label: string; name: string; type?: string; required?: boolean; textarea?: boolean; inputRef?: React.RefObject; }; function Field({ label, name, type = 'text', required, textarea, inputRef }: FieldProps) { const base = 'w-full font-sans text-sm text-brand-brown bg-white/60 border border-brand-brown/12 rounded-lg px-4 py-3 placeholder:text-brand-brown/25 focus:outline-none focus:border-brand-brown/35 focus:bg-white/80 transition-colors duration-150'; return (
{textarea ? (