from typing import BinaryIO, Literal
from vk_api import VkApi
from vk_api.vk_api import VkApiMethod


class VkUpload:
    def __init__(self, vk: VkApi | VkApiMethod) -> None: ...

    def photo(self, photos: str | list[str] | BinaryIO | list[BinaryIO], album_id: str | int,
              latitude: float | int = ..., longitude: float | int = ...,
              caption: str = ..., description: str = ...,
              group_id: str | int = ...) -> list[dict]: ...

    def photo_messages(self, photos: str | list[str] | BinaryIO |
                       list[BinaryIO], peer_id: int = ...) -> list[dict]: ...

    def photo_group_widget(self, photo: str | BinaryIO, image_type: str) -> dict: ...

    def photo_profile(self, photo: str | BinaryIO, owner_id: str | int = ...,
                      crop_x: int = ..., crop_y: int = ...,
                      crop_width: int = ...) -> dict: ...

    def photo_chat(self, photo: str | BinaryIO, chat_id: int) -> dict: ...

    def photo_wall(self, photos: str | list[str] | BinaryIO | list[BinaryIO],
                   user_id: int = ..., group_id: int = ..., caption: str = ...) -> list[dict]: ...

    def photo_market(self, photo: str | list[str] | BinaryIO |
                     list[BinaryIO], group_id: int, main_photo: bool = False,
                     crop_x: int = ..., crop_y: int = ..., crop_width: int = ...) -> list[dict]: ...

    def photo_market_album(self, photo: str | list[str] | BinaryIO |
                           list[BinaryIO], group_id: int) -> list[dict]: ...

    def audio(self, audio: str | BinaryIO, artist: str, title: str) -> list[dict]: ...

    def video(self, video_file: str | BinaryIO = ..., link: str = ..., name: str = ..., description: str = ...,
              is_private: bool = ..., wallpost: bool = ..., group_id: int = ...,
              album_id: int = ..., privacy_view: list = ..., privacy_comment: list = ...,
              no_comments: bool = ..., repeat: bool = ...) -> dict: ...

    def document(self, doc: str | BinaryIO, title: str = ..., tags: str = ...,
                 group_id: int = ...,
                 to_wall: bool = False, message_peer_id: int = ...,
                 doc_type: Literal["doc", "audio_message", "graffiti"] = ...
                 ) -> list[dict]: ...

    def document_wall(self, doc: BinaryIO | str, title: str = ...,
                      tags: str = ..., group_id: int = ...) -> list[dict]: ...

    def document_message(self, doc: BinaryIO | str, title: str = ...,
                         tags: str = ..., peer_id: int = ...) -> list[dict]: ...

    def audio_message(self, audio: BinaryIO | str, peer_id: int = ...,
                      group_id: int = ...) -> list[dict]: ...

    def graffiti(self, image: BinaryIO | str, peer_id: int = ...,
                 group_id: int = ...) -> list[dict]: ...

    def photo_cover(self, photo: BinaryIO | str, group_id: int,
                    crop_x: int = ..., crop_y: int = ...,
                    crop_x2: int = ..., crop_y2: int = ...) -> list[dict]: ...

    def story(self, file: str | BinaryIO,
              file_type: Literal["photo", "video"], add_to_news: bool = True,
              user_ids: list[int] = ...,
              reply_to_story: int = ..., link_text: str = ...,
              link_url: str = ..., group_id: int = ...): ...


class FilesOpener:
    def __init__(self, paths: str | list[str] | BinaryIO | list[BinaryIO], key_format: str = 'file{}') -> None: ...
    def __enter__(self): ...
    def __exit__(self, type, value, traceback): ...
    def open_files(self): ...
    def close_files(self): ...
