protected function createNode(NodeInterface $commentCollection, CommentDtoInterface $comment): NodeInterface
    {
        $commentNodeType = $this->nodeTypeManager->getNodeType(self::COMMENT_NODE_TYPE);
        $commentNodeTemplate = new NodeTemplate();
        $commentNodeTemplate->setNodeType($commentNodeType);

        $commentNode = $commentCollection->createNodeFromTemplate($commentNodeTemplate);
        $commentNode->setProperty('name', $comment->getName());
        $commentNode->setProperty('email', $comment->getEmail());
        $commentNode->setProperty('content', $comment->getContent());
        $commentNode->setProperty('createdAt', $comment->getCreatedAt());
        $commentNode->setHidden($comment->isHidden());

        if ($this->addCommentToTop) {
            $firstComment = $commentCollection->getChildNodes(null, 1);
            
            if ($firstComment) {
                $commentNode->moveBefore($firstComment[0]);
            }
        }

        return $commentNode;
    }