'use client' import React from 'react' import type { LegalDocument } from '../_hooks/useConsentDocuments' export function DocumentCard({ document, onDelete, onEdit, onPreview, }: { document: LegalDocument onDelete: (id: string) => void onEdit: (id: string) => void onPreview: (doc: LegalDocument) => void }) { const typeColors = { 'privacy-policy': 'bg-blue-100 text-blue-700', terms: 'bg-green-100 text-green-700', 'cookie-policy': 'bg-yellow-100 text-yellow-700', imprint: 'bg-gray-100 text-gray-700', dpa: 'bg-purple-100 text-purple-700', } const typeLabels = { 'privacy-policy': 'Datenschutz', terms: 'AGB', 'cookie-policy': 'Cookie-Richtlinie', imprint: 'Impressum', dpa: 'AVV', } const statusColors = { draft: 'bg-yellow-100 text-yellow-700', active: 'bg-green-100 text-green-700', archived: 'bg-gray-100 text-gray-500', } const statusLabels = { draft: 'Entwurf', active: 'Aktiv', archived: 'Archiviert', } return (
{typeLabels[document.type]} {statusLabels[document.status]} {document.language} v{document.version}

{document.name}

{document.changes.length > 0 && (
Letzte Aenderungen:
)}
Autor: {document.author} | Aktualisiert: {document.lastUpdated.toLocaleDateString('de-DE')}
{document.status === 'draft' && ( )}
) }