import type { FC } from 'react' import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip' import { RiLineHeight } from '@remixicon/react' import * as React from 'react' import { useTranslation } from 'react-i18next' import { Collapse } from '@/app/components/base/icons/src/vender/knowledge' type DisplayToggleProps = { isCollapsed: boolean toggleCollapsed: () => void } const DisplayToggle: FC = ({ isCollapsed, toggleCollapsed, }) => { const { t } = useTranslation() const label = isCollapsed ? t('segment.expandChunks', { ns: 'datasetDocuments' }) : t('segment.collapseChunks', { ns: 'datasetDocuments' }) return ( { isCollapsed ? : } )} /> {label} ) } export default React.memo(DisplayToggle)