import { useState } from 'react' import { Alert, Box, Button, Paper, TextField, Typography, } from '@mui/material' import { Calendar, CheckCircle2, Mail } from 'lucide-react' import type { PropertyUnit } from '../../domain/property' interface PropertyContactFormProps { propertyTitle: string highlightUnitId?: string | null units?: PropertyUnit[] } export function PropertyContactForm({ propertyTitle, highlightUnitId, units }: PropertyContactFormProps) { const [inquiryName, setInquiryName] = useState('') const [inquiryText, setInquiryText] = useState('') const [sent, setSent] = useState(false) function handleSendInquiry() { if (!inquiryName.trim() || !inquiryText.trim()) return setSent(true) } return ( Verwaltung kontaktieren {sent ? ( } severity="success" sx={{ borderRadius: 1 }} > Ihre Anfrage wurde übermittelt. Die Verwaltung meldet sich in Kürze. ) : ( Ihr Name setInquiryName(e.target.value)} /> Bezug u.id === highlightUnitId)?.unitLabel ?? 'Einheit') : propertyTitle } slotProps={{ input: { readOnly: true } }} sx={{ '& .MuiInputBase-input': { color: 'text.secondary', fontSize: '0.85rem' } }} /> Ihre Nachricht setInquiryText(e.target.value)} /> Antwortzeit: typisch 1–2 Werktage )} ) }