"use client"; import { X, Sparkles, ArrowRight } from "lucide-react"; import { Button } from "@/components/ui/button"; import { FREE_TIER_LIMITS, type FeatureKey } from "@/lib/usage"; interface UpgradeModalProps { isOpen: boolean; onClose: () => void; feature: FeatureKey; currentUsage: number; } const FEATURE_LABELS: Record = { users: "Team Members", employees: "Active Employees", invoices: "Monthly Invoices", payroll_runs: "Monthly Payroll Runs", expenses: "Monthly Expenses", storage_mb: "Document Storage (MB)", ai_queries: "Monthly AI Queries", }; export function UpgradeModal({ isOpen, onClose, feature, currentUsage }: UpgradeModalProps) { if (!isOpen) return null; const limit = FREE_TIER_LIMITS[feature]; const label = FEATURE_LABELS[feature] || feature; return (
{/* Backdrop */}
{/* Modal */}

You've reached your free tier limit

You've used all {limit} {label} included in the free tier this month. Upgrade to Pro for unlimited access.

Current Usage {currentUsage} / {limit}

Pay only for what you use above the free tier

); }