from collections.abc import MutableMapping
from typing import Generic, Iterable, Optional, Protocol, SupportsIndex, TypeVar

from fastomit.types import ListStr, bool_opt

T = TypeVar("T")

def reset_trusted(): ...
def reset_omissions(): ...
def always_omit(targets: ListStr): ...
def always_trust(targets: ListStr): ...
def globally_hidden() -> ListStr: ...
def globally_trusted() -> ListStr: ...
def hide(target: str) -> str: ...

class ListLike(Generic[T], Iterable, SupportsIndex): ...

class OmitterType(Protocol):
    def omit(self, target: MutableMapping) -> dict: ...
    def omit_recurse(self, target: ListLike, do: bool_opt = True) -> ListLike: ...
    def should_hide(self, key: str) -> bool: ...

class Omitter(OmitterType):
    omissions: ListStr
    def __init__(self, omissions: Optional[ListStr] = None) -> None: ...

class NoTrustOmitter(OmitterType):
    trusted: ListStr
    def __init__(self, omissions: Optional[ListStr] = None) -> None: ...
