"use client"; import { useState } from "react"; import Link from "next/link"; import { MessageCircle, Mail, MapPin, ShieldCheck, CheckCircle2, Send, ArrowRight, HelpCircle, Handshake, } from "lucide-react"; import Breadcrumbs from "@/components/ui/breadcrumbs"; import { toast } from "sonner"; import { getWhatsAppUrl, DEFAULT_WHATSAPP_NUMBER } from "@/lib/whatsapp"; import { WhatsAppIcon } from "@/components/ui/whatsapp-icon"; import { CONTACT_INFO } from "@/lib/constants/site"; import PortableTextRenderer from "@/components/portable-text-renderer"; import type { SETTINGS_QUERY_RESULT, SERVICES_QUERY_RESULT } from "@/sanity.types"; import type { PortableTextProps } from "@portabletext/react"; export type ContactFaqItem = { _id?: string; title?: string | null; body?: PortableTextProps["value"] | string | null; }; export interface ContactViewProps { settings?: SETTINGS_QUERY_RESULT | null; faqs?: ContactFaqItem[] | null; services?: SERVICES_QUERY_RESULT | null; } export default function ContactView({ settings, faqs, services }: ContactViewProps = {}) { const [isSubmitting, setIsSubmitting] = useState(false); const [isSubmitted, setIsSubmitted] = useState(false); const [formData, setFormData] = useState({ coupleNames: "", email: "", whatsapp: "", weddingDate: "", destinationRegion: "Da Nang & Hoi An", guestCount: "50 - 100 Guests", budgetRange: "$50,000 - $100,000 USD", serviceTrack: "Private Couple Consultation", message: "", }); const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); setIsSubmitting(true); try { const res = await fetch("/api/contact", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(formData), }); const data = await res.json(); if (!res.ok) { throw new Error(data.error || "Failed to submit inquiry."); } setIsSubmitted(true); toast.success("Thank you. Your inquiry has been successfully received."); } catch (err: any) { console.error("Submission error:", err); // Graceful fallback so user is never blocked setIsSubmitted(true); toast.success("Inquiry received! Feel free to connect via WhatsApp for immediate support."); } finally { setIsSubmitting(false); } }; const breadcrumbLinks = [ { label: "Home", href: "/" }, { label: "Contact", href: "#" }, ]; const contactEmail = settings?.contactEmail || CONTACT_INFO.email; const whatsappNumber = settings?.whatsapp || DEFAULT_WHATSAPP_NUMBER; const contactFaqs = [ { question: "How quickly will I hear back after submitting an inquiry?", answer: "We review all direct inquiries personally. You will typically receive an initial response via WhatsApp or email within 4 to 12 hours, accommodating international timezones.", }, { question: "Are preliminary discovery calls complimentary?", answer: "Yes. Before booking any in-depth hourly session or vendor contract audit, we conduct an introductory 20-30 minute discovery call to ensure mutual fit and clarify your scope.", }, { question: "Can you communicate across different global timezones?", answer: "Absolutely. Our advisory sessions are regularly scheduled to accommodate couples living in North America (PST/EST), Europe (GMT/CET), Australia (AEST), and Singapore/Hong Kong (SGT).", }, ]; const displayFaqs = faqs && faqs.length > 0 ? faqs.map((f) => ({ id: f._id, question: f.title || "Frequently Asked Question", body: f.body, })) : contactFaqs.map((f, idx) => ({ id: `static-${idx}`, question: f.question, body: f.answer, })); return (
Whether you are an international couple planning from afar, or a luxury hospitality brand seeking to elevate wedding operations, our independent advisory brings peace of mind.
Direct connection with senior consultant Nhi Võ. Ideal for quick questions, quote gut-checks, or scheduling an intro call.
Typically replies within 4 hours
Thank you for sharing your wedding details. Our senior advisory lead Nhi Võ will review your request and get in touch promptly.
We are inviting media agencies and wedding consultancies to license and co-develop this platform as strategic partners.
{faq.body}
) : faq.body ? (