function hasText(value) {
    if (null == value) return false;
    const rootChildren = value.root?.children;
    if (null == rootChildren) return false;
    if (0 === rootChildren.length) return false;
    if (1 === rootChildren.length && rootChildren[0]?.type === 'paragraph') {
        const paragraphNode = rootChildren[0];
        const paragraphChildren = paragraphNode.children;
        if (null == paragraphChildren) return false;
        if (0 === paragraphChildren.length) return false;
        if (1 === paragraphChildren.length && paragraphChildren[0]?.type === 'text') {
            const textNode = paragraphChildren[0];
            const text = textNode.text;
            if (null == text) return false;
            if (0 === text.length) return false;
        }
    }
    return true;
}
export { hasText };
