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