"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
Object.defineProperty(exports, "rankEditorPlugins", {
  enumerable: true,
  get: function get() {
    return _rankEditorPlugins.rankEditorPlugins;
  }
});
exports.sortByOrder = sortByOrder;
exports.sortByOrderWithTypeName = sortByOrderWithTypeName;
var _rankEditorPlugins = require("./rankEditorPlugins");
// eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required -- Ignored via go/ED-25883
// @deprecated
// @private This rank is not stable and should not be trusted. If you need to change this file, please let the Editor lego team know about it
function sortByOrder(item) {
  return function (a, b) {
    return _rankEditorPlugins.rankEditorPlugins[item].indexOf(a.name) - _rankEditorPlugins.rankEditorPlugins[item].indexOf(b.name);
  };
}

// while functionally the same, in order to avoid potentially rewriting the ~10
// existing implementations of the above function I decided creating a separate
// function avoided that whole mess. If someone can think of a better way to implement
// the above and below into a single function please do so

// eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required -- Ignored via go/ED-25883
// @deprecated
// @private This rank is not stable and should not be trusted. If you need to change this file, please let the Editor lego team know about it
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
function sortByOrderWithTypeName(item) {
  return function (a, b) {
    return _rankEditorPlugins.rankEditorPlugins[item].indexOf(a.type.name) - _rankEditorPlugins.rankEditorPlugins[item].indexOf(b.type.name);
  };
}
// eslint-disable-next-line @atlaskit/editor/no-re-export