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

from typing import Generic, Self, TYPE_CHECKING, TypeVar, override
from graph_sitter._proxy import proxy_property
from graph_sitter.core.autocommit import reader
from graph_sitter.core.detached_symbols.code_block import CodeBlock
from graph_sitter.core.expressions.type import Type
from graph_sitter.core.function import Function
from graph_sitter.core.interfaces.has_attribute import HasAttribute
from graph_sitter.core.interfaces.has_block import HasBlock
from graph_sitter.core.interfaces.inherits import Inherits
from graph_sitter.core.statements.attribute import Attribute
from graph_sitter.core.symbol_groups.parents import Parents
from graph_sitter.extensions.autocommit import commiter
from graph_sitter.writer_decorators import noapidoc
from graph_sitter.core.class_definition import Class

if TYPE_CHECKING:
    ...
TCodeBlock = TypeVar("TCodeBlock", bound="CodeBlock")
TAttribute = TypeVar("TAttribute", bound="Attribute")
TFunction = TypeVar("TFunction", bound="Function")
TType = TypeVar("TType", bound="Type")
class Interface(Inherits, HasBlock, HasAttribute[TAttribute], Generic[TCodeBlock, TAttribute, TFunction, TType]):
    """Abstract representation of an Interface class.

    Attributes:
        parent_interfaces: All the interfaces that this interface extends.
    """
    symbol_type = ...
    parent_interfaces: Parents[TType, Self] | None = ...
    code_block: TCodeBlock
    @noapidoc
    @commiter
    def compute_superclass_dependencies(self) -> None:
        ...
    
    @property
    @reader
    def attributes(self) -> list[TAttribute]:
        """List of attributes defined in this Interface."""
        ...
    
    @reader
    def get_attribute(self, name: str) -> TAttribute | None:
        """Returns the attribute with the given name, if it exists.

        Otherwise, returns None.
        """
        ...
    
    @reader
    def extends(self, parent_interface: str | Interface, max_depth: int | None = ...) -> bool:
        """Returns True if the interface implements the given parent interface."""
        ...
    
    @proxy_property
    @reader
    def implementations(self, max_depth: int | None = ...) -> list[Interface | Class]:
        """Returns all classes and interfaces that implement a given interface.

        Note:
        This method can be called as both a property or a method. If used as a property, it is equivalent to invoking it without arguments.
        """
        ...
    
    @noapidoc
    @reader
    @override
    def resolve_attribute(self, name: str) -> TAttribute | None:
        ...
    


