'use client';
import { jsx as _jsx } from "react/jsx-runtime";
import { cn } from '../../../lib/utils.js';
export function GanttBar({ title, identifier, startOffset, widthPercent, color, className, onClick, }) {
    return (_jsx("div", { "data-testid": `gantt-bar-${identifier}`, className: cn('absolute top-1 flex h-6 cursor-pointer items-center overflow-hidden rounded px-1.5 text-white transition-opacity hover:opacity-90', className), style: {
            left: `${startOffset}%`,
            width: `${Math.max(widthPercent, 1)}%`,
            backgroundColor: color,
        }, onClick: onClick, title: `${identifier}: ${title}`, children: _jsx("span", { className: "truncate text-[10px] font-medium", children: identifier }) }));
}
