import {motion} from 'framer-motion'; import React, {useState} from 'react'; interface PricingData { name: string; calculatePrice: (emails: number) => number; color?: string; } interface PricingCalculatorProps { competitors: PricingData[]; defaultVolume?: number; } const volumeOptions = [ {label: '10K emails/month', value: 10000}, {label: '100K emails/month', value: 100000}, {label: '500K emails/month', value: 500000}, {label: '1M emails/month', value: 1000000}, ]; /** * Interactive pricing calculator comparing Plunk with competitors */ export function PricingCalculator({competitors, defaultVolume = 100000}: PricingCalculatorProps) { const [volume, setVolume] = useState(defaultVolume); const plunkPrice = volume * 0.001; return ( {/* Header */}

Pricing Calculator

Compare costs across platforms at different email volumes

{/* Volume Selector */}
{volumeOptions.map((option) => ( ))}
{/* Results */}
{/* Plunk */}
Plunk Cheapest
${plunkPrice.toFixed(2)}
per month
{/* Competitors */} {competitors.map((competitor, index) => { const price = competitor.calculatePrice(volume); const savings = ((price - plunkPrice) / price) * 100; return (
{competitor.name}
${price.toFixed(2)}
per month
{savings > 0 && (
Save {savings.toFixed(0)}% with Plunk
)}
); })}
); }