// Copyright 2020-2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; import classNames from 'classnames'; import { LocalizerType } from '../types/Util'; import { Tooltip } from './Tooltip'; import { Theme } from '../util/theme'; export type PropsType = { canPip?: boolean; i18n: LocalizerType; isInSpeakerView?: boolean; isGroupCall?: boolean; message?: string; participantCount: number; showParticipantsList: boolean; title?: string; toggleParticipants?: () => void; togglePip?: () => void; toggleSettings: () => void; toggleSpeakerView?: () => void; }; export const CallingHeader = ({ canPip = false, i18n, isInSpeakerView, isGroupCall = false, message, participantCount, showParticipantsList, title, toggleParticipants, togglePip, toggleSettings, toggleSpeakerView, }: PropsType): JSX.Element => (
{title ? (
{title}
) : null} {message ? (
{message}
) : null}
{isGroupCall ? (
) : null}
{isGroupCall && participantCount > 2 && toggleSpeakerView && (
)} {canPip && (
)}
);