"use client"; import Image from "next/image"; import { Button } from "@/components/ui/button"; import { useState } from "react"; import { X } from "lucide-react"; import LandingSiteNav from "@/components/landing-page/landing-site-nav"; import { Input } from "../ui/input"; import { Label } from "../ui/label"; import { Textarea } from "../ui/textarea"; import { RadioGroup, RadioGroupItem } from "../ui/radio-group"; import type { CmsHeroContent } from "@/types/cms-landing"; function isExternalUrl(url: string) { return /^https?:\/\//i.test(url); } export default function Header({ hero }: { hero?: CmsHeroContent | null }) { const [contactOpen, setContactOpen] = useState(false); // Only main title is required in CMS; optional fields stay empty (no placeholder dashes or fake CTAs). const fallbackHeadline = "Beyond Expectations to Build Reputation."; const title = hero?.primary_title?.trim() ? hero.primary_title.trim() : !hero ? fallbackHeadline : ""; const subtitle = hero?.secondary_title?.trim(); const lead = hero?.description?.trim(); const primaryCta = hero?.primary_cta?.trim(); const secondaryCta = hero?.secondary_cta_text?.trim(); const heroImg = hero?.images?.[0]?.image_url?.trim(); return ( <>
{/* HERO */}

{title}

{subtitle ? (

{subtitle}

) : null} {lead ? (

{lead}

) : null} {(primaryCta || secondaryCta) ? (
{primaryCta ? ( ) : null} {secondaryCta ? ( ) : null}
) : null}
{heroImg && isExternalUrl(heroImg) ? ( // eslint-disable-next-line @next/next/no-img-element ) : ( Illustration )}
{/* CONTACT MODAL */} {contactOpen && setContactOpen(false)} />} ); } function ContactDialog({ onClose }: { onClose: () => void }) { const [contactMethod, setContactMethod] = useState("office"); return (
{/* CONTAINER */}
{/* Close Button */} {/* Header */}

Contact Us

Select a contact method and fill in your personal information. We will get back to you shortly.

{/* Contact Method */}
{/* Option 1 */}

Our team will come to your office for a presentation.

{/* Option 2 */}

Online consultation through HAIs platform.

{/* Form */}