<commit_before>import React, { Component } from 'react';
import classnames from 'classnames';
import PropTypes from 'prop-types';
import BackHeader from '../BackHeader';
import RadioButtonGroup from '../RadioBtnGroup';
import CircleButton from '../CircleButton';
import FlipIcon from '../../assets/images/Flip.svg';
import EndIcon from '../../assets/images/End.svg';
import dynamicsFont from '../../assets/DynamicsFont/DynamicsFont.scss';
import styles from './styles.scss';
import i18n from './i18n';

export default class FlipPanel extends Component {
  constructor(props) {
    super(props);
    this.state = {
      flipValue: '',
      flipEnabled: true,
    };
    this.onRadioSelect = (value) => {
      this.setState({
        flipValue: value,
      });
    };
    this.flip = () => {
      this.props.flip(this.state.flipValue);
      this.setState({
        flipEnabled: false
      });
    };
  }
  render() {
    return (
      <div className={styles.root}>
        <BackHeader
          onBackClick={this.props.isOnFlip ? () => {} : this.props.hideFlipPanel}
          backButton={(
            <span className={styles.backButton}>
              {
                this.props.isOnFlip ? null :
                <i className={classnames(dynamicsFont.arrow, styles.backIcon)} />
              }
            </span>
          )}
          buttons={[]}<commit_msg>set default value (#342)<commit_after>import React, { Component } from 'react';
import classnames from 'classnames';
import PropTypes from 'prop-types';
import BackHeader from '../BackHeader';
import RadioButtonGroup from '../RadioBtnGroup';
import CircleButton from '../CircleButton';
import FlipIcon from '../../assets/images/Flip.svg';
import EndIcon from '../../assets/images/End.svg';
import dynamicsFont from '../../assets/DynamicsFont/DynamicsFont.scss';
import styles from './styles.scss';
import i18n from './i18n';

export default class FlipPanel extends Component {
  constructor(props) {
    super(props);
    this.state = {
      flipValue: this.props.flipNumbers.length === 0 ? '' : this.props.flipNumbers[0].phoneNumber,
      flipEnabled: true,
    };
    this.onRadioSelect = (value) => {
      this.setState({
        flipValue: value,
      });
    };
    this.flip = () => {
      this.props.flip(this.state.flipValue);
      this.setState({
        flipEnabled: false
      });
    };
  }
  render() {
    return (
      <div className={styles.root}>
        <BackHeader
          onBackClick={this.props.isOnFlip ? () => {} : this.props.hideFlipPanel}
          backButton={(
            <span className={styles.backButton}>
              {
                this.props.isOnFlip ? null :
                <i className={classnames(dynamicsFont.arrow, styles.backIcon)} />
              }
            </span>
          )}
          buttons={[]}
{'fraction_non_alphanumeric': 0.1482527356159548, 'fraction_numerical': 0.004588775150017649, 'mean_word_length': 2.3578199052132702, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6324403', 'n_tokens_mistral': 820, 'n_tokens_neox': 803, 'n_words': 173}