import { CallState as SDKCallStatus } from '@azure/communication-calling' ; import { CallState , DeviceManagerState , DiagnosticsCallFeatureState , LocalVideoStreamState } from '@internal/calling-stateful-client' ; import { CallAdapterState , CallCompositePage } from '../adapter/CallAdapter' ; import { _isInCall , _isPreviewOn } from '@internal/calling-component-bindings' ; private export const getCallId = ( state ) : string | undefined => state . call ?. id ; private export const getEndedCall = ( state ) : CallState | undefined => state . endedCall ; private export const getCallStatus = ( state ) : SDKCallStatus => state . call ?. state ?? 'None' ; private export const getDeviceManager = ( state ) : DeviceManagerState => state . devices ; private export const getIsScreenShareOn = ( state ) : boolean => state . call ?. isScreenSharingOn ?? false ; private export const getIsPreviewCameraOn = ( state ) : boolean => _isPreviewOn ( state . devices ) ; private export const getPage = ( state ) : CallCompositePage => state . page ; private export const getLocalMicrophoneEnabled = ( state ) : boolean => state . isLocalPreviewMicrophoneEnabled ; private export const getLocalVideoStreams = ( state ) : LocalVideoStreamState [ ] | undefined => state . call ?. localVideoStreams ; private export const getIsTranscriptionActive = ( state ) : boolean => ! ! state . call ?. transcription . isTranscriptionActive ; private export const getIsRecordingActive = ( state ) : boolean => ! ! state . call ?. recording . isRecordingActive ; private export const getUserFacingDiagnostics = ( state ) : DiagnosticsCallFeatureState | undefined => state . call ?. diagnostics ;