"""
Permissions pyi file.
"""
from typing import Any, Union

from curious.dataclasses.channel import Channel
from curious.dataclasses.member import Member
from curious.dataclasses.role import Role


class Permissions(object):
    __slots__ = 'bitfield',
    def __new__(cls, value: int, **kwargs): ...
    def __init__(self, value: int, **kwargs):
        self.bitfield: int = value

    def _get_bit(self, bit: int) -> bool: ...
    def _set_bit(self, bit: int, value: bool): ...
    def __repr__(self) -> str: ...

    @classmethod
    def all(cls) -> Permissions: ...
    @classmethod
    def none(cls) -> Permissions: ...

    def raise_for_permission(self, permission: Union[str, int]) -> None: ...

    @property
    def create_instant_invite(self) -> bool: ...
    @property
    def kick_members(self) -> bool: ...
    @property
    def ban_members(self) -> bool: ...
    @property
    def administrator(self) -> bool: ...
    @property
    def manage_channels(self) -> bool: ...
    @property
    def manage_server(self) -> bool: ...
    @property
    def add_reactions(self) -> bool: ...
    @property
    def view_audit_log(self) -> bool: ...
    @property
    def read_messages(self) -> bool: ...
    @property
    def send_messages(self) -> bool: ...
    @property
    def send_tts_messages(self) -> bool: ...
    @property
    def manage_messages(self) -> bool: ...
    @property
    def embed_links(self) -> bool: ...
    @property
    def attach_files(self) -> bool: ...
    @property
    def read_message_history(self) -> bool: ...
    @property
    def mention_everyone(self) -> bool: ...
    @property
    def use_external_emojis(self) -> bool: ...
    @property
    def voice_connect(self) -> bool: ...
    @property
    def voice_speak(self) -> bool: ...
    @property
    def voice_mute_members(self) -> bool: ...
    @property
    def voice_deafen_members(self) -> bool: ...
    @property
    def voice_move_members(self) -> bool: ...
    @property
    def voice_use_voice_activation(self) -> bool: ...
    @property
    def change_nickname(self) -> bool: ...
    @property
    def manage_nicknames(self) -> bool: ...
    @property
    def manage_roles(self) -> bool: ...
    @property
    def manage_webhooks(self) -> bool: ...
    @property
    def manage_emojis(self) -> bool: ...


class Overwrite(object):
     __slots__ = "target", "channel_id", "allow", "deny"

     def __init__(self, allow: Union[int, Permissions], deny: Union[int, Permissions],
                  obb: Union[Member, Role],
                  channel_id: int = None):
         self.allow = allow
         self.deny = deny
         self.target = obb
         self.channel_id = channel_id
     def __repr__(self) -> str: ...
     def __getattr__(self, item) -> bool: ...
     def __setattr__(self, item: str, value: Any): ...
     @property
     def channel(self) -> Channel: ...