'use client'; import * as Icons from '../Icons'; import ToggleCard from '../fields/ToggleCard'; import PrivacyEditor from '../PrivacyEditor'; import EnvLockNote from '../fields/EnvLockNote'; import { CONTACT_RETENTION_DEFAULT, CONTACT_RETENTION_MAX, isHttpUrl } from '@/lib/config/schema'; import { FieldError } from './fields'; import type { SectionProps } from './types'; export default function LegalSection({ settings, update, envLocks, fieldErrors }: SectionProps) { const notifyLock = envLocks?.['contact.notifyUrl']; // The Impressum drops a non-http(s) contact URL with a warning in the server // log, where nobody looks; say it here instead. const contactUrl = settings.legal?.contactUrl?.trim(); const contactUrlInvalid = !!contactUrl && !isHttpUrl(contactUrl); const notifyUrl = settings.contact?.notifyUrl?.trim(); const notifyUrlInvalid = !!notifyUrl && !isHttpUrl(notifyUrl); return (

Legal Notice & Impressum

Configure the legal disclosure page required by the German Digitale-Dienste-Gesetz (DDG).

{settings.legal?.enabled && ( View /impressum ↗ )}
} title="Enable Impressum Page (/impressum)" description="Automatically generates and links /impressum in footer" checked={settings.legal?.enabled === true} onToggle={() => update('legal.enabled', !settings.legal?.enabled)} />
{settings.legal?.enabled && ( <>
update('legal.heading', e.target.value)} placeholder="Angaben gemäß § 5 DDG" />

Leave empty for the § 5 DDG line in the site language. Set it when a different law applies, e.g. § 5 ECG in Austria.

update('legal.name', e.target.value)} placeholder="Max Mustermann" />
update('legal.address', e.target.value)} placeholder="Musterstraße 1" />
update('legal.zipCity', e.target.value)} placeholder="12345 Berlin" />
update('legal.country', e.target.value)} placeholder="Germany" />
update('legal.email', e.target.value)} placeholder="legal@example.com" />
update('legal.phone', e.target.value)} placeholder="+49 123 456789" />
update('legal.contactUrl', e.target.value)} placeholder="https://example.com/contact" aria-invalid={contactUrlInvalid || undefined} aria-describedby={contactUrlInvalid ? 'legal-contact-url-error' : undefined} /> {contactUrlInvalid && ( )}
update('legal.contactLabel', e.target.value)} placeholder="Contact form" />
update('legal.vatId', e.target.value)} placeholder="DE123456789" />
update('legal.taxId', e.target.value)} placeholder="12/345/67890" />