<commit_before>import PropTypes from 'prop-types';
import React from 'react';
import classNames from 'classnames';

import IconSearch from '@department-of-veterans-affairs/formation/IconSearch';
import DropDownPanel from '@department-of-veterans-affairs/formation/DropDownPanel';

class SearchMenu extends React.Component {
  constructor(props) {
    super(props);
    this.makeForm = this.makeForm.bind(this);
    this.toggleSearchForm = this.toggleSearchForm.bind(this);
    this.state = {
      searchAction: '/search/',
      userInput: '',
    };
  }

  componentDidUpdate() {
    this.refs.searchField.focus();
  }

  toggleSearchForm() {
    this.props.clickHandler();
  }

  handleInputChange = e => {
    this.setState({
      userInput: e.target.value,
    });
  };

  makeForm() {
    const validUserInput =
      this.state.userInput &&
      this.state.userInput.replace(/\s/g, '').length > 0;

    return (
      <form
        acceptCharset="UTF-8"<commit_msg>update search action url (#9058)<commit_after>import PropTypes from 'prop-types';
import React from 'react';
import classNames from 'classnames';

import IconSearch from '@department-of-veterans-affairs/formation/IconSearch';
import DropDownPanel from '@department-of-veterans-affairs/formation/DropDownPanel';

class SearchMenu extends React.Component {
  // TODO: make the action url environment specific
  constructor(props) {
    super(props);
    this.makeForm = this.makeForm.bind(this);
    this.toggleSearchForm = this.toggleSearchForm.bind(this);
    this.state = {
      searchAction: 'https://www.va.gov/search/',
      userInput: '',
    };
  }

  componentDidUpdate() {
    this.refs.searchField.focus();
  }

  toggleSearchForm() {
    this.props.clickHandler();
  }

  handleInputChange = e => {
    this.setState({
      userInput: e.target.value,
    });
  };

  makeForm() {
    const validUserInput =
      this.state.userInput &&
      this.state.userInput.replace(/\s/g, '').length > 0;

    return (
      <form
        acceptCharset="UTF-8"
{'fraction_non_alphanumeric': 0.13500245459008345, 'fraction_numerical': 0.0039273441335297005, 'mean_word_length': 3.2905263157894735, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, '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': '7484728', 'n_tokens_mistral': 648, 'n_tokens_neox': 629, 'n_words': 116}