import React from 'react'
import moment from 'moment'
import styles from './styles.css'
import BalloonHeading from './BalloonHeading'
import BalloonBody from './BalloonBody'
import TimeLabel from './TimeLabel'

class Balloon extends React.Component {
  constructor() {
    super()
  }

  render() {
    let { time, message, alignRight, sender } = this.props

    return (
      <div className={ alignRight ? styles.balloonRight : styles.balloon }>
        <BalloonHeading sender={ alignRight ? '' : sender } />
        <BalloonBody time={ time } message={ message } />
        <TimeLabel time={ time } format="LT" />
      </div>
    )
  }
}
export default Balloon