// Top nav — minimal, sticky, blurred — mobile-responsive + PWA Install & Client Gateway const NAV_LINKS = [ { id: "services", label: "Services", labelBn: "সার্ভিস", url: "#/services" }, { id: "case-studies", label: "Case Studies", labelBn: "কেস স্টাডি", url: "#/case-studies" }, { id: "pricing", label: "Pricing", labelBn: "মূল্য", url: "#/pricing" }, { id: "blog", label: "Blog", labelBn: "ব্লগ", url: "#/blog" }, { id: "contact", label: "Contact", labelBn: "যোগাযোগ", url: "#/contact" }, ]; const NAV_TXT = { en: { search: "Search", getQuote: "Get a Quote", clientLogin: "Client Login", getStarted: "Get Started", installApp: "Install App", appInstalled: "App Installed", }, bn: { search: "খুঁজুন", getQuote: "কোট নিন", clientLogin: "ক্লায়েন্ট লগইন", getStarted: "শুরু করুন", installApp: "অ্যাপ ইনস্টল", appInstalled: "অ্যাপ ইনস্টলড", }, }; // Next redirects ensure clients land seamlessly in the right SaaS portal const REGISTER_URL = "https://auth.auraajenticai.cloud/register?next=" + encodeURIComponent("https://client.auraajenticai.cloud/services"); const CLIENT_LOGIN_URL = "https://auth.auraajenticai.cloud/login?next=" + encodeURIComponent("https://client.auraajenticai.cloud"); const Nav = ({ onCmdK, theme, onToggleTheme, accent, lang, onToggleLang, route }) => { const [scrolled, setScrolled] = React.useState(false); const [menuOpen, setMenuOpen] = React.useState(false); const [clientModalOpen, setClientModalOpen] = React.useState(false); const [installModalOpen, setInstallModalOpen] = React.useState(false); const [deferredPrompt, setDeferredPrompt] = React.useState(null); const [isInstalled, setIsInstalled] = React.useState(false); const links = NAV_LINKS; const t = NAV_TXT[lang] || NAV_TXT.en; const bn = lang === "bn"; React.useEffect(() => { const onScroll = () => setScrolled(window.scrollY > 12); window.addEventListener("scroll", onScroll, { passive: true }); return () => window.removeEventListener("scroll", onScroll); }, []); // PWA standalone detection & prompt listener React.useEffect(() => { const isStandalone = window.matchMedia("(display-mode: standalone)").matches || window.navigator.standalone === true; if (isStandalone) { setIsInstalled(true); } const handleBeforeInstall = (e) => { e.preventDefault(); setDeferredPrompt(e); }; const handleAppInstalled = () => { setIsInstalled(true); setDeferredPrompt(null); }; window.addEventListener("beforeinstallprompt", handleBeforeInstall); window.addEventListener("appinstalled", handleAppInstalled); return () => { window.removeEventListener("beforeinstallprompt", handleBeforeInstall); window.removeEventListener("appinstalled", handleAppInstalled); }; }, []); const handleInstallClick = async () => { if (deferredPrompt) { try { deferredPrompt.prompt(); const choice = await deferredPrompt.userChoice; if (choice && choice.outcome === "accepted") { setIsInstalled(true); setDeferredPrompt(null); } } catch (err) { console.warn("PWA install prompt error:", err); } } else { setInstallModalOpen(true); } }; return ( <> {/* Mobile drawer */} {menuOpen && (
{/* Mobile PWA Install Banner */} {!isInstalled && (
{bn ? "📲 Aura Cloud অ্যাপ" : "📲 Aura Cloud App"}
{bn ? "হোমস্ক্রিনে ১-ট্যাপে ইনস্টল করুন" : "Install to home screen for 1-tap launch"}
)} {links.map(l => ( setMenuOpen(false)} style={{ fontSize: 15, color: "var(--text-dim)", padding: "12px 4px", textDecoration: "none", display: "block", borderBottom: "1px solid var(--line)", }} >{bn && l.labelBn ? l.labelBn : l.label} ))}
setMenuOpen(false)} style={{ padding: "8px 14px", background: "transparent", border: "1px solid var(--line)", borderRadius: 8, color: "var(--text-dim)", fontSize: 13, textDecoration: "none", }} >{t.getQuote} setMenuOpen(false)} style={{ padding: "8px 14px", background: "var(--text)", color: "var(--bg)", fontSize: 13, fontWeight: 500, borderRadius: 8, textDecoration: "none", }} >{t.getStarted}
)} {/* Client Portal Gateway Modal */} {clientModalOpen && (
setClientModalOpen(false)} style={{ position: "fixed", inset: 0, zIndex: 100, background: "rgba(0, 0, 0, 0.72)", backdropFilter: "blur(10px)", WebkitBackdropFilter: "blur(10px)", display: "grid", placeItems: "center", padding: 16, }} >
e.stopPropagation()} style={{ position: "relative", width: "100%", maxWidth: 460, background: "var(--bg-card, #0c1222)", border: "1px solid rgba(124, 92, 255, 0.35)", borderRadius: 16, padding: "26px 24px", boxShadow: "0 24px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(124, 92, 255, 0.15)", animation: "float-up 0.25s ease-out", }} > {/* Modal Header */}

{bn ? "অরা ক্লায়েন্ট ড্যাশবোর্ড" : "Aura Client Portal"}

client.auraajenticai.cloud

{bn ? "আপনার মার্চেন্ট একাউন্টে প্রবেশ করে AI সেলস বট, Steadfast/Pathao কুরিয়ার ট্র্যাকিং এবং ক্যাশ-অন-ডেলিভারি ফ্রড ডিফেন্স পরিচালনা করুন।" : "Sign in to your merchant workspace to manage AI conversational agents, track live Steadfast & Pathao shipments, and prevent COD fraud."}

{/* Quick Workspace Info */}
{bn ? "সক্রিয় মার্চেন্ট ওয়ার্কস্পেসসমূহ:" : "Active Enterprise Workspaces:"}
✨ Glamour's Touch 🔧 Applix BD 🛡️ All Enterprise
{/* Direct Login CTA */} {bn ? "ড্যাশবোর্ডে লগইন করুন" : "Sign In to Client Dashboard"} {/* Deep Links / Shortcuts */}
{bn ? "নতুন একাউন্ট তৈরি করুন" : "Create merchant account"} {bn ? "কুরিয়ার হাব ↗" : "Courier Hub ↗"}
)} {/* PWA Install Help Modal (iOS & Fallback) */} {installModalOpen && (
setInstallModalOpen(false)} style={{ position: "fixed", inset: 0, zIndex: 100, background: "rgba(0, 0, 0, 0.72)", backdropFilter: "blur(10px)", WebkitBackdropFilter: "blur(10px)", display: "grid", placeItems: "center", padding: 16, }} >
e.stopPropagation()} style={{ position: "relative", width: "100%", maxWidth: 440, background: "var(--bg-card, #0c1222)", border: "1px solid rgba(0, 212, 255, 0.35)", borderRadius: 16, padding: "24px 22px", boxShadow: "0 24px 60px rgba(0, 0, 0, 0.6)", }} >
📲

{bn ? "Aura Cloud অ্যাপ ইনস্টল গাইড" : "Install Aura Cloud App"}

{bn ? "Aura Cloud অ্যাপ আপনার মোবাইল বা কম্পিউটারে ইনস্টল করে সরাসরি ১-ট্যাপে ওপেন করুন:" : "Install the Aura Cloud App directly to your device for 1-tap instant launch and offline access:"}

🍏 iOS / iPhone (Safari):
{bn ? "সাফারি ব্রাউজারের নিচে শেয়ার বাটনে (Share ⎋) ট্যাপ করুন, এরপর নিচে স্ক্রল করে 'Add to Home Screen ⊞' সিলেক্ট করুন।" : "Tap the Share icon (⎋) at bottom of Safari, scroll down and tap 'Add to Home Screen ⊞'."}
🤖 Android (Chrome):
{bn ? "ব্রাউজারের উপরের ডান কোণায় ৩-ডট মেনুতে (⋮) ট্যাপ করে 'Install app' বা 'Add to Home screen' নির্বাচন করুন।" : "Tap the 3 dots menu (⋮) in Chrome and select 'Install app' or 'Add to Home screen'."}
💻 Windows / Mac (Chrome & Edge):
{bn ? "ব্রাউজারের অ্যাড্রেস বারের ডানপাশে ইনস্টল আইকন (⊕) ক্লিক করে ইনস্টল করুন।" : "Click the Install icon (⊕) in the browser address bar to install to desktop."}
)} ); }; window.Nav = Nav;