import { useTranslation } from 'react-i18next' import cn from 'classnames' import s from './index.module.css' import type { ProviderHosted } from '@/models/common' type AnthropicHostedProviderProps = { provider: ProviderHosted } const AnthropicHostedProvider = ({ provider, }: AnthropicHostedProviderProps) => { const { t } = useTranslation() const exhausted = provider.quota_used > provider.quota_limit return (
{t('common.provider.anthropicHosted.anthropicHosted')}
{exhausted ? t('common.provider.anthropicHosted.exhausted') : t('common.provider.anthropicHosted.onTrial')}
{t('common.provider.anthropicHosted.desc')}
{t('common.provider.anthropicHosted.callTimes')}
{Array(10).fill(0).map((i, k) => (
))}
{provider.quota_used}/{provider.quota_limit}
{ exhausted && (
{t('common.provider.anthropicHosted.usedUp')}
) }
) } export default AnthropicHostedProvider