// Copyright 2018-2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; import classNames from 'classnames'; import { Avatar } from './Avatar'; import { Emojify } from './conversation/Emojify'; import { InContactsIcon } from './InContactsIcon'; import { LocalizerType } from '../types/Util'; import { ColorType } from '../types/Colors'; interface Props { avatarPath?: string; color?: ColorType; i18n: LocalizerType; isAdmin?: boolean; isMe?: boolean; isVerified?: boolean; name?: string; onClick?: () => void; phoneNumber?: string; profileName?: string; title: string; } export class ContactListItem extends React.Component { public renderAvatar(): JSX.Element { const { avatarPath, i18n, color, name, phoneNumber, profileName, title, } = this.props; return ( ); } public render(): JSX.Element { const { i18n, isAdmin, isMe, isVerified, name, onClick, phoneNumber, profileName, title, } = this.props; const displayName = isMe ? i18n('you') : title; const shouldShowIcon = Boolean(name); const showNumber = Boolean(isMe || name || profileName); const showVerified = !isMe && isVerified; return ( ); } }