// The counter of unread messages in the topic.
import React from 'react';
import { FormattedMessage } from 'react-intl';
import { secondsToTime } from '../lib/strformat.js';
// Props:
// incoming: true | false.
// success: true | false.
export default class CallStatus extends React.PureComponent {
render() {
const isCallDropped = ['declined', 'disconnected', 'missed'].includes(this.props.callState);
const icon2 = this.props.incoming ?
(isCallDropped ? 'call_missed' : 'call_received') :
(isCallDropped ? 'call_missed_outgoing' : 'call_made');
let duration;
if (isCallDropped) {
switch (this.props.callState) {
case 'declined':
duration =