"use client"; import Image from "next/image"; import Link from "next/link"; import { useTranslations } from "next-intl"; import { useActionState, useState } from "react"; import { register } from "@/actions/register"; interface RegisterFormProps { hotelName: string; captcha: { provider: string; siteKey?: string }; error?: string; } export function RegisterForm({ hotelName, captcha, error }: RegisterFormProps) { const t = useTranslations("pages.register"); const showCaptcha = captcha.provider !== "none" && !!captcha.siteKey; const [serverError, formAction, isPending] = useActionState(register, null); const [termsAccepted, setTermsAccepted] = useState(false); return (