import { Drawer } from './Drawer';
import { HorizontalBar } from './HorizontalBar';
import { useLayoutMediaState } from './Provider';

type INavMenuProps = React.PropsWithChildren;

function NavMenu(props: INavMenuProps) {
  const { horizontal } = useLayoutMediaState();
  return !horizontal ? <Drawer>{props.children}</Drawer> : <HorizontalBar>{props.children}</HorizontalBar>;
}

export { NavMenu };
