"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 (
{/* 1. HERO SECTION */}
Bespoke Advisory & Private Inquiries

Connect with{" "} Our Advisory Lead

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.

{/* 2. MAIN TWO-COLUMN SECTION */}
{/* LEFT COLUMN: DIRECT CHANNELS & CREDIBILITY (5 cols) */}
{/* WhatsApp Priority Card */}
● Fastest Response (Within 4 Hours)

WhatsApp Concierge

Direct connection with senior consultant Nhi Võ. Ideal for quick questions, quote gut-checks, or scheduling an intro call.

Chat on WhatsApp

Typically replies within 4 hours

{/* Direct Info Card */}

Advisory Details

Email Inquiry {contactEmail}
On-Site Presence {CONTACT_INFO.regions}
{/* Three Trust Pillars */}
100% Impartial Fiduciary • Zero Vendor Kickbacks
Strict Confidentiality for High-Profile Couples
{/* RIGHT COLUMN: LUXURY INQUIRY FORM (7 cols) */}
{isSubmitted ? (

Inquiry Received

Thank you for sharing your wedding details. Our senior advisory lead Nhi Võ will review your request and get in touch promptly.

Chat on WhatsApp Directly
) : (

Detailed Consultation Inquiry

Tell us about your celebration to help us prepare meaningful strategic advice.

{/* Couple Names */}
setFormData({ ...formData, coupleNames: e.target.value }) } placeholder="e.g. Jessica Nguyen & Alexander Wright" className="w-full bg-brand-sand/30 border border-brand-border focus:border-brand-gold rounded-xl px-4 py-3 text-sm text-brand-dark placeholder:text-brand-muted/60 focus:outline-hidden transition-colors" />
{/* Email & WhatsApp Grid */}
setFormData({ ...formData, email: e.target.value }) } placeholder="jessica@example.com" className="w-full bg-brand-sand/30 border border-brand-border focus:border-brand-gold rounded-xl px-4 py-3 text-sm text-brand-dark placeholder:text-brand-muted/60 focus:outline-hidden transition-colors" />
setFormData({ ...formData, whatsapp: e.target.value }) } placeholder="+1 (555) 000-0000" className="w-full bg-brand-sand/30 border border-brand-border focus:border-brand-gold rounded-xl px-4 py-3 text-sm text-brand-dark placeholder:text-brand-muted/60 focus:outline-hidden transition-colors" />
{/* Wedding Date & Region */}
setFormData({ ...formData, weddingDate: e.target.value }) } placeholder="e.g. November 2026 or Spring 2027" className="w-full bg-brand-sand/30 border border-brand-border focus:border-brand-gold rounded-xl px-4 py-3 text-sm text-brand-dark placeholder:text-brand-muted/60 focus:outline-hidden transition-colors" />
{/* Guests & Budget Range */}
{/* Service Track */}
{/* Specific Challenges or Questions */}