const NAME = "isChildSingleTextBlock";
const isChildSingleTextBlockFn = ({ editorQuery }) => (nodeId) => {
  if (editorQuery.query.isMultipleSelection()) {
    return false;
  }
  const selectedNode = editorQuery.selection().doc?.children?.[0]?.descendants((node) => node.toNode()?.id === nodeId)[0];
  if (selectedNode?.children.length !== 1) {
    return false;
  }
  return !!selectedNode.children[0].isTextBlock();
};
const isChildSingleTextBlock = { NAME, query: isChildSingleTextBlockFn };
export {
  isChildSingleTextBlock
};
//# sourceMappingURL=is-child-single-text-block.js.map
