from typing import Any

from wagtail.rich_text import EntityHandler

class FeatureRegistry:
    has_scanned_for_features: bool
    plugins_by_editor: dict[str, dict[str, Any]]
    default_features: list[str]
    link_types: dict[str, type[EntityHandler]]
    embed_types: dict[str, type[EntityHandler]]
    converter_rules_by_converter: dict[str, dict[str, Any]]
    def __init__(self) -> None: ...
    def get_default_features(self) -> list[str]: ...
    def register_editor_plugin(self, editor_name: str, feature_name: str, plugin: Any) -> None: ...
    def get_editor_plugin(self, editor_name: str, feature_name: str) -> Any | None: ...
    def register_link_type(self, handler: type[EntityHandler]) -> None: ...
    def get_link_types(self) -> dict[str, type[EntityHandler]]: ...
    def register_embed_type(self, handler: type[EntityHandler]) -> None: ...
    def get_embed_types(self) -> dict[str, type[EntityHandler]]: ...
    def register_converter_rule(self, converter_name: str, feature_name: str, rule: Any) -> None: ...
    def get_converter_rule(self, converter_name: str, feature_name: str) -> Any | None: ...
    @staticmethod
    def function_as_entity_handler(identifier: str, fn: Any) -> type: ...
