import { CallState } from '@azure/communication-calling' ; import { CallCompositePage } from '../../CallComposite' ; beta export type MeetingCompositePage = 'accessDeniedTeamsMeeting' | 'configuration' | 'joinMeetingFailedDueToNoNetwork' | 'leftMeeting' | 'lobby' | 'meeting' | 'removedFromMeeting' ; private export function callPageToMeetingPage ( page ) { switch ( page ) { case 'call' : return 'meeting' ; case 'leftCall' : return 'leftMeeting' ; case 'removedFromCall' : return 'removedFromMeeting' ; case 'joinCallFailedDueToNoNetwork' : return 'joinMeetingFailedDueToNoNetwork' ; default : return page ; } } private export function meetingPageToCallPage ( page ) { switch ( page ) { case 'meeting' : return 'call' ; case 'leftMeeting' : return 'leftCall' ; case 'removedFromMeeting' : return 'removedFromCall' ; case 'joinMeetingFailedDueToNoNetwork' : return 'joinCallFailedDueToNoNetwork' ; default : return page ; } } private export const hasJoinedCall = ( page , callStatus ) : boolean => page === 'meeting' && callStatus === 'Connected' ;