"use strict";

exports.__esModule = true;
exports["default"] = void 0;
var _reselect = require("reselect");
var _lodash = require("lodash");
var _primersSelector = _interopRequireDefault(require("./primersSelector"));
var _sequenceLengthSelector = _interopRequireDefault(require("./sequenceLengthSelector"));
var _editorUtils = require("../utils/editorUtils");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function filteredPrimersSelector(primers, seqLen, primerIndividualToHide, lengthsToHide) {
  return (0, _lodash.omitBy)(primers, function (ann) {
    var hideIndividually = primerIndividualToHide[ann.id];
    return (0, _editorUtils.hideAnnByLengthFilter)(lengthsToHide, ann, seqLen) || hideIndividually;
  });
}
var _default = (0, _reselect.createSelector)(_primersSelector["default"], _sequenceLengthSelector["default"], function (state) {
  return state.annotationVisibility.primerIndividualToHide;
}, function (state) {
  return state.primerLengthsToHide;
}, filteredPrimersSelector);
exports["default"] = _default;
module.exports = exports.default;