import { TIPTAP_COLLAPSIBLE_LIST_TYPE } from "./../../ricos-content/consts.js";
import { findParentNodeClosestToPos } from "./../../tiptap/index.js";
const getCollapsibleListInSelection = (_, __, editor) => {
  const selection = editor?.state?.selection;
  if (!selection) {
    return void 0;
  }
  return findParentNodeClosestToPos(
    selection?.$to,
    (node) => node?.type?.name === TIPTAP_COLLAPSIBLE_LIST_TYPE
  )?.node;
};
export {
  getCollapsibleListInSelection
};
//# sourceMappingURL=get-collapsible-list-in-selection.js.map
