'use client' import { CompanyProfile, BUSINESS_MODEL_LABELS, COMPANY_SIZE_LABELS, TARGET_MARKET_LABELS } from '@/lib/sdk/types' import { LEGAL_FORM_LABELS } from './constants' export function ProfileSummary({ formData, onEdit, onContinue, }: { formData: Partial onEdit: () => void onContinue: () => void }) { const summaryItems = [ { label: 'Firmenname', value: formData.companyName }, { label: 'Rechtsform', value: formData.legalForm ? LEGAL_FORM_LABELS[formData.legalForm] : undefined }, { label: 'Branche', value: formData.industry?.join(', ') }, { label: 'Geschaeftsmodell', value: formData.businessModel ? BUSINESS_MODEL_LABELS[formData.businessModel]?.short : undefined }, { label: 'Unternehmensgroesse', value: formData.companySize ? COMPANY_SIZE_LABELS[formData.companySize] : undefined }, { label: 'Mitarbeiter', value: formData.employeeCount }, { label: 'Hauptsitz', value: [formData.headquartersZip, formData.headquartersCity, formData.headquartersCountry === 'DE' ? 'Deutschland' : formData.headquartersCountry].filter(Boolean).join(', ') }, { label: 'Zielmaerkte', value: formData.targetMarkets?.map(m => TARGET_MARKET_LABELS[m] || m).join(', ') }, { label: 'Verantwortlicher', value: formData.isDataController ? 'Ja' : 'Nein' }, { label: 'Auftragsverarbeiter', value: formData.isDataProcessor ? 'Ja' : 'Nein' }, { label: 'DSB', value: formData.dpoName || 'Nicht angegeben' }, ].filter(item => item.value && item.value.length > 0) const missingFields: string[] = [] if (!formData.companyName) missingFields.push('Firmenname') if (!formData.legalForm) missingFields.push('Rechtsform') if (!formData.industry || formData.industry.length === 0) missingFields.push('Branche') if (!formData.businessModel) missingFields.push('Geschaeftsmodell') if (!formData.companySize) missingFields.push('Unternehmensgroesse') return (

Unternehmensprofil

{/* Success Banner */}
{formData.isComplete ? '\u2713' : '!'}

{formData.isComplete ? 'Profil erfolgreich abgeschlossen' : 'Profil unvollstaendig'}

{formData.isComplete ? 'Alle Angaben wurden gespeichert. Sie koennen jetzt mit der Scope-Analyse fortfahren.' : `Es fehlen noch Angaben: ${missingFields.join(', ')}.`}

{/* Profile Summary */}

Zusammenfassung

{summaryItems.map(item => (
{item.label} {item.value}
))}
{/* Actions */}
{formData.isComplete ? ( ) : ( )}
) }