import { FolderPlus, Trash2, ChevronRight } from 'lucide-react' import type { Category } from '../types/category' import { Tooltip } from './Tooltip' import styles from './CategoryRow.module.css' interface BlogCategoryRowProps { category: Category depth: number hasChildren: boolean expanded: boolean onToggle: () => void onAddSub: (id: string) => void onRemove: (id: string) => void } export function BlogCategoryRow({ category, depth, hasChildren, expanded, onToggle, onAddSub, onRemove, }: BlogCategoryRowProps) { return (
{ if (e.key === 'Enter' || e.key === ' ') { e.preventDefault() onToggle() } } : undefined } role={hasChildren ? 'button' : undefined} tabIndex={hasChildren ? 0 : undefined} aria-expanded={hasChildren ? expanded : undefined} >
{category.nameEn} ยท {category.nameFa} {hasChildren && ( )}
{category.description &&

{category.description}

}
) }