import * as React from 'react'; import classNames from 'classnames'; import { LocalizerType } from '../types/Util'; import { Avatar, Props as AvatarProps } from './Avatar'; import { isEmpty } from 'lodash'; export type Props = { readonly i18n: LocalizerType; onViewPreferences: () => unknown; onViewArchive: () => unknown; // Matches Popper's RefHandler type innerRef?: (ref: HTMLElement | null) => void; style: React.CSSProperties; } & AvatarProps; export const AvatarPopup = (props: Props) => { const { i18n, profileName, phoneNumber, onViewPreferences, onViewArchive, style, } = props; const hasProfileName = !isEmpty(profileName); return (