{"size": 920, "ext": "js", "max_stars_repo_path": "app/components/SessionBooking/SessionInfo/CancelInfoText.js", "max_stars_repo_name": "Mai-Hong-Son/wefitv2", "max_stars_repo_stars_event_min_datetime": "2020-06-19T13:57:41.000Z", "max_stars_repo_stars_event_max_datetime": "2020-06-19T13:57:41.000Z", "max_issues_repo_path": "app/components/SessionBooking/SessionInfo/CancelInfoText.js", "max_issues_repo_name": "Mai-Hong-Son/wefitv2", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/components/SessionBooking/SessionInfo/CancelInfoText.js", "max_forks_repo_name": "Mai-Hong-Son/wefitv2", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 21.9047619048, "max_line_length": 77, "alphanum_fraction": 0.6891304348}
/**
 * @providesModule WeFit.Components.SessionBooking.SessionInfo.CancelInfoText
 */

import React from 'react';
import PropTypes from 'prop-types';
import { StyleSheet, View } from 'react-native';
import I18n from 'react-native-i18n';

import HighlightText from 'app/components/Reusables/HighlightText';

// Models
import Session from 'app/models/Session';

export default function CancelInfoText({ session }) {
  const eta = session.buildEtaText(I18n.t('formats.etaTexts'));

  return (
    <View style={styles.container}>
      <HighlightText
        highlightWords={[eta]}
        style={styles.infoText}
        template={I18n.t('sessionBooking.confirmCancel')}
      />
    </View>
  );
}

CancelInfoText.propTypes = {
  session: PropTypes.instanceOf(Session).isRequired,
};

const styles = StyleSheet.create({
  container: {
    marginBottom: 46,
    marginTop: 25,
  },
  infoText: {
    marginTop: 4,
  },
});
