import { FileText } from 'lucide-react'; import type { PlatformTheme } from '../../../packages/shared/src/contracts/runtime'; import type { LegalDocument, LegalDocumentBlock, } from './legalDocuments'; import { PlatformActionButton } from './PlatformActionButton'; import { UnifiedModal } from './UnifiedModal'; type LegalDocumentModalProps = { document: LegalDocument | null; open: boolean; platformTheme?: PlatformTheme; zIndexClassName?: string; onClose: () => void; }; function LegalRichText({ text }: { text: string }) { const parts = text.split(/(\*\*[^*]+\*\*)/gu); return ( <> {parts.map((part, index) => { const boldMatch = /^\*\*([^*]+)\*\*$/u.exec(part); if (boldMatch) { return ( {boldMatch[1]} ); } return part; })} ); } function LegalDocumentBodyBlock({ block, }: { block: LegalDocumentBlock; }) { if (block.type === 'heading') { const className = block.level === 2 ? 'mt-5 text-base font-black leading-7 text-[var(--platform-text-strong)] first:mt-0' : 'mt-4 text-sm font-black leading-6 text-[var(--platform-text-strong)] first:mt-0'; return
{block.text}
; } if (block.type === 'list') { return ( ); } return (

); } export function LegalDocumentModal({ document, open, platformTheme, zIndexClassName, onClose, }: LegalDocumentModalProps) { return ( 我知道了 } >
LEGAL
{document?.blocks.map((block, index) => ( ))}
); }