import type { FC } from 'react' import type { StepperProps } from '../stepper' import { RiArrowLeftLine } from '@remixicon/react' import Link from 'next/link' import { useMemo } from 'react' import { useTranslation } from 'react-i18next' import { cn } from '@/utils/classnames' import { Stepper } from '../stepper' export type TopBarProps = Pick & { className?: string datasetId?: string } const STEP_T_MAP = { 1: 'steps.one', 2: 'steps.two', 3: 'steps.three', } as const export const TopBar: FC = (props) => { const { className, datasetId, ...rest } = props const { t } = useTranslation() const fallbackRoute = useMemo(() => { return datasetId ? `/datasets/${datasetId}/documents` : '/datasets' }, [datasetId]) return (

{t('steps.header.fallbackRoute', { ns: 'datasetCreation' })}

({ name: t(STEP_T_MAP[(i + 1) as keyof typeof STEP_T_MAP], { ns: 'datasetCreation' }), }))} {...rest} />
) }