/* Nav, Footer, FAB, Tweaks panel composition */
const { useState, useEffect } = React;
function EmpireMark({ color = "var(--gold)", textColor = "currentColor", height = 28 }) {
return (
);
}
function EmpireMarkSmall({ color = "var(--gold)" }) {
return (
);
}
function Navbar({ onCharterClick, locale, setLocale, isLight }) {
const [scrolled, setScrolled] = useState(false);
useEffect(() => {
const onScroll = () => setScrolled(window.scrollY > 60);
window.addEventListener("scroll", onScroll, { passive: true });
onScroll();
return () => window.removeEventListener("scroll", onScroll);
}, []);
const navClasses = ["nav"];
if (scrolled) navClasses.push("is-scrolled");
if (isLight && !scrolled) navClasses.push("is-light");
const textColor = (isLight && !scrolled) ? "var(--ink)" : "var(--paper)";
return (