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

from enum import StrEnum
from typing import TYPE_CHECKING
from graph_sitter.core.autocommit import reader
from graph_sitter.core.statements.comment import Comment
from graph_sitter.writer_decorators import ts_apidoc

if TYPE_CHECKING:
    ...
@ts_apidoc
class TSCommentType(StrEnum):
    """An enumeration representing different types of comments in TypeScript.

    Represents the possible types of comments that can be used in TypeScript code,
    including double slash comments (//), slash star comments (/* */), and unknown
    comment types.

    Attributes:
        DOUBLE_SLASH (str): Represents a single-line comment starting with //.
        SLASH_STAR (str): Represents a multi-line comment enclosed in /* */.
        UNKNOWN (str): Represents an unknown or unrecognized comment type.
    """
    DOUBLE_SLASH = ...
    SLASH_STAR = ...
    UNKNOWN = ...


@ts_apidoc
class TSComment(Comment):
    """Abstract representation of typescript comments"""
    @property
    @reader
    def comment_type(self) -> TSCommentType:
        """Determines the type of comment in a TypeScript source code.

        Parses the comment markers to determine if it's a single-line comment (//) or a multi-line comment (/* */). If no known comment markers are found, returns UNKNOWN.

        Args:
            self: The TSComment instance.

        Returns:
            TSCommentType: The type of the comment. Can be DOUBLE_SLASH for single-line comments,
                SLASH_STAR for multi-line comments, or UNKNOWN if no known comment markers are found.
        """
        ...
    
    @staticmethod
    def generate_comment(new_src: str, comment_type: TSCommentType, leading_star: bool = ..., force_multiline: bool = ...) -> str:
        """Generates a TypeScript comment block from the given text content.

        Creates a comment block in either single-line (//) or multi-line (/* */) format based on the specified comment type.

        Args:
            new_src (str): The text content to be converted into a comment.
            comment_type (TSCommentType): The type of comment to generate (DOUBLE_SLASH or SLASH_STAR).
            leading_star (bool, optional): Whether to add leading "*" to each line in multi-line comments. Defaults to True.
            force_multiline (bool, optional): Whether to force multi-line format for single-line content. Defaults to False.

        Returns:
            str: The formatted comment block as a string.
        """
        ...
    
    @staticmethod
    def clean_comment(comment: str) -> str:
        """Cleans comment markers and whitespace from a comment string.

        Removes various types of comment markers ('/', '/*', '/**', '*/') and trims whitespace
        from the beginning and end of the comment text.

        Args:
            comment (str): The raw comment string to be cleaned.

        Returns:
            str: The cleaned comment text with comment markers and excess whitespace removed.
        """
        ...
    


