package com.maniu.mn_vip_jetpack_all.databinding;
import com.maniu.mn_vip_jetpack_all.R;
import com.maniu.mn_vip_jetpack_all.BR;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import android.view.View;
@SuppressWarnings("unchecked")
public class ActivityLoginBindingImpl extends ActivityLoginBinding  {

    @Nullable
    private static final androidx.databinding.ViewDataBinding.IncludedLayouts sIncludes;
    @Nullable
    private static final android.util.SparseIntArray sViewsWithIds;
    static {
        sIncludes = null;
        sViewsWithIds = null;
    }
    // views
    @NonNull
    private final android.widget.RelativeLayout mboundView0;
    @NonNull
    private final android.widget.EditText mboundView1;
    @NonNull
    private final android.widget.EditText mboundView2;
    // variables
    // values
    // listeners
    // Inverse Binding Event Handlers
    private androidx.databinding.InverseBindingListener mboundView1androidTextAttrChanged = new androidx.databinding.InverseBindingListener() {
        @Override
        public void onChange() {
            // Inverse of viewModel.user.getValue().account
            //         is viewModel.user.getValue().setAccount((java.lang.String) callbackArg_0)
            java.lang.String callbackArg_0 = androidx.databinding.adapters.TextViewBindingAdapter.getTextString(mboundView1);
            // localize variables for thread safety
            // viewModel.user.getValue()
            com.maniu.lib_cache.model.User viewModelUserGetValue = null;
            // viewModel.user.getValue().account
            java.lang.String viewModelUserAccount = null;
            // viewModel.user.getValue() != null
            boolean viewModelUserGetValueJavaLangObjectNull = false;
            // viewModel
            com.maniu.lib_cache.view_model.LoginActivityViewModel viewModel = mViewModel;
            // viewModel != null
            boolean viewModelJavaLangObjectNull = false;
            // viewModel.user
            androidx.lifecycle.MutableLiveData<com.maniu.lib_cache.model.User> viewModelUser = null;
            // viewModel.user != null
            boolean viewModelUserJavaLangObjectNull = false;



            viewModelJavaLangObjectNull = (viewModel) != (null);
            if (viewModelJavaLangObjectNull) {


                viewModelUser = viewModel.getUser();

                viewModelUserJavaLangObjectNull = (viewModelUser) != (null);
                if (viewModelUserJavaLangObjectNull) {


                    viewModelUserGetValue = viewModelUser.getValue();

                    viewModelUserGetValueJavaLangObjectNull = (viewModelUserGetValue) != (null);
                    if (viewModelUserGetValueJavaLangObjectNull) {




                        viewModelUserGetValue.setAccount(((java.lang.String) (callbackArg_0)));
                    }
                }
            }
        }
    };
    private androidx.databinding.InverseBindingListener mboundView2androidTextAttrChanged = new androidx.databinding.InverseBindingListener() {
        @Override
        public void onChange() {
            // Inverse of viewModel.user.getValue().passWord
            //         is viewModel.user.getValue().setPassWord((java.lang.String) callbackArg_0)
            java.lang.String callbackArg_0 = androidx.databinding.adapters.TextViewBindingAdapter.getTextString(mboundView2);
            // localize variables for thread safety
            // viewModel.user.getValue().passWord
            java.lang.String viewModelUserPassWord = null;
            // viewModel.user.getValue()
            com.maniu.lib_cache.model.User viewModelUserGetValue = null;
            // viewModel.user.getValue() != null
            boolean viewModelUserGetValueJavaLangObjectNull = false;
            // viewModel
            com.maniu.lib_cache.view_model.LoginActivityViewModel viewModel = mViewModel;
            // viewModel != null
            boolean viewModelJavaLangObjectNull = false;
            // viewModel.user
            androidx.lifecycle.MutableLiveData<com.maniu.lib_cache.model.User> viewModelUser = null;
            // viewModel.user != null
            boolean viewModelUserJavaLangObjectNull = false;



            viewModelJavaLangObjectNull = (viewModel) != (null);
            if (viewModelJavaLangObjectNull) {


                viewModelUser = viewModel.getUser();

                viewModelUserJavaLangObjectNull = (viewModelUser) != (null);
                if (viewModelUserJavaLangObjectNull) {


                    viewModelUserGetValue = viewModelUser.getValue();

                    viewModelUserGetValueJavaLangObjectNull = (viewModelUserGetValue) != (null);
                    if (viewModelUserGetValueJavaLangObjectNull) {




                        viewModelUserGetValue.setPassWord(((java.lang.String) (callbackArg_0)));
                    }
                }
            }
        }
    };

    public ActivityLoginBindingImpl(@Nullable androidx.databinding.DataBindingComponent bindingComponent, @NonNull View root) {
        this(bindingComponent, root, mapBindings(bindingComponent, root, 3, sIncludes, sViewsWithIds));
    }
    private ActivityLoginBindingImpl(androidx.databinding.DataBindingComponent bindingComponent, View root, Object[] bindings) {
        super(bindingComponent, root, 2
            );
        this.mboundView0 = (android.widget.RelativeLayout) bindings[0];
        this.mboundView0.setTag(null);
        this.mboundView1 = (android.widget.EditText) bindings[1];
        this.mboundView1.setTag(null);
        this.mboundView2 = (android.widget.EditText) bindings[2];
        this.mboundView2.setTag(null);
        setRootTag(root);
        // listeners
        invalidateAll();
    }

    @Override
    public void invalidateAll() {
        synchronized(this) {
                mDirtyFlags = 0x20L;
        }
        requestRebind();
    }

    @Override
    public boolean hasPendingBindings() {
        synchronized(this) {
            if (mDirtyFlags != 0) {
                return true;
            }
        }
        return false;
    }

    @Override
    public boolean setVariable(int variableId, @Nullable Object variable)  {
        boolean variableSet = true;
        if (BR.viewModel == variableId) {
            setViewModel((com.maniu.lib_cache.view_model.LoginActivityViewModel) variable);
        }
        else {
            variableSet = false;
        }
            return variableSet;
    }

    public void setViewModel(@Nullable com.maniu.lib_cache.view_model.LoginActivityViewModel ViewModel) {
        this.mViewModel = ViewModel;
        synchronized(this) {
            mDirtyFlags |= 0x4L;
        }
        notifyPropertyChanged(BR.viewModel);
        super.requestRebind();
    }

    @Override
    protected boolean onFieldChange(int localFieldId, Object object, int fieldId) {
        switch (localFieldId) {
            case 0 :
                return onChangeViewModelUserGetValue((com.maniu.lib_cache.model.User) object, fieldId);
            case 1 :
                return onChangeViewModelUser((androidx.lifecycle.MutableLiveData<com.maniu.lib_cache.model.User>) object, fieldId);
        }
        return false;
    }
    private boolean onChangeViewModelUserGetValue(com.maniu.lib_cache.model.User ViewModelUserGetValue, int fieldId) {
        if (fieldId == BR._all) {
            synchronized(this) {
                    mDirtyFlags |= 0x1L;
            }
            return true;
        }
        else if (fieldId == BR.account) {
            synchronized(this) {
                    mDirtyFlags |= 0x8L;
            }
            return true;
        }
        else if (fieldId == BR.passWord) {
            synchronized(this) {
                    mDirtyFlags |= 0x10L;
            }
            return true;
        }
        return false;
    }
    private boolean onChangeViewModelUser(androidx.lifecycle.MutableLiveData<com.maniu.lib_cache.model.User> ViewModelUser, int fieldId) {
        if (fieldId == BR._all) {
            synchronized(this) {
                    mDirtyFlags |= 0x2L;
            }
            return true;
        }
        return false;
    }

    @Override
    protected void executeBindings() {
        long dirtyFlags = 0;
        synchronized(this) {
            dirtyFlags = mDirtyFlags;
            mDirtyFlags = 0;
        }
        java.lang.String viewModelUserPassWord = null;
        com.maniu.lib_cache.model.User viewModelUserGetValue = null;
        java.lang.String viewModelUserAccount = null;
        com.maniu.lib_cache.view_model.LoginActivityViewModel viewModel = mViewModel;
        androidx.lifecycle.MutableLiveData<com.maniu.lib_cache.model.User> viewModelUser = null;

        if ((dirtyFlags & 0x3fL) != 0) {



                if (viewModel != null) {
                    // read viewModel.user
                    viewModelUser = viewModel.getUser();
                }
                updateLiveDataRegistration(1, viewModelUser);


                if (viewModelUser != null) {
                    // read viewModel.user.getValue()
                    viewModelUserGetValue = viewModelUser.getValue();
                }
                updateRegistration(0, viewModelUserGetValue);

            if ((dirtyFlags & 0x37L) != 0) {

                    if (viewModelUserGetValue != null) {
                        // read viewModel.user.getValue().passWord
                        viewModelUserPassWord = viewModelUserGetValue.getPassWord();
                    }
            }
            if ((dirtyFlags & 0x2fL) != 0) {

                    if (viewModelUserGetValue != null) {
                        // read viewModel.user.getValue().account
                        viewModelUserAccount = viewModelUserGetValue.getAccount();
                    }
            }
        }
        // batch finished
        if ((dirtyFlags & 0x2fL) != 0) {
            // api target 1

            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.mboundView1, viewModelUserAccount);
        }
        if ((dirtyFlags & 0x20L) != 0) {
            // api target 1

            androidx.databinding.adapters.TextViewBindingAdapter.setTextWatcher(this.mboundView1, (androidx.databinding.adapters.TextViewBindingAdapter.BeforeTextChanged)null, (androidx.databinding.adapters.TextViewBindingAdapter.OnTextChanged)null, (androidx.databinding.adapters.TextViewBindingAdapter.AfterTextChanged)null, mboundView1androidTextAttrChanged);
            androidx.databinding.adapters.TextViewBindingAdapter.setTextWatcher(this.mboundView2, (androidx.databinding.adapters.TextViewBindingAdapter.BeforeTextChanged)null, (androidx.databinding.adapters.TextViewBindingAdapter.OnTextChanged)null, (androidx.databinding.adapters.TextViewBindingAdapter.AfterTextChanged)null, mboundView2androidTextAttrChanged);
        }
        if ((dirtyFlags & 0x37L) != 0) {
            // api target 1

            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.mboundView2, viewModelUserPassWord);
        }
    }
    // Listener Stub Implementations
    // callback impls
    // dirty flag
    private  long mDirtyFlags = 0xffffffffffffffffL;
    /* flag mapping
        flag 0 (0x1L): viewModel.user.getValue()
        flag 1 (0x2L): viewModel.user
        flag 2 (0x3L): viewModel
        flag 3 (0x4L): viewModel.user.getValue().account
        flag 4 (0x5L): viewModel.user.getValue().passWord
        flag 5 (0x6L): null
    flag mapping end*/
    //end
}