import React, {useContext} from "react";
import {NavLink} from "react-router-dom";
import {Dropdown, Menu} from "semantic-ui-react";
import {Media, StatusContext, ThemeContext} from "../contexts/contexts";
import Icon from "semantic-ui-react/dist/commonjs/elements/Icon";
import {DarkModeToggle, HotspotStatusIcon, NAME} from "./Common";
const links = [
{text: 'Videos', to: '/videos', key: 'videos'},
{text: 'Archive', to: '/archive', key: 'archive'},
{text: 'Map', to: '/map', key: 'map'},
{text: 'Files', to: '/files', key: 'files'},
{text: 'Inventory', to: '/inventory', key: 'inventory'},
{text: 'More', key: 'more',
links: [
{to: '/more/otp', text: 'One Time Pad', end: true},
{to: '/more/statistics', text: 'Statistics', end: true},
]
},
];
const admin = {to: '/admin', text: 'Admin', key: 'admin'};
const rightLinks = [admin,];
const collapsedLinks = links.concat([admin,]);
function DropdownLinks({link}) {
return
{link.links.map(l => )}
}
function MenuLink({link}) {
// Wrapper around NavLink to handle Navlink/Dropdown change.
if (link.links) {
return
} else {
const end = link.end ? {end: true} : {end: undefined};
return
{link.text}
}
}
function NavIcon(props) {
return {props.children}
}
export function NavBar() {
const {status} = useContext(StatusContext);
const wrol_mode = status ? status['wrol_mode'] : null;
const wrolpiIcon =
;
const name = NAME || wrolpiIcon;
const topNavText = wrol_mode ? <>{name} > : name;
const {i} = useContext(ThemeContext);
const homeLink =
{topNavText}
;
const icons =
;
return <>
>
}