"use client" import { useState } from "react" import { Button } from "@/components/ui/button" import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" import { Input } from "@/components/ui/input" import { Textarea } from "@/components/ui/textarea" import { Badge } from "@/components/ui/badge" import { Alert, AlertDescription } from "@/components/ui/alert" import { Gift, CreditCard, Mail, Star, Check } from "lucide-react" const giftCardAmounts = [ { amount: 100, popular: false, description: "Perfect for small tattoos" }, { amount: 200, popular: true, description: "Great for medium pieces" }, { amount: 300, popular: false, description: "Ideal for larger tattoos" }, { amount: 500, popular: false, description: "Perfect for full sessions" }, ] const deliveryMethods = [ { method: "email", title: "Email Delivery", description: "Instant delivery to recipient's email", icon: Mail, time: "Instant", }, { method: "physical", title: "Physical Card", description: "Beautiful printed card mailed to address", icon: Gift, time: "3-5 business days", }, ] const giftCardFeatures = [ "No expiration date", "Transferable to others", "Can be used for any service", "Remaining balance carries over", "Lost card replacement available", "Online balance checking", ] export function GiftCardsPage() { const [selectedAmount, setSelectedAmount] = useState(200) const [customAmount, setCustomAmount] = useState("") const [deliveryMethod, setDeliveryMethod] = useState("email") const [formData, setFormData] = useState({ // Purchaser Info buyerName: "", buyerEmail: "", buyerPhone: "", // Recipient Info recipientName: "", recipientEmail: "", recipientPhone: "", recipientAddress: "", // Gift Card Details personalMessage: "", deliveryDate: "", isGift: true, }) const [isProcessing, setIsProcessing] = useState(false) const handleInputChange = (field: string, value: any) => { setFormData((prev) => ({ ...prev, [field]: value })) } const finalAmount = selectedAmount || Number.parseInt(customAmount) || 0 const handlePurchase = async () => { setIsProcessing(true) await new Promise((resolve) => setTimeout(resolve, 2000)) // Simulate successful purchase console.log("Simulated gift card purchase:", { amount: finalAmount, delivery: deliveryMethod, ...formData, }) setIsProcessing(false) alert( `Gift card purchase successful! A ${finalAmount >= 200 ? `$${finalAmount + 25}` : `$${finalAmount}`} gift card will be ${deliveryMethod === "email" ? "emailed" : "mailed"} ${formData.isGift ? `to ${formData.recipientName}` : "to you"}.`, ) } return (
{/* Header */}

Gift Cards

Give the gift of exceptional tattoo artistry. Perfect for birthdays, holidays, or any special occasion. Our gift cards never expire and can be used for any service.

{/* Special Offer Alert */} Holiday Special: Purchase a $200+ gift card and receive a $25 bonus card free! Limited time offer.
{/* Gift Card Selection */}
{/* Amount Selection */} Choose Amount

Select a preset amount or enter a custom value

{giftCardAmounts.map((option) => (
{ setSelectedAmount(option.amount) setCustomAmount("") }} > {option.popular && ( Popular )}
${option.amount}

{option.description}

{selectedAmount === option.amount && ( )}
))}
$ { setCustomAmount(e.target.value) setSelectedAmount(null) }} className="max-w-32" /> ($25 minimum)
{/* Delivery Method */} Delivery Method

How would you like to send the gift card?

{deliveryMethods.map((method) => { const Icon = method.icon return (
setDeliveryMethod(method.method)} >

{method.title}

{method.description}

{method.time}
{deliveryMethod === method.method && }
) })}
{/* Recipient Information */} Recipient Information

Who is this gift card for?

handleInputChange("isGift", e.target.checked)} className="rounded" />
{formData.isGift ? ( <>
handleInputChange("recipientName", e.target.value)} placeholder="Gift recipient's name" required />
handleInputChange("recipientEmail", e.target.value)} placeholder="recipient@email.com" required />
{deliveryMethod === "physical" && (