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 FragmentSettingsBindingImpl extends FragmentSettingsBinding implements com.toughra.ustadmobile.generated.callback.OnClickListener.Listener {

    @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.imageView14, 5);
        sViewsWithIds.put(R.id.textView10, 6);
        sViewsWithIds.put(R.id.textView9, 7);
        sViewsWithIds.put(R.id.activity_settings2_workspace_iv, 8);
        sViewsWithIds.put(R.id.activity_settings2_workspace_title, 9);
        sViewsWithIds.put(R.id.activity_settings2_workspace_desc, 10);
        sViewsWithIds.put(R.id.activity_settings2_leaving_reason_iv, 11);
        sViewsWithIds.put(R.id.activity_settings2_leaving_reason_title, 12);
        sViewsWithIds.put(R.id.activity_settings2_leaving_reason_desc, 13);
        sViewsWithIds.put(R.id.activity_settings2_lang_list_iv, 14);
        sViewsWithIds.put(R.id.activity_settings2_lang_list_title, 15);
        sViewsWithIds.put(R.id.activity_settings2_lang_list_desc, 16);
    }
    // views
    @NonNull
    private final androidx.core.widget.NestedScrollView mboundView0;
    // variables
    @Nullable
    private final android.view.View.OnClickListener mCallback112;
    @Nullable
    private final android.view.View.OnClickListener mCallback110;
    @Nullable
    private final android.view.View.OnClickListener mCallback111;
    @Nullable
    private final android.view.View.OnClickListener mCallback109;
    // values
    // listeners
    // Inverse Binding Event Handlers

    public FragmentSettingsBindingImpl(@Nullable androidx.databinding.DataBindingComponent bindingComponent, @NonNull View root) {
        this(bindingComponent, root, mapBindings(bindingComponent, root, 17, sIncludes, sViewsWithIds));
    }
    private FragmentSettingsBindingImpl(androidx.databinding.DataBindingComponent bindingComponent, View root, Object[] bindings) {
        super(bindingComponent, root, 0
            , (androidx.constraintlayout.widget.ConstraintLayout) bindings[1]
            , (androidx.constraintlayout.widget.ConstraintLayout) bindings[4]
            , (android.widget.TextView) bindings[16]
            , (androidx.appcompat.widget.AppCompatImageView) bindings[14]
            , (android.widget.TextView) bindings[15]
            , (androidx.constraintlayout.widget.ConstraintLayout) bindings[3]
            , (android.widget.TextView) bindings[13]
            , (androidx.appcompat.widget.AppCompatImageView) bindings[11]
            , (android.widget.TextView) bindings[12]
            , (androidx.constraintlayout.widget.ConstraintLayout) bindings[2]
            , (android.widget.TextView) bindings[10]
            , (androidx.appcompat.widget.AppCompatImageView) bindings[8]
            , (android.widget.TextView) bindings[9]
            , (androidx.appcompat.widget.AppCompatImageView) bindings[5]
            , (android.widget.TextView) bindings[6]
            , (android.widget.TextView) bindings[7]
            );
        this.activitySettings2HolidayCalendarCl.setTag(null);
        this.activitySettings2LangListCl.setTag(null);
        this.activitySettings2LeavingReasonCl.setTag(null);
        this.activitySettings2WorkspaceCl.setTag(null);
        this.mboundView0 = (androidx.core.widget.NestedScrollView) bindings[0];
        this.mboundView0.setTag(null);
        setRootTag(root);
        // listeners
        mCallback112 = new com.toughra.ustadmobile.generated.callback.OnClickListener(this, 4);
        mCallback110 = new com.toughra.ustadmobile.generated.callback.OnClickListener(this, 2);
        mCallback111 = new com.toughra.ustadmobile.generated.callback.OnClickListener(this, 3);
        mCallback109 = new com.toughra.ustadmobile.generated.callback.OnClickListener(this, 1);
        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.langListVisible == variableId) {
            setLangListVisible((boolean) variable);
        }
        else if (BR.reasonLeavingVisible == variableId) {
            setReasonLeavingVisible((boolean) variable);
        }
        else if (BR.presenter == variableId) {
            setPresenter((com.ustadmobile.core.controller.SettingsPresenter) variable);
        }
        else if (BR.holidayCalendarVisible == variableId) {
            setHolidayCalendarVisible((boolean) variable);
        }
        else if (BR.workspaceSettingsVisible == variableId) {
            setWorkspaceSettingsVisible((boolean) variable);
        }
        else {
            variableSet = false;
        }
            return variableSet;
    }

    public void setLangListVisible(boolean LangListVisible) {
        this.mLangListVisible = LangListVisible;
        synchronized(this) {
            mDirtyFlags |= 0x1L;
        }
        notifyPropertyChanged(BR.langListVisible);
        super.requestRebind();
    }
    public void setReasonLeavingVisible(boolean ReasonLeavingVisible) {
        this.mReasonLeavingVisible = ReasonLeavingVisible;
        synchronized(this) {
            mDirtyFlags |= 0x2L;
        }
        notifyPropertyChanged(BR.reasonLeavingVisible);
        super.requestRebind();
    }
    public void setPresenter(@Nullable com.ustadmobile.core.controller.SettingsPresenter Presenter) {
        this.mPresenter = Presenter;
        synchronized(this) {
            mDirtyFlags |= 0x4L;
        }
        notifyPropertyChanged(BR.presenter);
        super.requestRebind();
    }
    public void setHolidayCalendarVisible(boolean HolidayCalendarVisible) {
        this.mHolidayCalendarVisible = HolidayCalendarVisible;
        synchronized(this) {
            mDirtyFlags |= 0x8L;
        }
        notifyPropertyChanged(BR.holidayCalendarVisible);
        super.requestRebind();
    }
    public void setWorkspaceSettingsVisible(boolean WorkspaceSettingsVisible) {
        this.mWorkspaceSettingsVisible = WorkspaceSettingsVisible;
        synchronized(this) {
            mDirtyFlags |= 0x10L;
        }
        notifyPropertyChanged(BR.workspaceSettingsVisible);
        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;
        }
        boolean langListVisible = mLangListVisible;
        int holidayCalendarVisibleViewVISIBLEViewGONE = 0;
        boolean reasonLeavingVisible = mReasonLeavingVisible;
        int workspaceSettingsVisibleViewVISIBLEViewGONE = 0;
        int langListVisibleViewVISIBLEViewGONE = 0;
        com.ustadmobile.core.controller.SettingsPresenter presenter = mPresenter;
        boolean holidayCalendarVisible = mHolidayCalendarVisible;
        int reasonLeavingVisibleViewVISIBLEViewGONE = 0;
        boolean workspaceSettingsVisible = mWorkspaceSettingsVisible;

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

            if((dirtyFlags & 0x21L) != 0) {
                if(langListVisible) {
                        dirtyFlags |= 0x800L;
                }
                else {
                        dirtyFlags |= 0x400L;
                }
            }


                // read langListVisible ? View.VISIBLE : View.GONE
                langListVisibleViewVISIBLEViewGONE = ((langListVisible) ? (android.view.View.VISIBLE) : (android.view.View.GONE));
        }
        if ((dirtyFlags & 0x22L) != 0) {

            if((dirtyFlags & 0x22L) != 0) {
                if(reasonLeavingVisible) {
                        dirtyFlags |= 0x2000L;
                }
                else {
                        dirtyFlags |= 0x1000L;
                }
            }


                // read reasonLeavingVisible ? View.VISIBLE : View.GONE
                reasonLeavingVisibleViewVISIBLEViewGONE = ((reasonLeavingVisible) ? (android.view.View.VISIBLE) : (android.view.View.GONE));
        }
        if ((dirtyFlags & 0x28L) != 0) {

            if((dirtyFlags & 0x28L) != 0) {
                if(holidayCalendarVisible) {
                        dirtyFlags |= 0x80L;
                }
                else {
                        dirtyFlags |= 0x40L;
                }
            }


                // read holidayCalendarVisible ? View.VISIBLE : View.GONE
                holidayCalendarVisibleViewVISIBLEViewGONE = ((holidayCalendarVisible) ? (android.view.View.VISIBLE) : (android.view.View.GONE));
        }
        if ((dirtyFlags & 0x30L) != 0) {

            if((dirtyFlags & 0x30L) != 0) {
                if(workspaceSettingsVisible) {
                        dirtyFlags |= 0x200L;
                }
                else {
                        dirtyFlags |= 0x100L;
                }
            }


                // read workspaceSettingsVisible ? View.VISIBLE : View.GONE
                workspaceSettingsVisibleViewVISIBLEViewGONE = ((workspaceSettingsVisible) ? (android.view.View.VISIBLE) : (android.view.View.GONE));
        }
        // batch finished
        if ((dirtyFlags & 0x28L) != 0) {
            // api target 1

            this.activitySettings2HolidayCalendarCl.setVisibility(holidayCalendarVisibleViewVISIBLEViewGONE);
        }
        if ((dirtyFlags & 0x20L) != 0) {
            // api target 1

            this.activitySettings2HolidayCalendarCl.setOnClickListener(mCallback109);
            this.activitySettings2LangListCl.setOnClickListener(mCallback112);
            this.activitySettings2LeavingReasonCl.setOnClickListener(mCallback111);
            this.activitySettings2WorkspaceCl.setOnClickListener(mCallback110);
        }
        if ((dirtyFlags & 0x21L) != 0) {
            // api target 1

            this.activitySettings2LangListCl.setVisibility(langListVisibleViewVISIBLEViewGONE);
        }
        if ((dirtyFlags & 0x22L) != 0) {
            // api target 1

            this.activitySettings2LeavingReasonCl.setVisibility(reasonLeavingVisibleViewVISIBLEViewGONE);
        }
        if ((dirtyFlags & 0x30L) != 0) {
            // api target 1

            this.activitySettings2WorkspaceCl.setVisibility(workspaceSettingsVisibleViewVISIBLEViewGONE);
        }
    }
    // Listener Stub Implementations
    // callback impls
    public final void _internalCallbackOnClick(int sourceId , android.view.View callbackArg_0) {
        switch(sourceId) {
            case 4: {
                // localize variables for thread safety
                // presenter != null
                boolean presenterJavaLangObjectNull = false;
                // presenter
                com.ustadmobile.core.controller.SettingsPresenter presenter = mPresenter;



                presenterJavaLangObjectNull = (presenter) != (null);
                if (presenterJavaLangObjectNull) {


                    presenter.handleClickLangList();
                }
                break;
            }
            case 2: {
                // localize variables for thread safety
                // presenter != null
                boolean presenterJavaLangObjectNull = false;
                // presenter
                com.ustadmobile.core.controller.SettingsPresenter presenter = mPresenter;



                presenterJavaLangObjectNull = (presenter) != (null);
                if (presenterJavaLangObjectNull) {


                    presenter.handleClickWorkspace();
                }
                break;
            }
            case 3: {
                // localize variables for thread safety
                // presenter != null
                boolean presenterJavaLangObjectNull = false;
                // presenter
                com.ustadmobile.core.controller.SettingsPresenter presenter = mPresenter;



                presenterJavaLangObjectNull = (presenter) != (null);
                if (presenterJavaLangObjectNull) {


                    presenter.handleClickLeavingReason();
                }
                break;
            }
            case 1: {
                // localize variables for thread safety
                // presenter != null
                boolean presenterJavaLangObjectNull = false;
                // presenter
                com.ustadmobile.core.controller.SettingsPresenter presenter = mPresenter;



                presenterJavaLangObjectNull = (presenter) != (null);
                if (presenterJavaLangObjectNull) {


                    presenter.goToHolidayCalendarList();
                }
                break;
            }
        }
    }
    // dirty flag
    private  long mDirtyFlags = 0xffffffffffffffffL;
    /* flag mapping
        flag 0 (0x1L): langListVisible
        flag 1 (0x2L): reasonLeavingVisible
        flag 2 (0x3L): presenter
        flag 3 (0x4L): holidayCalendarVisible
        flag 4 (0x5L): workspaceSettingsVisible
        flag 5 (0x6L): null
        flag 6 (0x7L): holidayCalendarVisible ? View.VISIBLE : View.GONE
        flag 7 (0x8L): holidayCalendarVisible ? View.VISIBLE : View.GONE
        flag 8 (0x9L): workspaceSettingsVisible ? View.VISIBLE : View.GONE
        flag 9 (0xaL): workspaceSettingsVisible ? View.VISIBLE : View.GONE
        flag 10 (0xbL): langListVisible ? View.VISIBLE : View.GONE
        flag 11 (0xcL): langListVisible ? View.VISIBLE : View.GONE
        flag 12 (0xdL): reasonLeavingVisible ? View.VISIBLE : View.GONE
        flag 13 (0xeL): reasonLeavingVisible ? View.VISIBLE : View.GONE
    flag mapping end*/
    //end
}