from api_validations.core_validations import BaseModelRegular
from typing import Optional
from pydantic import BaseModel


class ChangePasswordValidation:
    tr = {"old_password": "Eski Şifre", "new_password": "Yeni Şifre"}
    en = {"old_password": "Old Password", "new_password": "New Password"}


class ChangePassword(BaseModelRegular, ChangePasswordValidation):
    old_password: str
    new_password: str


class CreatePasswordValidation:
    tr = {
        "password_token": "Şifre Token",
        "password": "Şifre",
        "re_password": "Şifre Tekrar",
    }
    en = {
        "password_token": "Password Token",
        "password": "Password",
        "re_password": "Re-Password",
    }


class CreatePassword(BaseModelRegular, CreatePasswordValidation):
    password_token: str
    password: str
    re_password: str


class OccupantSelectionValidation:

    tr = {"occupant_uu_id": "Kiracı UU ID", "build_part_uu_id": "Bölüm UU ID"}
    en = {"occupant_uu_id": "Occupant UU ID", "build_part_uu_id": "Build Part UU ID"}


class OccupantSelection(BaseModel, OccupantSelectionValidation):
    occupant_uu_id: str
    build_part_uu_id: str


class EmployeeSelectionValidation:

    tr = {"company_uu_id": "Şirket UU ID"}
    en = {"company_uu_id": "Company UU ID"}


class EmployeeSelection(BaseModel, EmployeeSelectionValidation):
    company_uu_id: str


class LoginValidation:
    tr = {
        "domain": "Domain",
        "access_key": "Erişim Anahtarı",
        "password": "Şifre",
        "remember_me": "Beni Hatırla",
    }
    en = {
        "domain": "Domain",
        "access_key": "Access Key",
        "password": "Password",
        "remember_me": "Remember Me",
    }


class Login(BaseModelRegular, LoginValidation):
    domain: str
    access_key: str
    password: str
    remember_me: Optional[bool] = False


class LogoutValidation:
    tr = {"domain": "Domain"}
    en = {"domain": "Domain"}


class Logout(BaseModelRegular, LogoutValidation):
    domain: str


class RememberValidation:
    tr = {"domain": "Domain", "refresh_token": "Yenileme Anahtarı"}
    en = {"domain": "Domain", "refresh_token": "Refresh Token"}


class Remember(BaseModelRegular, RememberValidation):
    domain: str
    refresh_token: str


class ForgotValidation:
    tr = {"domain": "Domain", "access_key": "Erişim Anahtarı"}
    en = {"domain": "Domain", "access_key": "Access Key"}


class Forgot(BaseModelRegular, ForgotValidation):
    domain: str
    access_key: str
