{"size": 568, "ext": "js", "max_stars_repo_path": "app/containers/Search/actions.js", "max_stars_repo_name": "DJTouchette/podcastAddictReact", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/containers/Search/actions.js", "max_issues_repo_name": "DJTouchette/podcastAddictReact", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/containers/Search/actions.js", "max_forks_repo_name": "DJTouchette/podcastAddictReact", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 14.2, "max_line_length": 39, "alphanum_fraction": 0.6549295775}
/*
 *
 * Search actions
 *
 */

import {
  DEFAULT_ACTION,
  ACTIONS,
} from './constants';

export function defaultAction() {
  return {
    type: DEFAULT_ACTION,
  };
}

export function requestSearch(term) {
  return {
    type: ACTIONS.REQUEST_SEARCH,
    term: term,
    isFetching: true,
  };
}

export function addSearch(searchList) {
  return {
    type: ACTIONS.ADD_SEARCH,
    searchList: searchList,
    isFetching: false,
  };
}

export function searchForm(event) {
  return {
    type: ACTIONS.SEARCH_FORM_CHANGE,
    formValue: event.target.value,
  };
}
