"use client"; import { useActionState } from "react"; import Link from "next/link"; import { useTranslations } from "next-intl"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { createTrialTenantAction, type PlatformTrialState } from "@/server/actions/trial-platform"; const ERR = "rounded-lg bg-[rgba(255,107,107,0.16)] px-3 py-2 text-sm text-[var(--risk)]"; function ErrorText({ state }: { state: PlatformTrialState }) { const t = useTranslations("trial.platform.errors"); if (state.status !== "error") return null; return
{t.has(state.code) ? t(state.code) : t("failed")}
; } /** L15 Testphase: platform wizard "Testmandant anlegen" (one page, four sections). */ export function PlatformTrialCreateForm({ defaultEnd, min, max }: { defaultEnd: string; min: string; max: string }) { const t = useTranslations("trial.platform.wizard"); const [state, action, pending] = useActionState