from ._api import Yuuz12Api
from typing import overload

from ..models import ResponseModel


class User(Yuuz12Api):
    """用户类"""
    def __init__(self, **kwargs): ...
    """新建用户"""
    async def insert_user(self, qq: int, group: int = 1): ...
    """获取用户数据"""
    async def get_user_info(self, qq: int = None, kook_id: int = None, telegram_name: str = None): ...
    @overload
    async def get_user_info(self, qq: int): ...
    @overload
    async def get_user_info(self, kook_id: int): ...
    @overload
    async def get_user_info(self, telegram_name: str): ...
    """每日签到"""
    async def update_user_check(self, qq: int, type: int = 0, favorability: int = 1, coin: int = 5): ...
    """获取每日签到排行"""
    async def get_user_check_rank(self, quantity: int = 5): ...
    """获取所有用户通用货币"""
    async def get_all_user_coin(self): ...
    """更新用户昵称"""
    async def update_user_name(self, qq: int, name: str): ...
    """更新用户 Telegram 昵称"""
    async def update_user_telegram_name(self, qq: int, telegram_name: str): ...
    """更新用户 KOOK 昵称"""
    async def update_user_kook_id(self, qq: int, kook_id: int): ...
    """更新用户 osu 昵称"""
    async def update_user_osu_name(self, qq: int, osu_name: str): ...
    """更新用户 osu 模式"""
    async def update_osu_mode(self, qq: int, osu_mode: str): ...
    """更新用户FSTSkin账号"""
    async def update_user_fst_email(self, qq: int, fst_email: str): ...
    """更新用户通用货币"""
    async def update_user_coin(self, qq: int, type: int = 1, coin: int = 0): ...
    """更新用户好感度"""
    async def update_user_favorability(self, qq: int, type: int = 1, favorability: float = 0): ...
    """更新用户组"""
    async def update_user_group(self, qq: int, group: int = 1): ...
    """设置用户通用货币"""
    async def set_user_coin(self, qq: int, coin: int): ...
    """设置用户好感度"""
    async def set_user_favorability(self, qq: int, favorability: float): ...
    """购买道具"""
    async def update_buy_item(self, qq: int, name: str, quantity: int): ...
    """使用道具"""
    async def update_use_item(self, qq: int, name: str): ...

    @property
    def data(self) -> dict: ...
    @property
    def raw_code(self) -> int: ...
    @property
    def error(self) -> bool: ...
    @property
    def model(self) -> "ResponseModel": ...


class UserCheck:
    """用户签到类"""
    def __init__(self, **kwargs): ...
    """生成每日签到图"""
    async def get(self, qq: int, favorability: float = 1, coin: int = 5): ...
    """上传每日签到图头图"""
    async def upload_cover(self, qq: int, url: str): ...
    """上传每日签到图底图"""
    async def upload_bottom(self, qq: int, url: str): ...
    """更新每日签到图头图审核状态"""
    async def update_cover_status(self, qq: int, type: int = 0): ...
    """更新每日签到图底图审核状态"""
    async def update_bottom_status(self, qq: int, type: int = 0): ...
    """更新每日签到图头图模糊状态"""
    async def update_cover_blur(self, qq: int, type: int = 0): ...

    @property
    def raw(self) -> bytes: ...
    @property
    def data(self) -> dict: ...
    @property
    def raw_code(self) -> int: ...
    @property
    def error(self) -> bool: ...
    @property
    def model(self) -> "ResponseModel": ...
