"use client"; import { CheckCircle2, XCircle } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; import { Card, CardContent, CardHeader } from "@/components/ui/card"; interface Feature { text: string; included: boolean; highlight?: boolean; note?: string; } interface PricingCardProps { plan: "basic" | "premium" | "free"; isAnnual?: boolean; isDisabled?: boolean; isSelected?: boolean; className?: string; } const planData: Record< string, { name: string; monthlyPrice: number; annualPrice: number; description: string; badge: string | null; features: Feature[]; } > = { basic: { name: "Básico", monthlyPrice: 5, annualPrice: 4, description: "Perfeito para uso pessoal e pequenas consultas", badge: null, features: [ { text: "Até 100 consultas/mês", included: true }, { text: "Busca por código de barras", included: true }, { text: "Busca por nome", included: true }, { text: "Informações nutricionais completas", included: true }, { text: "Histórico (últimas 10)", included: true }, { text: "Filtros avançados", included: false }, { text: "Listas de compras", included: false }, { text: "Comparação de produtos", included: false }, { text: "Exportação de dados", included: false }, { text: "API de acesso", included: false }, { text: "Suporte prioritário", included: false }, ], }, premium: { name: "Premium", monthlyPrice: 10, annualPrice: 8, description: "Ideal para profissionais e uso intensivo", badge: "Popular", features: [ { text: "Até 500 consultas/mês", included: true }, { text: "Busca por código de barras", included: true }, { text: "Busca por nome", included: true }, { text: "Informações nutricionais completas", included: true }, { text: "Histórico ilimitado", included: true }, { text: "Filtros avançados", included: true }, { text: "Listas de compras ilimitadas", included: true }, { text: "Comparação de produtos (até 5)", included: true }, { text: "Exportação de dados (CSV/JSON)", included: true }, { text: "API de acesso (1000 req/mês)", included: true }, { text: "Suporte prioritário", included: true }, ], }, free: { name: "Free Beta", monthlyPrice: 0, annualPrice: 0, description: "Acesso completo durante fase beta", badge: "Beta", features: [ { text: "Consultas ilimitadas", included: true, highlight: true }, { text: "Busca por código de barras", included: true }, { text: "Busca por nome", included: true }, { text: "Informações nutricionais completas", included: true }, { text: "Histórico ilimitado", included: true }, { text: "Filtros avançados", included: true }, { text: "Listas de compras ilimitadas", included: true }, { text: "Comparação de produtos", included: true }, { text: "Exportação de dados", included: true }, { text: "Badge Beta Tester", included: true, highlight: true }, { text: "Acesso temporário", included: true, note: "Durante fase beta" }, ], }, }; // featureIcons removido - não utilizado export function PricingCard({ plan, isAnnual = false, className = "", }: PricingCardProps) { const data = planData[plan]; const price = isAnnual ? data.annualPrice : data.monthlyPrice; const isPopular = plan === "premium"; const isFree = plan === "free"; // getFeatureIcon removido - não utilizado return ( {/* Badge */} {data.badge && (
{data.badge}
)}

{data.name}

{data.description}

{/* Preço */}
${price} {!isFree && ( /mês )}
{isAnnual && !isFree && (

Economize ${(data.monthlyPrice - data.annualPrice) * 12}/ano

)}
{/* Botões */}
{/* Features */}
{data.features.map((feature, index) => { return (
{feature.included ? ( ) : ( )}
{feature.text} {feature.note && (

{feature.note}

)}
); })}
); }