'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Badge } from '../../ui/badge.js';
const PRIORITY_COLORS = {
    Urgent: 'bg-red-500/10 text-red-500',
    High: 'bg-orange-500/10 text-orange-500',
    Medium: 'bg-yellow-500/10 text-yellow-500',
    Low: 'bg-blue-500/10 text-blue-500',
    None: 'bg-muted text-muted-foreground',
};
export function WorkItemRow({ workItem, state, projectPrefix }) {
    const identifier = `${projectPrefix}-${workItem.sequenceId}`;
    return (_jsxs("div", { "data-testid": `work-item-row-${identifier}`, className: "hover:bg-accent/50 flex items-center gap-3 px-3 py-2 transition-colors", children: [_jsx("span", { className: "text-muted-foreground shrink-0 font-mono text-[10px]", children: identifier }), state ? (_jsx("span", { className: "h-2 w-2 shrink-0 rounded-full", style: { backgroundColor: state.color }, title: state.name })) : null, _jsx("span", { className: "min-w-0 flex-1 truncate text-xs", children: workItem.title }), workItem.estimateValue ? (_jsx(Badge, { variant: "outline", className: "shrink-0 font-mono text-[10px]", children: workItem.estimateValue })) : null, workItem.priority && workItem.priority !== 'None' ? (_jsx(Badge, { variant: "secondary", className: `shrink-0 text-[10px] ${PRIORITY_COLORS[workItem.priority] ?? ''}`, children: workItem.priority })) : null] }));
}
