package com.yidianling.user.ui.login.contract

import com.ydl.ydlcommon.data.http.BaseResponse
import com.ydl.ydlcommon.mvp.base.IModel
import com.ydl.ydlcommon.mvp.base.IPresenter
import com.ydl.ydlcommon.mvp.base.IView
import com.yidianling.user.http.request.BindPhoneJavaParam
import com.yidianling.user.http.response.ChcekPhoneResponeBean
import io.reactivex.Observable

/**
 * @author jiucheng
 * @描述:新版登录注册约束类
 * @Copyright Copyright (c) 2018
 * @Company 壹点灵
 * @date 2018/11/28
 */
interface ILoginContract {

    interface View : IView {
        /**
         * 菊花条
         */
        fun showLoading(state: Boolean)

        /**
         * 显示进度条
         */
        fun showProgressView()

        /**
         * 关闭进度条
         */
        fun dismissProgressView()


        /**
         * 弹窗
         */
        fun showNormalDialog()


        /**
         * 校验手机号(是否是用户版号码、是否有设置密码、是否被绑定)成功
         */
        fun checkPhoneStatusSuccess(bean: ChcekPhoneResponeBean?, phone: String)



        /**
         * sdk
         *自动登录成功
         */
        fun autoLoginSuccess()


    }

    interface Presenter : IPresenter< View> {


        /**
         * 校验手机号：是否是用户版号码、是否有设置密码、是否被绑定
         */
        fun checkPhoneStatus(phone: String, countryCode: String, isBind: Boolean)
    }

    interface Model : IModel {

        /**
         * 校验手机号：是否是用户版号码、是否有设置密码、是否被绑定
         */
        fun checkPhoneStatus(phone: String, countryCode: String): Observable<BaseResponse<ChcekPhoneResponeBean>>

    }
}
