import { jsxs, jsx } from 'react/jsx-runtime';

const GanttProgressCircle = ({ progress, color, size = 20, strokeWidth = 2.5, }) => {
    const radius = (size - strokeWidth) / 2;
    const circumference = 2 * Math.PI * radius;
    const offset = circumference - (progress / 100) * circumference;
    const center = size / 2;
    return (jsxs("svg", { width: size, height: size, className: "shrink-0", children: [jsx("circle", { cx: center, cy: center, r: radius, fill: "none", stroke: "currentColor", strokeWidth: strokeWidth, className: "text-[var(--color-border)]" }), jsx("circle", { cx: center, cy: center, r: radius, fill: "none", stroke: color, strokeWidth: strokeWidth, strokeDasharray: circumference, strokeDashoffset: offset, strokeLinecap: "round", transform: `rotate(-90 ${center} ${center})` }), progress === 100 && (jsx("path", { d: `M${center - 3} ${center} l2 2.5 l4 -4.5`, fill: "none", stroke: color, strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }))] }));
};

export { GanttProgressCircle };
