import classNames from 'classnames'; import moment from 'moment'; import PropTypes from 'prop-types'; import React, { Component } from 'react'; import Icon from 'Components/Icon'; import Link from 'Components/Link/Link'; import { icons, kinds } from 'Helpers/Props'; import getStatusStyle from 'Utilities/Movie/getStatusStyle'; import translate from 'Utilities/String/translate'; import CalendarEventQueueDetails from './CalendarEventQueueDetails'; import styles from './CalendarEvent.css'; class CalendarEvent extends Component { // // Render render() { const { movieFile, isAvailable, inCinemas, physicalRelease, digitalRelease, title, titleSlug, genres, date, monitored, certification, hasFile, grabbed, queueItem, showMovieInformation, showCutoffUnmetIcon, fullColorEvents, colorImpairedMode } = this.props; const isDownloading = !!(queueItem || grabbed); const isMonitored = monitored; const statusStyle = getStatusStyle(null, isMonitored, hasFile, isAvailable, 'style', isDownloading); const joinedGenres = genres.slice(0, 2).join(', '); const link = `/movie/${titleSlug}`; const eventType = []; if (inCinemas && moment(date).isSame(moment(inCinemas), 'day')) { eventType.push('Cinemas'); } if (physicalRelease && moment(date).isSame(moment(physicalRelease), 'day')) { eventType.push('Physical'); } if (digitalRelease && moment(date).isSame(moment(digitalRelease), 'day')) { eventType.push('Digital'); } return (