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

from typing import TYPE_CHECKING
from tree_sitter import Node as TSNode
from graph_sitter.core.autocommit import reader, writer
from graph_sitter.core.interfaces.editable import Editable
from graph_sitter.core.interfaces.exportable import Exportable
from graph_sitter.core.symbol import Symbol
from graph_sitter.enums import ImportType
from graph_sitter.typescript.statements.comment import TSCommentType
from graph_sitter.typescript.symbol_groups.comment_group import TSCommentGroup
from graph_sitter.writer_decorators import noapidoc, ts_apidoc

if TYPE_CHECKING:
    ...
@ts_apidoc
class TSSymbol(Symbol["TSHasBlock", "TSCodeBlock"], Exportable):
    """A TypeScript symbol representing a code element with advanced manipulation capabilities.

    This class extends Symbol and Exportable to provide TypeScript-specific functionality for managing
    code symbols. It offers methods for handling imports, comments, code refactoring, and file operations
    like moving symbols between files while maintaining their dependencies and references.

    The class provides functionality for managing both inline and block comments, setting and retrieving
    import strings, and maintaining semicolon presence. It includes capabilities for moving symbols between
    files with options to handle dependencies and import strategy selection.
    """
    @reader
    def get_import_string(self, alias: str | None = ..., module: str | None = ..., import_type: ImportType = ..., is_type_import: bool = ...) -> str:
        """Generates the appropriate import string for a symbol.

        Constructs and returns an import statement string based on the provided parameters, formatting it according
        to TypeScript import syntax rules.

        Args:
            alias (str | None, optional): The alias to use for the imported symbol. Defaults to None.
            module (str | None, optional): The module to import from. If None, uses the file's import module name.
                Defaults to None.
            import_type (ImportType, optional): The type of import to generate (e.g., WILDCARD). Defaults to
                ImportType.UNKNOWN.
            is_type_import (bool, optional): Whether this is a type-only import. Defaults to False.

        Returns:
            str: A formatted import statement string.
        """
        ...
    
    @property
    @reader(cache=False)
    def extended_nodes(self) -> list[Editable]:
        """Returns the list of nodes associated with this symbol including extended nodes.

        This property returns a list of Editable nodes that includes any wrapping or extended symbols like `export`, `public`, or decorators.
        For example, if the symbol is within an `export_statement` or `lexical_declaration`, those nodes will be included in the list.

        Args:
            No arguments.

        Returns:
            list[Editable]: A list of Editable nodes including the symbol's extended nodes like export statements and decorators.
        """
        ...
    
    @property
    @reader
    def comment(self) -> TSCommentGroup | None:
        """Retrieves the comment group associated with the symbol.

        Returns the TSCommentGroup object that contains any comments associated with the symbol.
        A comment group represents one or more related comments that precede the symbol in the code.

        Returns:
            TSCommentGroup | None: The comment group for the symbol if one exists, None otherwise.
        """
        ...
    
    @property
    @reader
    def inline_comment(self) -> TSCommentGroup | None:
        """Property that retrieves the inline comment group associated with the symbol.

        Args:
            None

        Returns:
            TSCommentGroup | None: The inline comment group associated with the symbol if it exists,
                otherwise None.
        """
        ...
    
    @writer
    def set_comment(self, comment: str, auto_format: bool = ..., clean_format: bool = ..., comment_type: TSCommentType = ...) -> None:
        """Sets a comment to the symbol.

        Adds or updates a comment for a code symbol. If a comment already exists, it will be edited. If no
        comment exists, a new comment group will be created.

        Args:
            comment (str): The comment text to be added.
            auto_format (bool, optional): Whether to automatically format the text into a comment syntax.
                Defaults to True.
            clean_format (bool, optional): Whether to clean the format of the comment before inserting.
                Defaults to True.
            comment_type (TSCommentType, optional): The style of comment to add.
                Defaults to TSCommentType.DOUBLE_SLASH.

        Returns:
            None

        Raises:
            None
        """
        ...
    
    @writer
    def add_comment(self, comment: str, auto_format: bool = ..., clean_format: bool = ..., comment_type: TSCommentType = ...) -> None:
        """Adds a new comment to the symbol.

        Appends a comment to an existing comment group or creates a new comment group if none exists.

        Args:
            comment (str): The comment text to be added.
            auto_format (bool): Whether to automatically format the text into a comment style. Defaults to True.
            clean_format (bool): Whether to clean the format of the comment before inserting. Defaults to True.
            comment_type (TSCommentType): Type of comment to add. Defaults to TSCommentType.DOUBLE_SLASH.

        Returns:
            None

        Raises:
            None
        """
        ...
    
    @writer
    def set_inline_comment(self, comment: str, auto_format: bool = ..., clean_format: bool = ..., node: TSNode | None = ...) -> None:
        """Sets an inline comment to the symbol.

        Sets or replaces an inline comment for a symbol at its current position. If an inline comment
        already exists, it is replaced with the new comment. If no inline comment exists, a new one
        will be created adjacent to the symbol.

        Args:
            comment (str): The inline comment text to be added.
            auto_format (bool, optional): Whether to automatically format the text as a comment.
                Defaults to True.
            clean_format (bool, optional): Whether to clean the comment format before inserting.
                Defaults to True.
            node (TSNode | None, optional): The specific node to attach the comment to.
                Defaults to None.

        Returns:
            None

        Raises:
            None
        """
        ...
    
    @property
    @reader
    def semicolon_node(self) -> Editable | None:
        """Retrieves the semicolon node associated with a TypeScript symbol.

        A semicolon node is a TreeSitter node of type ';' that appears immediately after the symbol node.

        Returns:
            Editable | None: The semicolon node wrapped as an Editable if it exists, None otherwise.
        """
        ...
    
    @property
    @reader
    def has_semicolon(self) -> bool:
        """Checks whether the current symbol has a semicolon at the end.

        This property determines if a semicolon is present at the end of the symbol by checking
        if the semicolon_node property exists.

        Returns:
            bool: True if the symbol has a semicolon at the end, False otherwise.
        """
        ...
    
    @noapidoc
    def convert_to_react_interface(self) -> str | None:
        ...
    


