import Link from "next/link"; import { useId } from "react"; import { UiIcon } from "./ui-icon"; type InfoProgressCardProps = { title: string; requiredLabel: boolean; estimate: string; progress: number; tooltip?: string; slug: string; }; const RADIUS = 12; const CIRCUMFERENCE = 2 * Math.PI * RADIUS; export function InfoProgressCard({ title, requiredLabel = false, estimate, progress, tooltip, slug, }: InfoProgressCardProps) { const tooltipId = useId(); const normalizedProgress = Math.max(0, Math.min(progress, 100)); const dashOffset = CIRCUMFERENCE - (normalizedProgress / 100) * CIRCUMFERENCE; return (

{title}{" "} {requiredLabel && "(Required)"}

{tooltip ? (
) : null}

Estimate time: {estimate}

{normalizedProgress < 100 ? ( ) : (
); } export default InfoProgressCard;