package com.toughra.ustadmobile.databinding;
import com.toughra.ustadmobile.R;
import com.toughra.ustadmobile.BR;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import android.view.View;
@SuppressWarnings("unchecked")
public class FragmentPersonAccountEditBindingImpl extends FragmentPersonAccountEditBinding  {

    @Nullable
    private static final androidx.databinding.ViewDataBinding.IncludedLayouts sIncludes;
    @Nullable
    private static final android.util.SparseIntArray sViewsWithIds;
    static {
        sIncludes = null;
        sViewsWithIds = new android.util.SparseIntArray();
        sViewsWithIds.put(R.id.error_text, 9);
    }
    // views
    @NonNull
    private final androidx.core.widget.NestedScrollView mboundView0;
    // variables
    // values
    // listeners
    // Inverse Binding Event Handlers
    private androidx.databinding.InverseBindingListener accountUsernameTextandroidTextAttrChanged = new androidx.databinding.InverseBindingListener() {
        @Override
        public void onChange() {
            // Inverse of person.username
            //         is person.setUsername((java.lang.String) callbackArg_0)
            java.lang.String callbackArg_0 = androidx.databinding.adapters.TextViewBindingAdapter.getTextString(accountUsernameText);
            // localize variables for thread safety
            // person
            com.ustadmobile.lib.db.entities.PersonWithAccount person = mPerson;
            // person.username
            java.lang.String personUsername = null;
            // person != null
            boolean personJavaLangObjectNull = false;



            personJavaLangObjectNull = (person) != (null);
            if (personJavaLangObjectNull) {




                person.setUsername(((java.lang.String) (callbackArg_0)));
            }
        }
    };
    private androidx.databinding.InverseBindingListener confirmPasswordTextandroidTextAttrChanged = new androidx.databinding.InverseBindingListener() {
        @Override
        public void onChange() {
            // Inverse of person.confirmedPassword
            //         is person.setConfirmedPassword((java.lang.String) callbackArg_0)
            java.lang.String callbackArg_0 = androidx.databinding.adapters.TextViewBindingAdapter.getTextString(confirmPasswordText);
            // localize variables for thread safety
            // person
            com.ustadmobile.lib.db.entities.PersonWithAccount person = mPerson;
            // person.confirmedPassword
            java.lang.String personConfirmedPassword = null;
            // person != null
            boolean personJavaLangObjectNull = false;



            personJavaLangObjectNull = (person) != (null);
            if (personJavaLangObjectNull) {




                person.setConfirmedPassword(((java.lang.String) (callbackArg_0)));
            }
        }
    };
    private androidx.databinding.InverseBindingListener currentPasswordTextandroidTextAttrChanged = new androidx.databinding.InverseBindingListener() {
        @Override
        public void onChange() {
            // Inverse of person.currentPassword
            //         is person.setCurrentPassword((java.lang.String) callbackArg_0)
            java.lang.String callbackArg_0 = androidx.databinding.adapters.TextViewBindingAdapter.getTextString(currentPasswordText);
            // localize variables for thread safety
            // person
            com.ustadmobile.lib.db.entities.PersonWithAccount person = mPerson;
            // person != null
            boolean personJavaLangObjectNull = false;
            // person.currentPassword
            java.lang.String personCurrentPassword = null;



            personJavaLangObjectNull = (person) != (null);
            if (personJavaLangObjectNull) {




                person.setCurrentPassword(((java.lang.String) (callbackArg_0)));
            }
        }
    };
    private androidx.databinding.InverseBindingListener newPasswordTextandroidTextAttrChanged = new androidx.databinding.InverseBindingListener() {
        @Override
        public void onChange() {
            // Inverse of person.newPassword
            //         is person.setNewPassword((java.lang.String) callbackArg_0)
            java.lang.String callbackArg_0 = androidx.databinding.adapters.TextViewBindingAdapter.getTextString(newPasswordText);
            // localize variables for thread safety
            // person.newPassword
            java.lang.String personNewPassword = null;
            // person
            com.ustadmobile.lib.db.entities.PersonWithAccount person = mPerson;
            // person != null
            boolean personJavaLangObjectNull = false;



            personJavaLangObjectNull = (person) != (null);
            if (personJavaLangObjectNull) {




                person.setNewPassword(((java.lang.String) (callbackArg_0)));
            }
        }
    };

    public FragmentPersonAccountEditBindingImpl(@Nullable androidx.databinding.DataBindingComponent bindingComponent, @NonNull View root) {
        this(bindingComponent, root, mapBindings(bindingComponent, root, 10, sIncludes, sViewsWithIds));
    }
    private FragmentPersonAccountEditBindingImpl(androidx.databinding.DataBindingComponent bindingComponent, View root, Object[] bindings) {
        super(bindingComponent, root, 0
            , (com.google.android.material.textfield.TextInputEditText) bindings[2]
            , (com.google.android.material.textfield.TextInputEditText) bindings[8]
            , (com.google.android.material.textfield.TextInputLayout) bindings[7]
            , (com.google.android.material.textfield.TextInputEditText) bindings[6]
            , (com.google.android.material.textfield.TextInputLayout) bindings[5]
            , (android.widget.TextView) bindings[9]
            , (com.google.android.material.textfield.TextInputEditText) bindings[4]
            , (com.google.android.material.textfield.TextInputLayout) bindings[3]
            , (com.google.android.material.textfield.TextInputLayout) bindings[1]
            );
        this.accountUsernameText.setTag(null);
        this.confirmPasswordText.setTag(null);
        this.confirmPasswordTextinputlayout.setTag(null);
        this.currentPasswordText.setTag(null);
        this.currentPasswordTextinputlayout.setTag(null);
        this.mboundView0 = (androidx.core.widget.NestedScrollView) bindings[0];
        this.mboundView0.setTag(null);
        this.newPasswordText.setTag(null);
        this.newPasswordTextinputlayout.setTag(null);
        this.usernameTextinputlayout.setTag(null);
        setRootTag(root);
        // listeners
        invalidateAll();
    }

    @Override
    public void invalidateAll() {
        synchronized(this) {
                mDirtyFlags = 0x100L;
        }
        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.currentPasswordVisibility == variableId) {
            setCurrentPasswordVisibility((java.lang.Integer) variable);
        }
        else if (BR.passwordError == variableId) {
            setPasswordError((java.lang.String) variable);
        }
        else if (BR.currentPasswordError == variableId) {
            setCurrentPasswordError((java.lang.String) variable);
        }
        else if (BR.activityEventHandler == variableId) {
            setActivityEventHandler((com.ustadmobile.port.android.view.PersonEditFragmentEventHandler) variable);
        }
        else if (BR.usernameVisibility == variableId) {
            setUsernameVisibility((java.lang.Integer) variable);
        }
        else if (BR.passwordConfirmError == variableId) {
            setPasswordConfirmError((java.lang.String) variable);
        }
        else if (BR.person == variableId) {
            setPerson((com.ustadmobile.lib.db.entities.PersonWithAccount) variable);
        }
        else if (BR.usernameError == variableId) {
            setUsernameError((java.lang.String) variable);
        }
        else {
            variableSet = false;
        }
            return variableSet;
    }

    public void setCurrentPasswordVisibility(@Nullable java.lang.Integer CurrentPasswordVisibility) {
        this.mCurrentPasswordVisibility = CurrentPasswordVisibility;
        synchronized(this) {
            mDirtyFlags |= 0x1L;
        }
        notifyPropertyChanged(BR.currentPasswordVisibility);
        super.requestRebind();
    }
    public void setPasswordError(@Nullable java.lang.String PasswordError) {
        this.mPasswordError = PasswordError;
        synchronized(this) {
            mDirtyFlags |= 0x2L;
        }
        notifyPropertyChanged(BR.passwordError);
        super.requestRebind();
    }
    public void setCurrentPasswordError(@Nullable java.lang.String CurrentPasswordError) {
        this.mCurrentPasswordError = CurrentPasswordError;
        synchronized(this) {
            mDirtyFlags |= 0x4L;
        }
        notifyPropertyChanged(BR.currentPasswordError);
        super.requestRebind();
    }
    public void setActivityEventHandler(@Nullable com.ustadmobile.port.android.view.PersonEditFragmentEventHandler ActivityEventHandler) {
        this.mActivityEventHandler = ActivityEventHandler;
    }
    public void setUsernameVisibility(@Nullable java.lang.Integer UsernameVisibility) {
        this.mUsernameVisibility = UsernameVisibility;
        synchronized(this) {
            mDirtyFlags |= 0x10L;
        }
        notifyPropertyChanged(BR.usernameVisibility);
        super.requestRebind();
    }
    public void setPasswordConfirmError(@Nullable java.lang.String PasswordConfirmError) {
        this.mPasswordConfirmError = PasswordConfirmError;
        synchronized(this) {
            mDirtyFlags |= 0x20L;
        }
        notifyPropertyChanged(BR.passwordConfirmError);
        super.requestRebind();
    }
    public void setPerson(@Nullable com.ustadmobile.lib.db.entities.PersonWithAccount Person) {
        this.mPerson = Person;
        synchronized(this) {
            mDirtyFlags |= 0x40L;
        }
        notifyPropertyChanged(BR.person);
        super.requestRebind();
    }
    public void setUsernameError(@Nullable java.lang.String UsernameError) {
        this.mUsernameError = UsernameError;
        synchronized(this) {
            mDirtyFlags |= 0x80L;
        }
        notifyPropertyChanged(BR.usernameError);
        super.requestRebind();
    }

    @Override
    protected boolean onFieldChange(int localFieldId, Object object, int fieldId) {
        switch (localFieldId) {
        }
        return false;
    }

    @Override
    protected void executeBindings() {
        long dirtyFlags = 0;
        synchronized(this) {
            dirtyFlags = mDirtyFlags;
            mDirtyFlags = 0;
        }
        java.lang.Integer currentPasswordVisibility = mCurrentPasswordVisibility;
        java.lang.String personNewPassword = null;
        boolean usernameErrorJavaLangObjectNull = false;
        java.lang.String passwordError = mPasswordError;
        java.lang.String personCurrentPassword = null;
        java.lang.String currentPasswordError = mCurrentPasswordError;
        java.lang.String personConfirmedPassword = null;
        java.lang.Integer usernameVisibility = mUsernameVisibility;
        java.lang.String passwordConfirmError = mPasswordConfirmError;
        boolean passwordConfirmErrorJavaLangObjectNull = false;
        int androidxDatabindingViewDataBindingSafeUnboxUsernameVisibility = 0;
        boolean passwordErrorJavaLangObjectNull = false;
        com.ustadmobile.lib.db.entities.PersonWithAccount person = mPerson;
        java.lang.String personUsername = null;
        int androidxDatabindingViewDataBindingSafeUnboxCurrentPasswordVisibility = 0;
        boolean currentPasswordErrorJavaLangObjectNull = false;
        java.lang.String usernameError = mUsernameError;

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



                // read androidx.databinding.ViewDataBinding.safeUnbox(currentPasswordVisibility)
                androidxDatabindingViewDataBindingSafeUnboxCurrentPasswordVisibility = androidx.databinding.ViewDataBinding.safeUnbox(currentPasswordVisibility);
        }
        if ((dirtyFlags & 0x102L) != 0) {



                // read passwordError != null
                passwordErrorJavaLangObjectNull = (passwordError) != (null);
        }
        if ((dirtyFlags & 0x104L) != 0) {



                // read currentPasswordError != null
                currentPasswordErrorJavaLangObjectNull = (currentPasswordError) != (null);
        }
        if ((dirtyFlags & 0x110L) != 0) {



                // read androidx.databinding.ViewDataBinding.safeUnbox(usernameVisibility)
                androidxDatabindingViewDataBindingSafeUnboxUsernameVisibility = androidx.databinding.ViewDataBinding.safeUnbox(usernameVisibility);
        }
        if ((dirtyFlags & 0x120L) != 0) {



                // read passwordConfirmError != null
                passwordConfirmErrorJavaLangObjectNull = (passwordConfirmError) != (null);
        }
        if ((dirtyFlags & 0x140L) != 0) {



                if (person != null) {
                    // read person.newPassword
                    personNewPassword = person.getNewPassword();
                    // read person.currentPassword
                    personCurrentPassword = person.getCurrentPassword();
                    // read person.confirmedPassword
                    personConfirmedPassword = person.getConfirmedPassword();
                    // read person.username
                    personUsername = person.getUsername();
                }
        }
        if ((dirtyFlags & 0x180L) != 0) {



                // read usernameError != null
                usernameErrorJavaLangObjectNull = (usernameError) != (null);
        }
        // batch finished
        if ((dirtyFlags & 0x140L) != 0) {
            // api target 1

            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.accountUsernameText, personUsername);
            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.confirmPasswordText, personConfirmedPassword);
            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.currentPasswordText, personCurrentPassword);
            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.newPasswordText, personNewPassword);
        }
        if ((dirtyFlags & 0x100L) != 0) {
            // api target 1

            androidx.databinding.adapters.TextViewBindingAdapter.setTextWatcher(this.accountUsernameText, (androidx.databinding.adapters.TextViewBindingAdapter.BeforeTextChanged)null, (androidx.databinding.adapters.TextViewBindingAdapter.OnTextChanged)null, (androidx.databinding.adapters.TextViewBindingAdapter.AfterTextChanged)null, accountUsernameTextandroidTextAttrChanged);
            androidx.databinding.adapters.TextViewBindingAdapter.setTextWatcher(this.confirmPasswordText, (androidx.databinding.adapters.TextViewBindingAdapter.BeforeTextChanged)null, (androidx.databinding.adapters.TextViewBindingAdapter.OnTextChanged)null, (androidx.databinding.adapters.TextViewBindingAdapter.AfterTextChanged)null, confirmPasswordTextandroidTextAttrChanged);
            androidx.databinding.adapters.TextViewBindingAdapter.setTextWatcher(this.currentPasswordText, (androidx.databinding.adapters.TextViewBindingAdapter.BeforeTextChanged)null, (androidx.databinding.adapters.TextViewBindingAdapter.OnTextChanged)null, (androidx.databinding.adapters.TextViewBindingAdapter.AfterTextChanged)null, currentPasswordTextandroidTextAttrChanged);
            androidx.databinding.adapters.TextViewBindingAdapter.setTextWatcher(this.newPasswordText, (androidx.databinding.adapters.TextViewBindingAdapter.BeforeTextChanged)null, (androidx.databinding.adapters.TextViewBindingAdapter.OnTextChanged)null, (androidx.databinding.adapters.TextViewBindingAdapter.AfterTextChanged)null, newPasswordTextandroidTextAttrChanged);
        }
        if ((dirtyFlags & 0x120L) != 0) {
            // api target 1

            com.ustadmobile.port.android.view.binding.TextInputLayoutBindingsKt.setErrorText(this.confirmPasswordTextinputlayout, passwordConfirmError);
            this.confirmPasswordTextinputlayout.setErrorEnabled(passwordConfirmErrorJavaLangObjectNull);
        }
        if ((dirtyFlags & 0x101L) != 0) {
            // api target 1

            this.currentPasswordTextinputlayout.setVisibility(androidxDatabindingViewDataBindingSafeUnboxCurrentPasswordVisibility);
        }
        if ((dirtyFlags & 0x104L) != 0) {
            // api target 1

            com.ustadmobile.port.android.view.binding.TextInputLayoutBindingsKt.setErrorText(this.currentPasswordTextinputlayout, currentPasswordError);
            this.currentPasswordTextinputlayout.setErrorEnabled(currentPasswordErrorJavaLangObjectNull);
        }
        if ((dirtyFlags & 0x102L) != 0) {
            // api target 1

            com.ustadmobile.port.android.view.binding.TextInputLayoutBindingsKt.setErrorText(this.newPasswordTextinputlayout, passwordError);
            this.newPasswordTextinputlayout.setErrorEnabled(passwordErrorJavaLangObjectNull);
        }
        if ((dirtyFlags & 0x110L) != 0) {
            // api target 1

            this.usernameTextinputlayout.setVisibility(androidxDatabindingViewDataBindingSafeUnboxUsernameVisibility);
        }
        if ((dirtyFlags & 0x180L) != 0) {
            // api target 1

            com.ustadmobile.port.android.view.binding.TextInputLayoutBindingsKt.setErrorText(this.usernameTextinputlayout, usernameError);
            this.usernameTextinputlayout.setErrorEnabled(usernameErrorJavaLangObjectNull);
        }
    }
    // Listener Stub Implementations
    // callback impls
    // dirty flag
    private  long mDirtyFlags = 0xffffffffffffffffL;
    /* flag mapping
        flag 0 (0x1L): currentPasswordVisibility
        flag 1 (0x2L): passwordError
        flag 2 (0x3L): currentPasswordError
        flag 3 (0x4L): activityEventHandler
        flag 4 (0x5L): usernameVisibility
        flag 5 (0x6L): passwordConfirmError
        flag 6 (0x7L): person
        flag 7 (0x8L): usernameError
        flag 8 (0x9L): null
    flag mapping end*/
    //end
}