'use client' import type { FC } from 'react' import React from 'react' import { useTranslation } from 'react-i18next' import Badge from '@/app/components/base/badge' import { GeneralType, ParentChildType } from '@/app/components/base/icons/src/public/knowledge' type Props = { isGeneralMode: boolean isQAMode: boolean } const ChunkingModeLabel: FC = ({ isGeneralMode, isQAMode, }) => { const { t } = useTranslation() const TypeIcon = isGeneralMode ? GeneralType : ParentChildType return (
{isGeneralMode ? `${t('dataset.chunkingMode.general')}${isQAMode ? ' ยท QA' : ''}` : t('dataset.chunkingMode.parentChild')}
) } export default React.memo(ChunkingModeLabel)