import { useEffect, useRef, useState } from 'react'; import type { ReactNode } from 'react'; import { ArrowRight, BrainCircuit, ChevronRight, CircleAlert, Database, Layers, Lightbulb, ListChecks, Sparkles, Table2 } from 'lucide-react'; import type { ThemeTokens } from '../../context/ThemeContext'; import type { I18n } from '../../i18n/locales'; import type { AskAnswer, AskStep, AskTone } from '../../lib/ibpAsk'; /** * 履约风险回答卡:思考过程(逐条揭示,揭示完折叠成一行)+ 规范六段式正文 * 结论 / 关键数字 / 风险明细 / 依据与口径 / 建议动作 / 数据来源。 * 只负责渲染,所有数字与文案由 lib/ibpAsk.ts 从业务本体层现算。 */ const toneColor = (tone: AskTone | undefined, tk: ThemeTokens) => tone === 'danger' ? tk.danger : tone === 'warning' ? tk.warning : tone === 'success' ? tk.success : tone === 'info' ? tk.info : tk.accent; /** 小节标题:细线 + 图标 + 文案,让六段结构一眼可辨 */ function SecHead({ icon, text, tk, hint }: { icon: ReactNode; text: string; tk: ThemeTokens; hint?: string }) { return (
| {c} | ))}
|---|
| {cell} | ))}