'use client' import { PropsWithChildren, FC } from 'react' import { strings } from '@app-strings' import { Logo, NavBarTitle } from '.' import { Link } from '../link' import { AuthMenu } from '../auth-menu' import { GrLinkPrevious } from 'react-icons/gr' import { NavbarMenu } from './navbar-menu' type LeftbuttonWrapperProps = { marketing?: boolean backButton?: boolean // display a go back button } const onClickEvent = () => { if (typeof history !== 'undefined') { history.back() } } // start left button of the nav const Leftbutton = ({ marketing, backButton }: LeftbuttonWrapperProps) => { if (backButton) { return ( ) } if (!marketing) { return ( ) } return null } // navbar props interface NavProps { title?: string | string[] backButton?: boolean marketing?: boolean toolbar?: any className?: string position?: 'fixed' | 'absolute' | 'relative' | 'static' // navbar position marketingLinks?: any notitle?: boolean authenticated?: boolean loading?: boolean } // todo: stateless navbar marketing export const NavBar: FC> = ({ title = strings.appName, backButton, marketing, toolbar, className = '', position = 'static', children, marketingLinks, notitle, authenticated, loading, }) => { const bg = position === 'static' ? `` : 'bg-[inherit]' return ( ) }