"use client"; import React, { useState } from "react"; import Link from "next/link"; import { X, Mail, MessageCircleQuestion } from "lucide-react"; import type { HelpContent } from "@/content/help/types"; export default function HelpGuideModal({ content, onClose }: { content: HelpContent; onClose: () => void }) { const [tab, setTab] = useState(content.tabs[0]?.key); const activeTab = content.tabs.find(t => t.key === tab) || content.tabs[0]; return ( // Above the site header (Navbar is `sticky top-0 z-50`) and above any // page-level popup (e.g. the report viewer at z-[60]), since the guide // can be opened from the FAB while another overlay is showing.
e.stopPropagation()} >

{content.title}

{content.subtitle}

{content.quickLinks && content.quickLinks.length > 0 && (
{content.quickLinks.map(link => ( {link.icon && } {link.label} ))}
)}
{content.tabs.length > 1 && ( )}
{activeTab?.content}
{content.supportContact && (
{content.supportContact.label}:{" "} {content.supportContact.email}
)}
); }