<commit_before>import * as React from 'react'
import { Dispatcher } from '../../lib/dispatcher'
import { DialogContent } from '../dialog'
import { Checkbox, CheckboxValue } from '../lib/checkbox'
import { LinkButton } from '../lib/link-button'

interface IAdvancedPreferencesProps {
  readonly dispatcher: Dispatcher
}

interface IAdvancedPreferencesState {
  readonly reportingOptOut: boolean,
}

const SamplesURL = 'https://desktop.github.com/samples/'

export class Advanced extends React.Component<IAdvancedPreferencesProps, IAdvancedPreferencesState> {
  public constructor(props: IAdvancedPreferencesProps) {
    super(props)

    this.state = {
      reportingOptOut: false,
    }
  }

  public componentDidMount() {
    const optOut = this.props.dispatcher.getStatsOptOut()

    this.setState({
      reportingOptOut: optOut,
    })
  }

  private onChange = (event: React.FormEvent<HTMLInputElement>) => {
    const value = !event.currentTarget.checked

    this.props.dispatcher.setStatsOptOut(value)

    this.setState({
      reportingOptOut: value,
    })
  }

  public render() {
    return (
      <DialogContent>
        <div>
          Would you like to help us improve GitHub Desktop by periodically submitting <LinkButton uri={SamplesURL}>anonymous usage data</LinkButton>?
        </div>

        <Checkbox
          label='Yes, submit anonymized usage data'
          value={this.state.reportingOptOut ? CheckboxValue.Off : CheckboxValue.On}
          onChange={this.onChange} />
      </DialogContent>
    )
  }
}<commit_msg>Add space between content and input<commit_after>import * as React from 'react'
import { Dispatcher } from '../../lib/dispatcher'
import { DialogContent } from '../dialog'
import { Checkbox, CheckboxValue } from '../lib/checkbox'
import { LinkButton } from '../lib/link-button'

interface IAdvancedPreferencesProps {
  readonly dispatcher: Dispatcher
}

interface IAdvancedPreferencesState {
  readonly reportingOptOut: boolean,
}

const SamplesURL = 'https://desktop.github.com/samples/'

export class Advanced extends React.Component<IAdvancedPreferencesProps, IAdvancedPreferencesState> {
  public constructor(props: IAdvancedPreferencesProps) {
    super(props)

    this.state = {
      reportingOptOut: false,
    }
  }

  public componentDidMount() {
    const optOut = this.props.dispatcher.getStatsOptOut()

    this.setState({
      reportingOptOut: optOut,
    })
  }

  private onChange = (event: React.FormEvent<HTMLInputElement>) => {
    const value = !event.currentTarget.checked

    this.props.dispatcher.setStatsOptOut(value)

    this.setState({
      reportingOptOut: value,
    })
  }

  public render() {
    return (
      <DialogContent>
        <div>
          Would you like to help us improve GitHub Desktop by periodically submitting <LinkButton uri={SamplesURL}>anonymous usage data</LinkButton>?
        </div>

        <br />

        <Checkbox
          label='Yes, submit anonymized usage data'
          value={this.state.reportingOptOut ? CheckboxValue.Off : CheckboxValue.On}
          onChange={this.onChange} />
      </DialogContent>
    )
  }
}
{'fraction_non_alphanumeric': 0.10759897828863346, 'fraction_numerical': 0.0, 'mean_word_length': 3.268392370572207, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 24, 'https://': 2, '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': '1193547', 'n_tokens_mistral': 898, 'n_tokens_neox': 859, 'n_words': 206}