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

from typing import Generic, TYPE_CHECKING, TypeVar
from tree_sitter import Node as TSNode
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.statement import Statement
from graph_sitter.writer_decorators import apidoc, noapidoc
from graph_sitter.core.detached_symbols.code_block import CodeBlock

if TYPE_CHECKING:
    ...
def lowest_indentation(text_blocks, skip_lines: int = ...): # -> int:
    ...

TCodeBlock = TypeVar("TCodeBlock", bound="CodeBlock")
@apidoc
class Comment(Statement[TCodeBlock], Generic[TCodeBlock]):
    """Abstract representation of comment statements."""
    statement_type = ...
    @property
    @reader
    def nested_code_blocks(self: Statement[TCodeBlock]) -> list[TCodeBlock]:
        """Returns a list of nested code blocks within the statement.

        A property that returns an empty list as comments, by default, do not have any nested code blocks.

        Args:
            self: The statement instance.

        Returns:
            list[TCodeBlock]: An empty list, as comments do not contain nested code blocks.
        """
        ...
    
    @noapidoc
    @classmethod
    @reader
    def from_expression_statement(cls, ts_node: TSNode, file_node_id: NodeId, G: CodebaseGraph, parent: Statement, code_block: TCodeBlock, pos: int, comment_node: TSNode) -> Comment:
        ...
    
    @property
    @reader
    def text(self) -> str:
        """Returns the text content of the comment.

        Returns the actual text content of the comment without any comment delimiters (e.g., '#', '/* */'). For accessing
        the complete comment including delimiters, use the `source` property instead.

        Returns:
            str: The text content of the comment with delimiters removed.
        """
        ...
    
    @text.setter
    @writer
    def text(self, new_text: str) -> None:
        """Replace the text content of a comment while preserving the comment delimiters and
        autoformatting.

        Args:
            new_text (str): The new text content to replace the existing comment. This should be
                the raw text without comment delimiters.

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

        Updates the comment text while maintaining proper comment delimiters (e.g., `#` or `/* */`) and formatting.

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

        Returns:
            None
        """
        ...
    


