'use client';
import { RegulationDocument } from '@/lib/regulations';
interface RegulationViewModalProps {
isOpen: boolean;
onClose: () => void;
document: RegulationDocument | null;
}
export default function RegulationViewModal({ isOpen, onClose, document }: RegulationViewModalProps) {
if (!isOpen || !document) {
return null;
}
return (
e.stopPropagation()}
>
{document.title}
Источник: {document.source} | Категория: {document.category}
Версия: {document.version} | Обновлено: {new Date(document.lastUpdated).toLocaleDateString('ru-RU')}
{document.sections && document.sections.length > 0 && (
Приложения и разделы
{document.sections.map(section => (
{section.title}
{section.content}
))}
)}
{document.url && (
)}
);
}