import React from 'react'; import classNames from 'classnames'; import { Emojify } from './Emojify'; import { Avatar } from '../Avatar'; import { ColorType, LocalizerType } from '../../types/Util'; import { ContextMenu, ContextMenuTrigger, MenuItem, SubMenu, } from 'react-contextmenu'; interface TimerOption { name: string; value: number; } export interface PropsData { id: string; name?: string; phoneNumber: string; profileName?: string; color?: ColorType; avatarPath?: string; isVerified?: boolean; isMe?: boolean; isGroup?: boolean; isArchived?: boolean; leftGroup?: boolean; expirationSettingName?: string; showBackButton?: boolean; timerOptions?: Array; } export interface PropsActions { onSetDisappearingMessages: (seconds: number) => void; onDeleteMessages: () => void; onResetSession: () => void; onSearchInConversation: () => void; onShowSafetyNumber: () => void; onShowAllMedia: () => void; onShowGroupMembers: () => void; onGoBack: () => void; onArchive: () => void; onMoveToInbox: () => void; } export interface PropsHousekeeping { i18n: LocalizerType; } export type Props = PropsData & PropsActions & PropsHousekeeping; export class ConversationHeader extends React.Component { public showMenuBound: (event: React.MouseEvent) => void; public menuTriggerRef: React.RefObject; public constructor(props: Props) { super(props); this.menuTriggerRef = React.createRef(); this.showMenuBound = this.showMenu.bind(this); } public showMenu(event: React.MouseEvent) { if (this.menuTriggerRef.current) { this.menuTriggerRef.current.handleContextClick(event); } } public renderBackButton() { const { onGoBack, showBackButton } = this.props; return (