"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const Slate = require("slate");
const getPreviousSibling = (editor, node, nodePath) => {
  const lastPathIndex = nodePath[nodePath.length - 1];
  if (lastPathIndex === 0) {
    return void 0;
  }
  const previousPath = nodePath.slice(0, -1).concat(lastPathIndex - 1);
  return [Slate.Node.get(editor, previousPath), previousPath];
};
exports.getPreviousSibling = getPreviousSibling;
//# sourceMappingURL=getPreviousSibling.cjs.map
