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

from typing import TYPE_CHECKING
from tree_sitter import Node as TSNode
from graph_sitter.codebase.codebase_graph import CodebaseGraph
from graph_sitter.core.interfaces.has_name import HasName
from graph_sitter.core.node_id_factory import NodeId
from graph_sitter.core.statements.statement import Statement
from graph_sitter.core.symbol import Symbol
from graph_sitter.extensions.utils import cached_property
from graph_sitter.typescript.class_definition import TSClass
from graph_sitter.typescript.enum_definition import TSEnum
from graph_sitter.typescript.function import TSFunction
from graph_sitter.typescript.interface import TSInterface
from graph_sitter.typescript.interfaces.has_block import TSHasBlock
from graph_sitter.typescript.symbol import TSSymbol
from graph_sitter.typescript.type_alias import TSTypeAlias
from graph_sitter.writer_decorators import ts_apidoc
from graph_sitter.typescript.detached_symbols.code_block import TSCodeBlock

if TYPE_CHECKING:
    ...
@ts_apidoc
class TSNamespace(TSSymbol, TSHasBlock, HasName):
    """Representation of a namespace module in TypeScript"""
    symbol_type = ...
    code_block: TSCodeBlock
    def __init__(self, ts_node: TSNode, file_id: NodeId, G: CodebaseGraph, parent: Statement, namespace_node: TSNode | None = ...) -> None:
        ...
    
    @cached_property
    def symbols(self) -> list[Symbol]:
        """Returns all symbols defined within this namespace, including nested ones."""
        ...
    
    def get_symbol(self, name: str, recursive: bool = ...) -> Symbol | None:
        """Get a symbol by name from this namespace.

        Args:
            name: Name of the symbol to find
            recursive: If True, also search in nested namespaces

        Returns:
            Symbol | None: The found symbol, or None if not found
        """
        ...
    
    @cached_property
    def functions(self) -> list[TSFunction]:
        """Get all functions defined in this namespace.

        Returns:
            List of Function objects in this namespace
        """
        ...
    
    def get_function(self, name: str, recursive: bool = ..., use_full_name: bool = ...) -> TSFunction | None:
        """Get a function by name from this namespace.

        Args:
            name: Name of the function to find (can be fully qualified like 'Outer.Inner.func')
            recursive: If True, also search in nested namespaces
            use_full_name: If True, match against the full qualified name

        Returns:
            TSFunction | None: The found function, or None if not found
        """
        ...
    
    @cached_property
    def classes(self) -> list[TSClass]:
        """Get all classes defined in this namespace.

        Returns:
            List of Class objects in this namespace
        """
        ...
    
    def get_class(self, name: str, recursive: bool = ...) -> TSClass | None:
        """Get a class by name from this namespace.

        Args:
            name: Name of the class to find
            recursive: If True, also search in nested namespaces
        """
        ...
    
    def get_interface(self, name: str, recursive: bool = ...) -> TSInterface | None:
        """Get an interface by name from this namespace.

        Args:
            name: Name of the interface to find
            recursive: If True, also search in nested namespaces
        """
        ...
    
    def get_type(self, name: str, recursive: bool = ...) -> TSTypeAlias | None:
        """Get a type alias by name from this namespace.

        Args:
            name: Name of the type to find
            recursive: If True, also search in nested namespaces
        """
        ...
    
    def get_enum(self, name: str, recursive: bool = ...) -> TSEnum | None:
        """Get an enum by name from this namespace.

        Args:
            name: Name of the enum to find
            recursive: If True, also search in nested namespaces
        """
        ...
    
    def get_namespace(self, name: str, recursive: bool = ...) -> TSNamespace | None:
        """Get a namespace by name from this namespace.

        Args:
            name: Name of the namespace to find
            recursive: If True, also search in nested namespaces

        Returns:
            TSNamespace | None: The found namespace, or None if not found
        """
        ...
    
    def get_nested_namespaces(self) -> list[TSNamespace]:
        """Get all nested namespaces within this namespace.

        Returns:
            list[TSNamespace]: List of all nested namespace objects
        """
        ...
    


