from typing import Any, Generic, Optional, Protocol, Type, TypeVar

from kolga.plugins.base import PluginBase

T_HookSpec = TypeVar("T_HookSpec")

class HookimplMarker:
    def __init__(self, name: str) -> None: ...

class HookspecMarker:
    def __init__(self, name: str) -> None: ...

class PluginManager(Generic[T_HookSpec]):
    hook: T_HookSpec
    def __init__(self, name: str) -> None: ...
    def add_hookspecs(self, module_or_class: Type[T_HookSpec]) -> None: ...
    def get_plugin(self, name: str) -> "PluginBase": ...
    def register(self, plugin: "PluginBase", name: Optional[str] = None) -> str: ...
    def unregister(
        self, plugin: Optional["PluginBase"] = None, name: Optional[str] = None
    ) -> "PluginBase": ...
