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

from typing import Generic, TYPE_CHECKING, TypeVar
from graph_sitter.core.autocommit import reader
from graph_sitter.core.interfaces.usable import Usable
from graph_sitter.enums import ImportType
from graph_sitter.writer_decorators import apidoc
from graph_sitter.core.export import Export
from graph_sitter.core.interfaces.editable import Editable

if TYPE_CHECKING:
    ...
Parent = TypeVar("Parent", bound="Editable")
@apidoc
class Exportable(Usable[Parent], Generic[Parent]):
    """An interface for any node object that can be exported
    eg. Class, class name,  top-level functions, imports
    """
    @property
    def is_exported(self) -> bool:
        """Indicates if the symbol is exported from its defining file.

        Returns:
            bool: True if the symbol has an export object, False otherwise.
        """
        ...
    
    @property
    @reader(cache=False)
    def export(self) -> Export | None:
        """Returns the export object that exports this symbol.

        Retrieves the export object by examining incoming EXPORT edges in the CodebaseGraph.

        Args:
            None

        Returns:
            Export | None: The Export object that exports this symbol, or None if not exported.
        """
        ...
    
    @property
    @reader(cache=False)
    def exported_name(self) -> str | None:
        """Retrieves the exported name of a symbol from its file.

        If the symbol is an export node, returns the node's name. If the symbol is not exported, returns None.

        Returns:
            str | None: The name the symbol is exported as, or None if not exported.
        """
        ...
    
    @property
    @reader
    def is_reexported(self) -> bool:
        """Determines if the symbol is re-exported from a different file.

        A re-export occurs when a symbol is imported into a file and then exported
        from that same file.

        Returns:
            bool: True if the symbol is re-exported from a different file than where
            it was defined, False otherwise.
        """
        ...
    
    @reader
    def get_import_string(self, alias: str | None = ..., module: str | None = ..., import_type: ImportType = ..., is_type_import: bool = ...) -> str:
        """Returns the import string for a symbol.

        Generates the import statement needed to import a symbol from its module.

        Args:
            alias (str | None): Optional alias for the symbol.
            module (str | None): Optional module name to import from.
            import_type (ImportType): Type of import to generate.
            is_type_import (bool): Indicates if it's a type-only import.

        Returns:
            str: The formatted import string.

        Raises:
            NotImplementedError: If called on the base class.
        """
        ...
    


