<commit_before>import * as React from 'react'
import { saveReview } from '../../../actions/classroomSessions';
import { getParameterByName } from '../../../libs/getParameterByName';

export default class CongratulationsModal extends React.Component<{closeModal: any, lessonId:string}, {selectedEmoji: number|null}> {
  constructor(props) {
    super(props)

    this.state = {
      selectedEmoji: null,
    }

    this.selectEmoji = this.selectEmoji.bind(this)
    this.renderFeedbackSection = this.renderFeedbackSection.bind(this)
  }

  selectEmoji(value:number) {
    this.setState({selectedEmoji: value})
    saveReview(this.props.lessonId, getParameterByName('classroom_activity_id'), value)
  }

  renderFeedbackResponse() {
    let text
    if (this.state.selectedEmoji === 2) {
      text = <p>We are happy to hear that you had a good experience with Quill Lessons. Please share your feedback, suggestions or report any bugs through this <a href="https://goo.gl/forms/jOnHqHOInBnNDvig1" target="_blank">short feedback form</a>.</p>
    } else {
      text = <p>We are sorry to hear that you did not have a good experience with Quill Lessons. Please share your feedback, suggestions or report any bugs through this <a href="https://goo.gl/forms/jOnHqHOInBnNDvig1" target="_blank">short feedback form</a>.</p>
    }
    return <div className="feedback-response">
      <p>Thank you!</p>
      {text}
    </div>
  }

  renderFeedbackSection() {
    switch (this.state.selectedEmoji) {
      case 2:
      case 1:
      case 0:
        return this.renderFeedbackResponse()
      default:
        return <div className="feedback">
         <p>How was your experience with Quill Lessons?</p>
         <p>We are eager to hear your feedback to improve this tool.</p>
         <div className="emoji-row"><commit_msg>update congratulations modal copy<commit_after>import * as React from 'react'
import { saveReview } from '../../../actions/classroomSessions';
import { getParameterByName } from '../../../libs/getParameterByName';

export default class CongratulationsModal extends React.Component<{closeModal: any, lessonId:string}, {selectedEmoji: number|null}> {
  constructor(props) {
    super(props)

    this.state = {
      selectedEmoji: null,
    }

    this.selectEmoji = this.selectEmoji.bind(this)
    this.renderFeedbackSection = this.renderFeedbackSection.bind(this)
  }

  selectEmoji(value:number) {
    this.setState({selectedEmoji: value})
    saveReview(this.props.lessonId, getParameterByName('classroom_activity_id'), value)
  }

  renderFeedbackResponse() {
    let text
    if (this.state.selectedEmoji === 2) {
      text = <p>We are happy to hear that you had a good experience with Quill Lessons. Please share your feedback, suggestions or report any bugs by clicking on the link below.</p>
    } else {
      text = <p>We are sorry to hear that you did not have a good experience with Quill Lessons. Please share your feedback, suggestions or report any bugs by clicking on the link below.</p>
    }
    return <div className="feedback-response">
      <p>Thank you!</p>
      {text}
      <a href="https://goo.gl/forms/jOnHqHOInBnNDvig1" target="_blank">Share Your Feedback</a>
    </div>
  }

  renderFeedbackSection() {
    switch (this.state.selectedEmoji) {
      case 2:
      case 1:
      case 0:
        return this.renderFeedbackResponse()
      default:
        return <div className="feedback">
         <p>How was your experience with Quill Lessons?</p>
         <p>We are eager to hear your feedback to improve this tool.</p>
         <div className="emoji-row">
{'fraction_non_alphanumeric': 0.115736885928393, 'fraction_numerical': 0.0030530113794060504, 'mean_word_length': 3.357920193470375, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 39, 'https://': 3, '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': '256221', 'n_tokens_mistral': 1077, 'n_tokens_neox': 1076, 'n_words': 307}