import { GripVertical, Edit, Archive, RotateCcw } from 'lucide-react' import { useSortable } from '@dnd-kit/sortable' import { CSS } from '@dnd-kit/utilities' import { cn } from '@/lib/utils' import type { StepCategoryListItem } from '@/types' interface CategoryRowProps { category: StepCategoryListItem stepCount: number onEdit: (category: StepCategoryListItem) => void onArchive: (id: string) => void onRestore: (id: string) => void } export function CategoryRow({ category, stepCount, onEdit, onArchive, onRestore }: CategoryRowProps) { const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({ id: category.id }) const style = { transform: CSS.Transform.toString(transform), transition } return (
{/* Drag Handle */} {/* Category Info */}

{category.name}

{!category.is_active && ( Archived )}
{category.description && (

{category.description}

)}

{stepCount} step{stepCount !== 1 ? 's' : ''}

{/* Actions */}
{category.is_active ? ( ) : ( )}
) }