import React from 'react'; import { useTheme } from '../../../theme'; import * as List from '../../../containers/List'; import OmnichannelStatus from '../../../ee/omnichannel/containers/OmnichannelStatus'; import { IUser } from '../../../definitions'; import { E2E_BANNER_TYPE, themes } from '../../../lib/constants'; export type TEncryptionBanner = 'REQUEST_PASSWORD' | 'SAVE_PASSWORD'; interface IRoomListHeader { searching: boolean; goEncryption: () => void; goQueue: () => void; queueSize: number; inquiryEnabled: boolean; encryptionBanner: TEncryptionBanner; user: IUser; } const ListHeader = React.memo( ({ searching, goEncryption, goQueue, queueSize, inquiryEnabled, encryptionBanner, user }: IRoomListHeader) => { if (searching) { return null; } const { theme } = useTheme(); return ( <> {encryptionBanner ? ( <> } underlayColor={themes[theme].tintActive} backgroundColor={themes[theme].actionTintColor} color={themes[theme].buttonText} onPress={goEncryption} testID='listheader-encryption' /> ) : null} ); } ); export default ListHeader;