import { InfoIcon } from 'lucide-react' import { useTranslation } from 'react-i18next' import type { IPicGoCloudBillingOverview } from '#/types/cloud' import { Skeleton } from '@/components/ui/skeleton' import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip' import { PLAN_PERIOD_PLACEHOLDER, resolvePlanPeriodLabelInfo, resolvePlanPeriodValue, type PlanPeriodValue } from './cloud-plan-usage-helpers' interface PlanPeriodRowProps { billing: IPicGoCloudBillingOverview | null isLoading: boolean } export function PlanPeriodRow ({ billing, isLoading }: PlanPeriodRowProps) { const { t } = useTranslation() const value = resolvePlanPeriodValue(billing, t) const { labelKey, tooltipKey } = resolvePlanPeriodLabelInfo(billing) const tooltipText = tooltipKey ? t(tooltipKey) : null return (
{tooltipText}