"use client"; import { useState } from "react"; import { FormField, FIELD_CLASSES } from "@/components/ui/FormField"; import { ZEITPLANUNG_TYPEN, type ZeitplanungTyp } from "@/lib/auftraege/zeitplanung"; const LABELS: Record = { ab_sofort: "Ab sofort", am: "Am (fester Termin)", ab: "Ab (frühestens ab)", diese_woche: "Diese Woche", sobald_moeglich: "Sobald als möglich", }; export function ZeitplanungFeld({ vorbefuelltesDatum, startTyp = "ab_sofort", startZeitpunkt, }: { vorbefuelltesDatum: string; startTyp?: ZeitplanungTyp; startZeitpunkt?: string; }) { const [typ, setTyp] = useState(startTyp); const zeigeZeitpunkt = typ === "am" || typ === "ab"; return ( <> {zeigeZeitpunkt && ( )} ); }