// Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: MIT-0 import React from 'react'; import { Navbar, NavbarHeader, NavbarItem, Attendees, Eye, SignalStrength, Flex, ZoomIn, ZoomOut, useContentShareState, Chat, } from 'amazon-chime-sdk-component-library-react'; import { useNavigation } from '../../providers/NavigationProvider'; import { useAppState } from '../../providers/AppStateProvider'; import { LocalMediaStreamMetrics } from '../LocalMediaStreamMetrics'; import { Layout } from '../../types'; import GalleryLayout from '../../components/icons/GalleryLayout'; import FeaturedLayout from '../../components/icons/FeaturedLayout'; import { useVideoTileGridControl } from '../../providers/VideoTileGridProvider'; const Navigation: React.FC = () => { const { toggleRoster, closeNavbar, toggleChat } = useNavigation(); const { theme, toggleTheme, layout, setLayout, priorityBasedPolicy } = useAppState(); const { sharingAttendeeId } = useContentShareState(); const { zoomIn, zoomOut } = useVideoTileGridControl(); return ( } onClick={toggleRoster} label="Attendees" /> } onClick={toggleChat} label="Chat" /> ) : ( ) } onClick={(): void => { if (layout === Layout.Gallery) { setLayout(Layout.Featured); } else { setLayout(Layout.Gallery); } }} disabled={!!sharingAttendeeId} label="Switch View" /> {layout === Layout.Gallery && priorityBasedPolicy && <> } onClick={zoomIn} label="Zoom In" disabled={!!sharingAttendeeId} /> } onClick={zoomOut} label="Zoom Out" /> } } onClick={toggleTheme} label={theme === 'light' ? 'Dark mode' : 'Light mode'} /> } onClick={(): void => { // do nothing }} label="Media metrics" > ); }; export default Navigation;