import { createSelector } from "reselect";
import searchLayersSelector from "./searchLayersSelector";
export default createSelector(searchLayersSelector, function (state) {
  return state.findTool && state.findTool.dnaOrAA;
}, function (state) {
  return state.findTool && state.findTool.highlightAll;
}, function (state) {
  return state.findTool && state.findTool.matchNumber;
}, function (searchLayers, dnaOrAA, highlightAll, matchNumber) {
  if (dnaOrAA === "DNA") return [];
  if (!highlightAll) return [searchLayers[matchNumber]];
  return searchLayers;
});