'use client' import type { FC } from 'react' import React from 'react' import { useTranslation } from 'react-i18next' import UpgradeBtn from '../upgrade-btn' import ProgressBar from '@/app/components/billing/progress-bar' import Button from '@/app/components/base/button' import { mailToSupport } from '@/app/components/header/utils/util' import { useProviderContext } from '@/context/provider-context' import { useAppContext } from '@/context/app-context' import { Plan } from '@/app/components/billing/type' import s from './style.module.css' import cn from '@/utils/classnames' const LOW = 50 const MIDDLE = 80 const AppsFull: FC<{ loc: string; className?: string; }> = ({ loc, className, }) => { const { t } = useTranslation() const { plan } = useProviderContext() const { userProfile, langeniusVersionInfo } = useAppContext() const isTeam = plan.type === Plan.team const usage = plan.usage.buildApps const total = plan.total.buildApps const percent = usage / total * 100 const color = (() => { if (percent < LOW) return 'bg-components-progress-bar-progress-solid' if (percent < MIDDLE) return 'bg-components-progress-warning-progress' return 'bg-components-progress-error-progress' })() return (