package com.fastcashier.lib_common.function.account

object AccountService {

    private var selfCashierAccountInfo: SelfCashierAccountInfo? = null;
    private var userName: String? = ""
    private var accountPassword: String? = ""

    fun setAccountInfo(selfCashierAccountInfo: SelfCashierAccountInfo?) {
        this.selfCashierAccountInfo = selfCashierAccountInfo
    }

    fun getAccountInfo(): SelfCashierAccountInfo? {
        return selfCashierAccountInfo;
    }

    fun setUserName(userName: String) {
        this.userName = userName
    }

    fun getUserName(): String {
        return userName.toString();
    }

    fun getAccountPassword(): String {
        return accountPassword.toString();
    }

    fun setAccountPassword(accountPassword: String) {
        this.accountPassword = accountPassword
    }

    fun clear() {
        selfCashierAccountInfo = null
        userName = ""
        accountPassword = ""
    }

    fun init(selfCashierAccountInfo: SelfCashierAccountInfo?, userName: String) {
        this.selfCashierAccountInfo = selfCashierAccountInfo
        this.userName = userName
    }
}