import Link from 'next/link' import { useRef, useState } from 'react' import { Button, Card, cn } from 'ui' import { LazyComposedChartHandler } from '@/components/ui/Charts/ComposedChartHandler' interface ReportsChartUpsellProps { report: { label: string requiredPlan?: string } orgSlug: string } export const ReportChartUpsell = ({ report, orgSlug }: ReportsChartUpsellProps) => { const startDate = '2025-01-01' const endDate = '2025-01-02' const [isHoveringUpgrade, setIsHoveringUpgrade] = useState(false) const getExpDemoChartData = () => new Array(20).fill(0).map((_, index) => ({ period_start: new Date(startDate).getTime() + index * 1000, demo: Math.floor(Math.pow(1.25, index) * 10), max_demo: 1000, })) const getDemoChartData = () => new Array(20).fill(0).map((_, index) => ({ period_start: new Date(startDate).getTime() + index * 1000, demo: Math.floor(Math.random() * 10) + 1, max_demo: 1000, })) const demoChartData = useRef(getDemoChartData()) const exponentialChartData = useRef(getExpDemoChartData()) const demoData = isHoveringUpgrade ? exponentialChartData.current : demoChartData.current return (

{report.label}

{report.requiredPlan ? `Available on the ${report.requiredPlan} Plan and above` : `Your plan does not include access to ${report.label}`}

{}} />
) }