| 1 | "use client"; |
| 2 | |
| 3 | import { CheckIcon } from "lucide-react"; |
| 4 | |
| 5 | import { Button } from "@/components/ui/button"; |
| 6 | import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog"; |
| 7 | |
| 8 | const plans = [ |
| 9 | { |
| 10 | name: "Plus", |
| 11 | price: "$10", |
| 12 | period: "/month", |
| 13 | features: [ |
| 14 | "Unlimited AI creations", |
| 15 | "Remove ALLWEONE® branding", |
| 16 | "Advanced animations", |
| 17 | "Advanced AI image models", |
| 18 | ], |
| 19 | }, |
| 20 | { |
| 21 | name: "Pro", |
| 22 | price: "$25", |
| 23 | period: "/month", |
| 24 | features: [ |
| 25 | "Everything in Plus", |
| 26 | "Premium AI image models", |
| 27 | "Custom branding and fonts", |
| 28 | "Detailed analytics", |
| 29 | "API access", |
| 30 | ], |
| 31 | popular: true, |
| 32 | }, |
| 33 | { |
| 34 | name: "Ultra", |
| 35 | price: "$100", |
| 36 | period: "/month", |
| 37 | features: [ |
| 38 | "Everything in Pro", |
| 39 | "Most advanced AI models", |
| 40 | "Priority support", |
| 41 | "Early access to features", |
| 42 | ], |
| 43 | }, |
| 44 | ]; |
| 45 | |
| 46 | interface SubscriptionModalProps { |
| 47 | open: boolean; |
| 48 | onOpenChange: (open: boolean) => void; |
| 49 | } |
| 50 | |
| 51 | export function SubscriptionModal({ |
| 52 | open, |
| 53 | onOpenChange, |
| 54 | }: SubscriptionModalProps) { |
| 55 | return ( |
| 56 | <Dialog open={open} onOpenChange={onOpenChange}> |
| 57 | <DialogContent className="z-100 max-w-6xl gap-0 p-0"> |
| 58 | <div className="border-b px-8 pt-8 pb-6"> |
| 59 | <DialogTitle className="text-3xl font-semibold tracking-tight"> |
| 60 | Upgrade to ALLWEONE® Presentation AI |
| 61 | </DialogTitle> |
| 62 | <p className="mt-2 text-muted-foreground"> |
| 63 | Choose the plan that works best for you |
| 64 | </p> |
| 65 | </div> |
| 66 | |
| 67 | <div className="grid gap-px bg-border md:grid-cols-3"> |
| 68 | {plans.map((plan) => ( |
| 69 | <div |
| 70 | key={plan.name} |
| 71 | className={`space-y-6 bg-background p-10 ${plan.popular ? "relative" : ""}`} |
| 72 | > |
| 73 | {plan.popular && ( |
| 74 | <div className="absolute top-0 right-0 left-0 bg-primary py-1 text-center text-xs font-medium text-primary-foreground"> |
| 75 | Most Popular |
| 76 | </div> |
| 77 | )} |
| 78 | |
| 79 | <div className={`space-y-4 ${plan.popular ? "mt-6" : ""}`}> |
| 80 | <div> |
| 81 | <h3 className="text-lg font-semibold">{plan.name}</h3> |
| 82 | <div className="mt-2 flex items-baseline gap-1"> |
| 83 | <span className="text-4xl font-bold tracking-tight"> |
| 84 | {plan.price} |
| 85 | </span> |
| 86 | <span className="text-muted-foreground">{plan.period}</span> |
| 87 | </div> |
| 88 | </div> |
| 89 | |
| 90 | <Button |
| 91 | className="w-full" |
| 92 | variant={plan.popular ? "default" : "outline"} |
| 93 | size="lg" |
| 94 | > |
| 95 | Get Started |
| 96 | </Button> |
| 97 | |
| 98 | <div className="space-y-3 pt-2"> |
| 99 | {plan.features.map((feature, index) => ( |
| 100 | <div key={index} className="flex items-start gap-2"> |
| 101 | <CheckIcon className="mt-0.5 size-5 shrink-0 text-primary" /> |
| 102 | <span className="text-sm leading-relaxed">{feature}</span> |
| 103 | </div> |
| 104 | ))} |
| 105 | </div> |
| 106 | </div> |
| 107 | </div> |
| 108 | ))} |
| 109 | </div> |
| 110 | |
| 111 | {/* Footer */} |
| 112 | <div className="bg-muted/30 px-8 py-6 text-center"> |
| 113 | <p className="text-sm text-muted-foreground"> |
| 114 | All plans include unlimited AI creations under fair use. Cancel |
| 115 | anytime. |
| 116 | </p> |
| 117 | </div> |
| 118 | </DialogContent> |
| 119 | </Dialog> |
| 120 | ); |
| 121 | } |
| 122 |