"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.useCheckSetEqualityForPreviousVsCurrent = useCheckSetEqualityForPreviousVsCurrent;

var _usePrevious = require("./usePrevious");

var _areSetsEqual = require("../../lib/areSetsEqual");

function useCheckSetEqualityForPreviousVsCurrent(pivotSet) {
  var previousOrFirst = (0, _usePrevious.usePrevious)(pivotSet);

  if (previousOrFirst == null) {
    return true;
  }

  return (0, _areSetsEqual.areSetsEqual)(pivotSet, previousOrFirst) === false;
}