{"size": 1256, "ext": "js", "max_stars_repo_path": "app/containers/PastStays/selectors.js", "max_stars_repo_name": "seanng/admin", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/containers/PastStays/selectors.js", "max_issues_repo_name": "seanng/admin", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/containers/PastStays/selectors.js", "max_forks_repo_name": "seanng/admin", "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": 25.6326530612, "max_line_length": 79, "alphanum_fraction": 0.7125796178}
import { createSelector } from 'reselect';

/**
 * Direct selector to the pastStays state domain
 */
const selectPastStaysDomain = () => state => state.get('pastStays');

/**
 * Other specific selectors
 */

export const selectHasLoaded = () =>
  createSelector(selectPastStaysDomain(), substate =>
    substate.get('hasLoaded')
  );

export const selectStays = () =>
  createSelector(selectPastStaysDomain(), substate => substate.get('stays'));

export const selectStay = () =>
  createSelector(selectPastStaysDomain(), substate => substate.get('stay'));

export const selectServiceInput = () =>
  createSelector(selectPastStaysDomain(), substate =>
    substate.get('serviceInput')
  );

export const selectPriceInput = () =>
  createSelector(selectPastStaysDomain(), substate =>
    substate.get('priceInput')
  );

export const selectCharges = () =>
  createSelector(selectPastStaysDomain(), substate => substate.get('charges'));

export const selectIsModalOpen = () =>
  createSelector(selectPastStaysDomain(), substate =>
    substate.get('isModalOpen')
  );

/**
 * Default selector used by PastStays
 */

const makeSelectPastStays = () =>
  createSelector(selectPastStaysDomain(), substate => substate.toJS());

export default makeSelectPastStays;
