/* Galadari Advocates — interactive home prototype */ const { useState, useEffect, useMemo, useRef } = React; const LOCALES = window.LOCALES; const PRACTICES = window.PRACTICES; const INDUSTRIES = window.INDUSTRIES; const PEOPLE = window.PEOPLE; const OFFICES = window.OFFICES; const AWARDS = window.AWARDS; const INSIGHTS = window.INSIGHTS; // ---------- Topbar (lang switcher) ---------- function Topbar({ lang, setLang, t }) { return (
{lang === "ar" ? "خدمة العملاء العاجلة · +٩٧١ ٥٥ ٩٤٤ ٤٠٠٠ · clientservice@galadarilaw.com" : "Urgent client service · +971 55 944 4000 · clientservice@galadarilaw.com"}
{["en", "ar", "ru", "zh"].map((l) => ( ))}
); } // ---------- Nav ---------- function Nav({ t, lang, onConsult, activeSection }) { const [scrolled, setScrolled] = useState(false); useEffect(() => { const onScroll = () => setScrolled(window.scrollY > 12); window.addEventListener("scroll", onScroll, { passive: true }); return () => window.removeEventListener("scroll", onScroll); }, []); const sections = ["practice", "industries", "people", "insights", "about", "contact"]; return ( ); } // ---------- Hero ---------- function Hero({ t, lang, onConsult }) { const metaItems = lang === "ar" ? ["دبي", "مركز دبي المالي", "أبوظبي"] : ["Dubai", "DIFC", "Abu Dhabi"]; return (
{lang === "ar" ? "شركة محاماة إماراتية" : "An Emirati law firm"}
{lang === "ar" ? "تأسست عام ١٩٨٣" : "Est. 1983"}

{t.proposition.map((line, i) => ( {i === 1 ? {line} : line} ))}

{t.heroBody}

{ e.preventDefault(); document.getElementById("people").scrollIntoView({ behavior: "smooth" }); }} > {lang === "ar" ? "تصفح المحامين" : "Meet our lawyers"}
{metaItems.map((item, i) => ( {item} {i < metaItems.length - 1 && } ))}
); } // ---------- Trust strip ---------- function TrustStrip({ lang }) { const items = lang === "ar" ? [ { num: "١٩٨٣", em: false, lbl: "تأسست منذ" }, { num: "٤٠+", em: true, lbl: "أربعة عقود" }, { num: "٥٠+", em: false, lbl: "محامون" }, { num: "١٨", em: false, lbl: "لغة" }, { num: "٣", em: false, lbl: "مكاتب في الإمارات" }, { num: "٢", em: true, lbl: "تصنيفات تشامبرز ٢٠٢٦" }, ] : [ { num: "1983", em: false, lbl: "Established" }, { num: "40+", em: true, lbl: "Years of practice" }, { num: "50+", em: false, lbl: "Lawyers" }, { num: "18", em: false, lbl: "Languages" }, { num: "3", em: false, lbl: "UAE offices" }, { num: "11", em: true, lbl: "Legal 500 EMEA 2026 ranked areas" }, ]; return (
{items.map((it, i) => (
{it.em ? {it.num} : it.num}
{it.lbl}
))}
); } // ---------- Practice grid ---------- function PracticeSection({ t, lang, activePractice, setActivePractice }) { const rows = []; for (let i = 0; i < PRACTICES.length; i += 3) rows.push(PRACTICES.slice(i, i + 3)); return (
{lang === "ar" ? "خمسة عشر مجالاً" : "Fifteen practices · 01–15"}

{t.sectionPractice}

{lang === "ar" ? "ممارسة قائمة على التقاضي مع عمق إقليمي عبر النزاعات، الشركات، الخدمات المصرفية، العقارات، والامتثال." : "A litigation-led full-service practice. Anchored by Dispute Resolution — supported by deep regional bench strength across corporate, finance, real estate, and regulatory."}

{rows.map((row, ri) => { const rowHasActive = row.some(p => p.slug === activePractice); return (
{row.map((p) => { const isActive = p.slug === activePractice; return ( ); })}
{rowHasActive && ( p.slug === activePractice)} lang={lang} onClose={() => setActivePractice(null)} onEnquiry={() => { window.dispatchEvent(new CustomEvent("open-consult", { detail: { practice: activePractice } })); }} /> )}
); })}
); } function PracticeDrill({ practice, lang, onClose, onEnquiry }) { const relatedPeople = PEOPLE.filter(p => p.practices.includes(practice.slug)).slice(0, 4); return (
{practice.n} · {lang === "ar" ? "النطاق" : "Scope"}

{lang === "ar" ? practice.titleAr : practice.title}

{practice.scope}

{practice.ranking && (
{practice.ranking}
)}
{lang === "ar" ? "أمثلة على القضايا" : "Typical matters"}
    {practice.matters.map((m, i) => (
  • {String(i + 1).padStart(2, "0")} {m}
  • ))}
{relatedPeople.length > 0 && (
{lang === "ar" ? "محامو هذا المجال" : "Lawyers in this practice"}
{relatedPeople.map(person => (
{person.name}
{lang === "ar" && person.nameAr ? person.nameAr : person.name}
))}
)}
); } // ---------- Industries ---------- function IndustriesSection({ t, lang }) { const sectorsAr = { "Consumer & Retail": "التجزئة والمستهلك", "Education": "التعليم", "Energy": "الطاقة", "Healthcare": "الرعاية الصحية", "Insurance": "التأمين", "Leisure & Hospitality": "الترفيه والضيافة", "Manufacturing & Industrial": "التصنيع والصناعة", "Maritime & Transport": "البحرية والنقل", "Public Sector": "القطاع العام", "Technology, Media & Telecommunications": "التكنولوجيا والإعلام والاتصالات", }; return (
{lang === "ar" ? "أحد عشر قطاعاً" : "Eleven sectors · 01–11"}

{lang === "ar" ? "القطاعات" : "Industries"}

{lang === "ar" ? "قطاعات الاقتصاد الإماراتي التي نخدمها — البحرية والتأمين تقدمان كقدرات داخل ممارسة حل النزاعات." : "The UAE economy we serve. Maritime/Shipping and Insurance live here as sector capabilities (delivered through Dispute Resolution and related practices) — not separate practice pages."}

{INDUSTRIES.map((ind, i) => (
{String(i + 1).padStart(2, "0")} {lang === "ar" ? sectorsAr[ind] : ind}
))}
); } // ---------- People ---------- function PeopleSection({ t, lang, setPersonModal }) { const [officeFilter, setOfficeFilter] = useState("all"); const [practiceFilter, setPracticeFilter] = useState("all"); const filtered = useMemo(() => { return PEOPLE.filter(p => (officeFilter === "all" || p.office === officeFilter) && (practiceFilter === "all" || p.practices.includes(practiceFilter)) ); }, [officeFilter, practiceFilter]); const offices = ["all", ...new Set(PEOPLE.map(p => p.office))]; const topPractices = ["all", "dispute-resolution", "corporate", "banking-and-finance", "employment", "family-divorce"]; return (
{lang === "ar" ? "المحامون" : "Verified portraits · 15 / 50+"}

{t.sectionPeople}

{lang === "ar" ? "محامون إماراتيون ودوليون. الأسماء والصور موثقة فقط — الباقي بانتظار تأكيد العميل." : "Emirati and international lawyers. Names and photographs shown are verified from research; titles and credentials remain marked \"to confirm\" until the client signs off."}

{lang === "ar" ? "المكتب" : "Office"} {offices.map(o => ( ))}
{lang === "ar" ? "المجال" : "Practice"} {topPractices.map(slug => { const label = slug === "all" ? (lang === "ar" ? "الكل" : "All") : (PRACTICES.find(p => p.slug === slug) || {}).title; return ( ); })}
{filtered.length === 0 ? (
{lang === "ar" ? "لا يوجد محامون يطابقون هذه الفلاتر." : "No lawyers match these filters."}
) : ( filtered.map(person => ( )) )}
); } // ---------- Awards ---------- function AwardsSection({ t, lang }) { return (
{lang === "ar" ? "تصنيفات مستقلة" : "Independent rankings · attributed"}

{t.sectionAwards}

{lang === "ar" ? "كل تصنيف موثق بالجهة والإصدار والسنة والفئة. لا توجد تقييمات نجوم ذاتية الإسناد." : "Every recognition cites body, edition, year and tier. No self-asserted star ratings."}

{AWARDS.map((a, i) => (
{a.body}
{a.edition}
{a.note}
))}
{lang === "ar" ? "ملاحظة: الموقع الحالي يعرض تقييماً ذاتي الإسناد ٤٫٢ / ٣ في بيانات منظمة — هذا الإصدار يُحذف بالكامل وفقاً للمعايير القانونية." : "Note: The live site self-asserts an AggregateRating of 4.2/3 with anonymous testimonials in its JSON-LD. This redesign removes both — no star rating until a real, attributable one exists."}
); } // ---------- Insights ---------- function InsightsSection({ t, lang }) { return (
{lang === "ar" ? "المنشورات والأخبار والفعاليات" : "Publications · News · Events · Podcasts"}

{t.sectionInsights}

{lang === "ar" ? "محتوى يصدر بانتظام من محامي الشركة — يعكس الممارسة الفعلية، لا التسويق." : "Regular thought leadership from our lawyers — practice-rooted, attribution-clean, no marketing fluff."}

{INSIGHTS.map((it, i) => (
{it.kind}
{it.date}
{it.title}
{(PRACTICES.find(p => p.slug === it.practice) || {}).title}
))}
); } // ---------- Offices ---------- function OfficesSection({ t, lang, onConsult }) { return (
{lang === "ar" ? "ثلاثة مكاتب" : "Three offices · never merged"}

{t.sectionOffices}

{lang === "ar" ? "المقر الرئيسي في بر دبي، ومكاتب في مركز دبي المالي العالمي وأبوظبي. عناوين الشوارع الكاملة لمكتبي DIFC وأبوظبي قيد التأكيد." : "Headquartered in Bur Dubai, with practice offices in DIFC and Abu Dhabi. Full street addresses for DIFC and Abu Dhabi are pending client sign-off — flagged inline rather than guessed."}

{OFFICES.map(o => (
{o.primary && {lang === "ar" ? "المقر" : "HQ"}}

{lang === "ar" ? o.labelAr : o.label}

{o.area}

{o.address}

{lang === "ar" ? "هاتف" : "Phone"} {o.phone}
{lang === "ar" ? "بريد إلكتروني" : "Email"} {o.email}
{lang === "ar" ? "صندوق بريد" : "PO Box"} {o.poBox}
{o.addressNote}
))}
{lang === "ar" ? "ساعات العمل: الإثنين – الجمعة، ٠٩:٠٠ – ١٨:٠٠ (بتوقيت الخليج). نؤكد الجمعة مع العميل." : "Hours: Mon–Fri 09:00–18:00 (GST). UAE working-week confirmation pending."}
); } // ---------- Consultation modal ---------- function ConsultModal({ open, onClose, t, lang, presetPractice }) { const [form, setForm] = useState({ name: "", email: "", phone: "", practice: "", office: "Dubai HQ", message: "", }); const [errs, setErrs] = useState({}); const [sent, setSent] = useState(false); useEffect(() => { if (presetPractice) { setForm(f => ({ ...f, practice: presetPractice })); } }, [presetPractice]); useEffect(() => { if (open) { setSent(false); setErrs({}); } }, [open]); if (!open) return null; const submit = (e) => { e.preventDefault(); const next = {}; if (!form.name.trim()) next.name = lang === "ar" ? "الاسم مطلوب" : "Name is required"; if (!form.email.trim()) next.email = lang === "ar" ? "البريد الإلكتروني مطلوب" : "Email is required"; else if (!/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(form.email)) next.email = lang === "ar" ? "صيغة البريد الإلكتروني غير صحيحة" : "Enter a valid email"; if (!form.practice) next.practice = lang === "ar" ? "اختر مجال الممارسة" : "Choose a practice area"; if (!form.message.trim()) next.message = lang === "ar" ? "وصف الاستفسار مطلوب" : "Please describe your matter"; setErrs(next); if (Object.keys(next).length === 0) { setSent(true); } }; const labels = lang === "ar" ? { name: "الاسم", email: "البريد", phone: "الهاتف", practice: "مجال الممارسة", office: "المكتب المفضل", message: "نبذة عن القضية", submit: "إرسال الاستفسار", choose: "اختر…", note: "هذا الاستفسار سري. لا توجد علاقة محامٍ/موكل حتى التحقق من تضارب المصالح." } : { name: "Full name", email: "Email", phone: "Phone (optional)", practice: "Practice area", office: "Preferred office", message: "Brief description of your matter", submit: "Send enquiry", choose: "Choose…", note: "This enquiry is confidential. No attorney–client relationship is created until our conflict-check is cleared and you receive a written engagement." }; return (
e.stopPropagation()}>
{lang === "ar" ? "خطوة واحدة" : "One step · low pressure"}

{t.sectionConsult}

{sent ? (

{lang === "ar" ? "تم استلام طلبك" : "Enquiry received"}

{lang === "ar" ? "سيتواصل معك أحد محامينا خلال يوم عمل واحد. للحالات العاجلة: ‎+٩٧١ ٥٥ ٩٤٤ ٤٠٠٠" : "A lawyer in the relevant practice will reply within one UAE business day. For urgent matters call +971 55 944 4000."}

) : (
setForm({ ...form, name: e.target.value })} /> {errs.name &&
{errs.name}
}
setForm({ ...form, email: e.target.value })} /> {errs.email &&
{errs.email}
}
setForm({ ...form, phone: e.target.value })} />
{errs.practice &&
{errs.practice}
}