"use client" import { useIntersection } from "@/hooks/use-intersection" import { domesticPricing, internationalPricing } from "@/lib/pricing-data" // Convert data points to SVG path coordinates // Chart: X = 0 (60 days) to 400 (0 days), Y = 0 (top, 10x) to 300 (bottom, 0x) function toPath( data: { days: number; multiplier: number }[] ): string { const points = data.map((d) => ({ x: ((60 - d.days) / 60) * 380 + 40, y: 280 - (d.multiplier / 10) * 260, })) // Smooth bezier curve through points let path = `M ${points[0].x} ${points[0].y}` for (let i = 1; i < points.length; i++) { const prev = points[i - 1] const curr = points[i] const cpx = (prev.x + curr.x) / 2 path += ` C ${cpx} ${prev.y}, ${cpx} ${curr.y}, ${curr.x} ${curr.y}` } return path } export function PricingChart() { const { ref, isVisible } = useIntersection(0.3) const domesticPath = toPath(domesticPricing) const internationalPath = toPath(internationalPricing) // Y position for 2x multiplier (danger threshold) const dangerY = 280 - (2 / 10) * 260 return (