"use client"; import { GraduationCap } from "lucide-react"; import type { BrainPyqAnalysisOutput } from "@/lib/api/types"; import type { StudyIntent } from "@/lib/study-intents"; import type { StudyCardMeta } from "./types"; import { RichStudyCard, Section, TrustFooter, FollowUpActions } from "./StudyCardPrimitives"; type CardAction = (intent: StudyIntent, prompt: string) => void; export function PyqAnalysisCard({ data, topic, meta, onAction, }: { data: BrainPyqAnalysisOutput; topic: string; meta?: StudyCardMeta; onAction: CardAction; }) { return (

{data.summary}

{data.repeated_topics && data.repeated_topics.length > 0 ? (
    {data.repeated_topics.map((t, idx) => (
  • {t.topic} ({t.chapter})
    Appeared: {t.count} times {t.years_seen && t.years_seen.length ? Years: {t.years_seen.join(", ")} : null}
  • ))}
) : (

No repeated topics identified.

)}
{data.marks_distribution && data.marks_distribution.length > 0 ? (
    {data.marks_distribution.map((d, idx) => (
  • {d.marks} Mark Questions {d.count} ({d.percentage}%)
  • ))}
) : (

No distribution data available.

)}
{data.pattern_note ? (

Pattern Insights

{data.pattern_note}

) : null} {data.next_step ? (

Next Recommended Action

{data.next_step}

) : null}
); }