import { Badge } from "@/shared/ui/badge"
import type { SelectionPatternScore } from "../api/selection.types"
interface PatternScoreProps {
score: SelectionPatternScore | null
}
const breakdownLabels = {
trend_structure: "趋势",
kdj_state: "KDJ",
volume_pattern: "量能",
price_shape: "价格形态",
} as const
export function PatternScoreSummary({ score }: PatternScoreProps) {
if (!score) return 未评分
if (score.status === "failed") {
return
本次运行未执行图形评分。
) } if (score.status === "failed") { return ({score.reason || "案例库或评分计算暂时不可用。"}
未匹配到 {formatScore(score.threshold)} 分以上案例。
{formatScore(score.value)} 分
最佳案例:{score.case?.name ?? "未知"}