"use client" import type React from "react" 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 { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select" import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog" import { User, MessageSquare, CheckCircle, Phone, Mail, Clock } from "lucide-react" const inquiryTypes = [ "General Question", "Booking Consultation", "Pricing Information", "Aftercare Support", "Portfolio Inquiry", "Custom Design", "Touch-up Request", "Other", ] const urgencyLevels = [ { value: "low", label: "Low - General inquiry", description: "Response within 24-48 hours" }, { value: "medium", label: "Medium - Need info soon", description: "Response within 12-24 hours" }, { value: "high", label: "High - Time sensitive", description: "Response within 2-6 hours" }, ] interface ContactModalProps { children: React.ReactNode } export function ContactModal({ children }: ContactModalProps) { const [open, setOpen] = useState(false) const [step, setStep] = useState(1) const [isSubmitting, setIsSubmitting] = useState(false) const [isSubmitted, setIsSubmitted] = useState(false) const [formData, setFormData] = useState({ // Step 1: Contact Info name: "", email: "", phone: "", preferredContact: "email", // Step 2: Inquiry Details inquiryType: "", urgency: "medium", subject: "", message: "", hasDeadline: false, deadline: "", // Step 3: Additional Info isExistingClient: false, referralSource: "", specialRequests: "", }) const handleInputChange = (field: string, value: any) => { setFormData((prev) => ({ ...prev, [field]: value })) } const handleSubmit = async (e: React.FormEvent) => { e.preventDefault() setIsSubmitting(true) // Simulate form submission await new Promise((resolve) => setTimeout(resolve, 2000)) setIsSubmitted(true) setIsSubmitting(false) // Reset form after 3 seconds and close modal setTimeout(() => { setIsSubmitted(false) setStep(1) setFormData({ name: "", email: "", phone: "", preferredContact: "email", inquiryType: "", urgency: "medium", subject: "", message: "", hasDeadline: false, deadline: "", isExistingClient: false, referralSource: "", specialRequests: "", }) setOpen(false) }, 3000) } const nextStep = () => setStep((prev) => Math.min(prev + 1, 3)) const prevStep = () => setStep((prev) => Math.max(prev - 1, 1)) const selectedUrgency = urgencyLevels.find((level) => level.value === formData.urgency) return ( {children} {/* Solid background overlay to block any background images */}
Get In Touch {/* Progress Indicator */}
{[1, 2, 3].map((stepNumber) => (
= stepNumber ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground" }`} > {stepNumber}
{stepNumber < 3 && (
stepNumber ? "bg-primary" : "bg-muted"}`} /> )}
))}
{isSubmitted ? (

Message Sent!

Thank you for contacting us. We'll get back to you within {selectedUrgency?.description.toLowerCase()}.

Reference ID: #{Math.random().toString(36).substr(2, 9).toUpperCase()}

) : (
{/* Step 1: Contact Information */} {step === 1 && ( Contact Information
handleInputChange("name", e.target.value)} placeholder="Your full name" required />
handleInputChange("email", e.target.value)} placeholder="your@email.com" required />
handleInputChange("phone", e.target.value)} placeholder="(555) 123-4567" />
{[ { value: "email", label: "Email", icon: Mail }, { value: "phone", label: "Phone", icon: Phone }, { value: "text", label: "Text", icon: MessageSquare }, ].map((method) => { const Icon = method.icon return ( ) })}
)} {/* Step 2: Inquiry Details */} {step === 2 && ( Inquiry Details
{selectedUrgency && (
Expected Response Time: {selectedUrgency.description}
)}
handleInputChange("subject", e.target.value)} placeholder="Brief description of your inquiry" />