import { cn } from '@langgenius/dify-ui/cn' import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip' import { RiAedFill } from '@remixicon/react' import { useMemo } from 'react' import { useTranslation } from 'react-i18next' import { useProviderContext } from '@/context/provider-context' type PriorityLabelProps = { className?: string } const PriorityLabel = ({ className }: PriorityLabelProps) => { const { t } = useTranslation() const { plan } = useProviderContext() const priority = useMemo(() => { if (plan.type === 'sandbox') return 'standard' if (plan.type === 'professional') return 'priority' if (plan.type === 'team') return 'top-priority' return 'standard' }, [plan]) return ( } > {(plan.type === 'professional' || plan.type === 'team') && ( )} {t(($) => $[`plansCommon.priority.${priority}`], { ns: 'billing' })}
{t(($) => $['plansCommon.documentProcessingPriority'], { ns: 'billing' })}:{' '} {t(($) => $[`plansCommon.priority.${priority}`], { ns: 'billing' })}
{priority !== 'top-priority' && (
{t(($) => $['plansCommon.documentProcessingPriorityTip'], { ns: 'billing' })}
)}
) } export default PriorityLabel