import React, { useEffect, useState } from "react"; import Link from "next/link"; import { useRouter } from "next/router"; // hooks import useToast from "hooks/use-toast"; // ui import { CustomMenu, Tooltip, LinearProgressIndicator, ContrastIcon, RunningIcon } from "@plane/ui"; // icons import { AlarmClock, AlertTriangle, ArrowRight, CalendarDays, LinkIcon, Pencil, Star, Target, Trash2, } from "lucide-react"; // helpers import { getDateRangeStatus, renderShortDateWithYearFormat, findHowManyDaysLeft } from "helpers/date-time.helper"; import { copyTextToClipboard, truncateText } from "helpers/string.helper"; // types import { ICycle } from "types"; type TSingleStatProps = { cycle: ICycle; handleEditCycle: () => void; handleDeleteCycle: () => void; handleAddToFavorites: () => void; handleRemoveFromFavorites: () => void; }; const stateGroups = [ { key: "backlog_issues", title: "Backlog", color: "#dee2e6", }, { key: "unstarted_issues", title: "Unstarted", color: "#26b5ce", }, { key: "started_issues", title: "Started", color: "#f7ae59", }, { key: "cancelled_issues", title: "Cancelled", color: "#d687ff", }, { key: "completed_issues", title: "Completed", color: "#09a953", }, ]; type progress = { progress: number; }; function RadialProgressBar({ progress }: progress) { const [circumference, setCircumference] = useState(0); useEffect(() => { const radius = 40; const circumference = 2 * Math.PI * radius; setCircumference(circumference); }, []); const progressOffset = ((100 - progress) / 100) * circumference; return (