import { Button } from "@pram/ui/components/button"; import { MaterialIcon } from "@/components/ui/MaterialIcon"; import { formatTime } from "@/lib/time"; interface AttemptHeaderProps { pkgTitle: string; currentSectionTitle: string; timeElapsed: number; answeredCount: number; totalQuestions: number; isFinished: boolean; onAbandon: () => void; onFinish: () => void; } export function AttemptHeader({ pkgTitle, currentSectionTitle, timeElapsed, answeredCount, totalQuestions, isFinished, onAbandon, onFinish, }: AttemptHeaderProps) { return (
{pkgTitle} {currentSectionTitle}
Waktu Berlalu {formatTime(timeElapsed)}
0 ? (answeredCount / totalQuestions) * 100 : 0}%` }} />
{answeredCount}/{totalQuestions} Dijawab
); }