"""
This type stub file was generated by pyright.
"""

from typing import TypeVar
from graph_sitter.codebase.codebase_graph import CodebaseGraph
from graph_sitter.core.autocommit import reader, writer
from graph_sitter.core.node_id_factory import NodeId
from graph_sitter.core.statements.comment import Comment
from graph_sitter.core.symbol_group import SymbolGroup
from graph_sitter.writer_decorators import apidoc

Parent = TypeVar("Parent")
@apidoc
class CommentGroup(SymbolGroup[Comment, Parent]):
    """A group of comments that form a larger comment block."""
    _indentation: int
    def __init__(self, children: list[Comment], file_node_id: NodeId, G: CodebaseGraph, parent: Parent) -> None:
        ...
    
    @property
    @reader
    def text(self) -> str:
        """Return the text content of all comments in the comment block.

        Combines multiple comment lines with newlines, excluding comment delimiters.

        Returns:
            str: The concatenated text content of all comments in the block.
        """
        ...
    
    @text.setter
    @writer
    def text(self, new_text: str) -> None:
        """Replace the text of a CommentGroup with new text.

        Updates the text of all comments in the group, maintaining proper comment delimiters like `#` or `/* */`.
        After updating the first comment's text, all subsequent comments in the group are removed.

        Args:
            new_text (str): The new text content to replace the existing comment text. Will be formatted with appropriate comment delimiters.

        Returns:
            None
        """
        ...
    
    @writer
    def edit_text(self, new_text: str) -> None:
        """Replace the text content of a comment group with new text.

        Updates the comment text while preserving and auto-formatting comment delimiters.
        Removes any additional comment lines from the comment group, leaving only the
        first line with the new text.

        Args:
            new_text (str): The new text content to replace the existing comment text.
                The text should not include comment delimiters.

        Returns:
            None
        """
        ...
    


