/* Alchemy — shared site chrome: announcement bar + Locations menu.
Multi-location model: each location is its own landing page; the Locations
menu is the single hub that lists them all and flags what's open vs. coming soon.
Add a new location by adding one entry here + its page. */
window.ALCHEMY_LOCATIONS = [
{ id: 'gastonia', name: 'Downtown Gastonia', addr: '121 W. Main Ave', status: 'open', go: { route: 'dtg' } },
{ id: 'charlotte', name: 'Charlotte', addr: '2459 Wilkinson Blvd', status: 'open', go: { route: 'clt' } },
{ id: 'loray', name: 'Loray Gastonia', addr: '300 S Firestone St, Suite 200 H', status: 'open', go: { route: 'lry' } },
];
function AnnouncementBar() {
return (
Our newest location is now open at Loray Mill, Gastonia
);
}
/* Locations dropdown — used by both the main nav and the CLT header. */
function LocationsMenu({ light = false, onNavigate }) {
const [open, setOpen] = React.useState(false);
const ref = React.useRef(null);
React.useEffect(() => {
function outside(e) { if (ref.current && !ref.current.contains(e.target)) setOpen(false); }
document.addEventListener('mousedown', outside);
return () => document.removeEventListener('mousedown', outside);
}, []);
const pick = (loc) => {
setOpen(false);
if (loc.status === 'soon' && !loc.go) return;
/* Location pages are their own URLs; anything else routes in-app. */
if (loc.go && loc.go.route && window.alcUrl) window.location.href = window.alcUrl(loc.go.route);
else if (loc.go && loc.go.href) window.location.href = loc.go.href;
else if (loc.go && loc.go.route && onNavigate) onNavigate(loc.go.route);
};
const trigger = {
all: 'unset', cursor: 'pointer', display: 'inline-flex', alignItems: 'center', gap: 6,
fontFamily: 'var(--font-label)', fontWeight: 600, fontSize: '0.84rem',
letterSpacing: '0.04em', textTransform: 'uppercase', padding: '0.5rem 0.85rem',
color: light ? (open ? '#fff' : 'rgba(255,255,255,0.85)') : (open ? 'var(--navy-700)' : 'var(--stone-600)'),
};
return (