import { createSelector } from "reselect";
import { omitBy } from "lodash";
import primersSelector from "./primersSelector";
import sequenceLengthSelector from "./sequenceLengthSelector";
import { hideAnnByLengthFilter } from "../utils/editorUtils";
function filteredPrimersSelector(primers, seqLen, primerIndividualToHide, lengthsToHide) {
  return omitBy(primers, function (ann) {
    var hideIndividually = primerIndividualToHide[ann.id];
    return hideAnnByLengthFilter(lengthsToHide, ann, seqLen) || hideIndividually;
  });
}
export default createSelector(primersSelector, sequenceLengthSelector, function (state) {
  return state.annotationVisibility.primerIndividualToHide;
}, function (state) {
  return state.primerLengthsToHide;
}, filteredPrimersSelector);