import classNames from 'classnames'; import React, { useState } from 'react'; import Collapsible from 'react-collapsible'; import { FaBars, FaTimes } from 'react-icons/fa'; import { isUrl } from '../../../utils/navigation'; import { Link } from '../Link'; import { NavbarDropdown } from '../NavbarDropdown'; import './Navbar.css'; export interface NavbarItem { className?: string; label?: string; href?: string; target?: string; icon?: string; image?: string; isDivider?: boolean; isMenuLabel?: boolean; items?: NavbarItem[]; isArrowless?: boolean; isRight?: boolean; } export interface NavbarProps { id?: string; setProps?: (value: any) => any; className?: string; items: NavbarItem[]; brandItem: NavbarItem; } export const Navbar: React.FC = ({ items = [], ...otherProps }) => { const props = { items, ...otherProps }; const [activeMobile, setActiveMobile] = useState(false); const Icon = ({ icon }) => ( ); const InternalOrExternalLink = ({ item }: { item: NavbarItem }) => { if (item.href && isUrl(item.href)) { return ( {item.icon && } {item.label} ); } else { return ( setActiveMobile(false)} > {item.icon && } {item.label} ); } }; return ( ); };