import { Outlet } from 'react-router-dom';
import { useRef } from 'react';
import { clsm } from '../../utils';
import { useResponsiveDevice } from '../../contexts/ResponsiveDevice';
import { useUser } from '../../contexts/User';
import ConfirmationModal from '../../components/ConfirmationModal';
import FloatingNav from '../../components/FloatingNav';
import Navbar from './Navbar';
import Notification from '../../components/Notification';
import useCurrentPage from '../../hooks/useCurrentPage';
import withSessionLoader from '../../components/withSessionLoader';
const AppLayoutWithNavbar = () => {
const {
isDefaultResponsiveView,
isLandscape,
isMobileView,
mainRef,
isTouchscreenDevice
} = useResponsiveDevice();
const { isSessionValid } = useUser();
const currentPage = useCurrentPage();
const appLayoutRef = useRef();
const isChannelPage = currentPage === 'channel';
const isStreamManagerPage = currentPage === 'stream_manager';
const isStreamHealthPage = currentPage === 'stream_health';
const renderNav = () => {
switch (true) {
case isMobileView && (isChannelPage || isStreamManagerPage):
return null; // The mobile channel and stream manager pages have their own FloatingNav and/or MobileNavbar
case isMobileView && isSessionValid:
return