"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.areUserPreferencesEqual = void 0;
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
/**
 * Compare two user preferences objects
 * @param {ResolvedUserPreferences} left a ResolvedUserPreferences
 * @param {ResolvedUserPreferences} right a ResolvedUserPreferences
 * @returns true if the user preferences are the same, false otherwise
 * @example
 * const userPreferences1 = {
 *   toolbarDockingPosition: 'top',
 * };
 * const userPreferences2 = {
 *   toolbarDockingPosition: 'top',
 * };
 * compareUserPreferences(userPreferences1, userPreferences2); // true
 */
var areUserPreferencesEqual = exports.areUserPreferencesEqual = function areUserPreferencesEqual(left, right) {
  return Object.entries(left).every(function (_ref) {
    var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
      key = _ref2[0],
      value = _ref2[1];
    return value === right[key];
  });
};