'use client' import { useParams } from 'next/navigation' import { REDUCTION_TYPES } from './_components/types' import { HierarchyWarning } from './_components/HierarchyWarning' import { MitigationForm } from './_components/MitigationForm' import { MitigationCard } from './_components/MitigationCard' import { MeasuresLibraryModal } from './_components/MeasuresLibraryModal' import { SuggestMeasuresModal } from './_components/SuggestMeasuresModal' import { useMitigations } from './_hooks/useMitigations' export default function MitigationsPage() { const params = useParams() const projectId = params.projectId as string const m = useMitigations(projectId) if (m.loading) { return (
) } return (
{/* Header */}

Massnahmen

Risikominderung nach dem 3-Stufen-Verfahren: Design → Schutz → Information.

{m.hazards.length > 0 && ( )}
{m.hierarchyWarning && m.setHierarchyWarning(false)} />} {m.showForm && ( { m.setShowForm(false); m.setPreselectedType(undefined) }} hazards={m.hazards} preselectedType={m.preselectedType} onOpenLibrary={m.handleOpenLibrary} /> )} {m.showLibrary && ( m.setShowLibrary(false)} filterType={m.libraryFilter} /> )} {m.showSuggest && ( m.setShowSuggest(false)} /> )} {/* 3-Column Layout */}
{(['design', 'protection', 'information'] as const).map((type) => { const config = REDUCTION_TYPES[type] const items = m.byType[type] return (
{config.icon}

{config.label}

{config.description}

{items.length}
{config.subTypes.map((st) => ( {st.label} ))}
{items.map((item) => ( ))}
) })}
) }