import React, { useState, useEffect } from "react"; import { Phone, MapPin, Clock, MessageSquare, Compass, ClipboardCheck, Send, Sparkles } from "lucide-react"; import { BUSINESS_INFO } from "../data"; interface LocationContactProps { darkMode: boolean; } export default function LocationContact({ darkMode }: LocationContactProps) { const [lahoreTime, setLahoreTime] = useState(""); const [inquiryText, setInquiryText] = useState(""); const [inquirySuccess, setInquirySuccess] = useState(false); useEffect(() => { const updateTime = () => { try { const timeString = new Date().toLocaleTimeString("en-US", { timeZone: "Asia/Karachi", hour: "2-digit", minute: "2-digit", second: "2-digit", hour12: true }); setLahoreTime(timeString); } catch (e) { // Fallback if platform has minor timezone translation block const now = new Date(); const localUTC = now.getTime() + now.getTimezoneOffset() * 60000; const pktTime = new Date(localUTC + 3600000 * 5); // GMT+5 setLahoreTime(pktTime.toLocaleTimeString()); } }; updateTime(); const timer = setInterval(updateTime, 1000); return () => clearInterval(timer); }, []); const handleInquirySubmit = (e: React.FormEvent) => { e.preventDefault(); if (!inquiryText.trim()) return; // Direct redirection to WhatsApp web chat prefilled with customer inquiry const encoded = encodeURIComponent(`Hi Haider Brothers Traders, I am interested in: ${inquiryText}`); window.open(`${BUSINESS_INFO.whatsappUrl}?text=${encoded}`, "_blank"); setInquirySuccess(true); setInquiryText(""); }; return (
{/* Visual lighting accents */}
Faisal Town Lahore Office

Stop By Or Get Instant Support

Located at the trade center of Faisal Town block C1, Lahore. Ready to assist you 24/7 with professional tyre fitting, alignment tuning, or roadside emergency fixes.

{/* Left Column: Coordinates & Real Contact bento Cards (lg:col-span-5) */}
{/* Live Indicator Card */}
Live Showroom Status
24/7 OPEN NOW
{lahoreTime || "Loading..."} Lahore PKT Time

Midnight puncture repair? Highway wheel balance issue? Our crews never sleep. Call first or drive in at any hour.

{/* Quick Connection Options Card */}
{/* Telephone */}
Direct Hotline Support {BUSINESS_INFO.phone}
{/* WhatsApp */}
WhatsApp Instant Quote Secure Live Text Chat
{/* Address */}
Postal Address

{BUSINESS_INFO.address}

{/* Live Message Form */}

Search Stock or Request Quote

setInquiryText(e.target.value)} className={`w-full p-3 rounded-xl text-xs border focus:ring-2 focus:ring-brand-orange focus:outline-none transition-all ${ darkMode ? "bg-black/40 border-white/10 text-white placeholder-slate-500" : "bg-white border-slate-200 text-slate-900 placeholder-slate-400" }`} id="contact-stock-search-input" />
{/* Right Column: Google Maps Location Interactive Container (lg:col-span-7) */}
{/* Maps Iframe */}