import { FolderPlus, Globe, Layers, Trash2, ChevronRight, ClipboardList, Pencil } from 'lucide-react' import { useLocale } from '@meshkee/dashboard-ui' import type { Category } from '../types/category' import { useT } from '../i18n/useT' import { Tooltip } from './Tooltip' import { useTenantBranding } from '../context/TenantBrandingContext' import { hasBusinessModule } from '../utils/businessModules' import styles from './CategoryRow.module.css' interface CategoryRowProps { category: Category depth: number hasChildren: boolean expanded: boolean variationCount: number technicalFieldCount: number onToggle: () => void onAddSub: (id: string) => void onVariations: (id: string) => void onTechnicalForm: (id: string) => void onEdit: (id: string) => void onTranslate: (id: string) => void onRemove: (id: string) => void } export function CategoryRow({ category, depth, hasChildren, expanded, variationCount, technicalFieldCount, onToggle, onAddSub, onVariations, onTechnicalForm, onEdit, onTranslate, onRemove, }: CategoryRowProps) { const t = useT() const { locale } = useLocale() const isFa = locale === 'fa' const { enabledModules } = useTenantBranding() const showTranslationControls = hasBusinessModule(enabledModules, 'multilanguage_data') const translationCount = category.translationCount ?? 0 const primaryName = isFa ? category.nameFa || category.nameEn : category.nameEn const secondaryName = isFa ? category.nameFa ? category.nameEn : '' : category.nameFa return (
{category.description}
)}