import { createSelector } from "reselect";

const selectApplication = (state) => state.application;

export const selectWatcherStatus = createSelector(
  [selectApplication],
  (application) => application.watcherStatus
);

export const selectWatchedPaths = createSelector(
  [selectApplication],
  (application) => application.watchedPaths
);

export const selectWatcherError = createSelector(
  [selectApplication],
  (application) => application.watcherError
);

export const selectSelectedJobId = createSelector(
  [selectApplication],
  (application) => application.selectedJobId
);

export const selectSelectedJobTargetPc = createSelector(
  [selectApplication],
  (application) => application.selectedJobTargetPc
);

export const selectSettings = createSelector(
  [selectApplication],
  (application) => application.settings
);

export const selectUpdateAvailable = createSelector(
  [selectApplication],
  (application) => application.updateAvailable
);

export const selectUpdateProgress = createSelector(
  [selectApplication],
  (application) => application.updateProgress
);

export const selectReleaseNotes = createSelector(
  [selectApplication],
  (application) => application.releaseNotes
);
export const selectEsResults = createSelector(
  [selectApplication],
  (application) => application.esResults
);
