import classNames from 'classnames'; import { NavLink, Link } from 'react-router-dom'; import { NetworkSwitcher, useEnvironment } from '@vegaprotocol/environment'; import { t } from '@vegaprotocol/react-helpers'; import { useGlobalStore } from '../../stores/global'; import { VegaWalletConnectButton } from '../vega-wallet-connect-button'; import { ThemeSwitcher } from '@vegaprotocol/ui-toolkit'; import { Vega } from '../icons/vega'; import type { HTMLAttributeAnchorTarget } from 'react'; import testnetBg from '../../assets/green-cloud.png'; import { Routes } from '../../pages/client-router'; type NavbarTheme = 'inherit' | 'dark' | 'yellow'; interface NavbarProps { theme: 'light' | 'dark'; toggleTheme: () => void; navbarTheme?: NavbarTheme; } export const Navbar = ({ theme, toggleTheme, navbarTheme = 'inherit', }: NavbarProps) => { const { VEGA_TOKEN_URL } = useEnvironment(); const { marketId } = useGlobalStore((store) => ({ marketId: store.marketId, })); const tradingPath = marketId ? `/markets/${marketId}` : '/markets'; const themeWrapperClasses = classNames({ dark: navbarTheme === 'dark', }); const isYellow = navbarTheme === 'yellow'; const navbarClasses = classNames( 'flex items-stretch border-b px-4 border-default', { 'dark:bg-black dark:text-white': !isYellow, 'bg-vega-yellow text-black bg-right-top bg-no-repeat bg-contain': isYellow, } ); return (