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 FragmentPanicButtonSettingsBindingImpl extends FragmentPanicButtonSettingsBinding 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.item_panicbutton_appicon, 5);
        sViewsWithIds.put(R.id.item_panicbutton_select_app_title, 6);
        sViewsWithIds.put(R.id.panic_button_settings_exit_app_checkbox, 7);
        sViewsWithIds.put(R.id.panic_button_settings_clear_app_data_checkbox, 8);
        sViewsWithIds.put(R.id.panic_button_settings_uninstall_checkbox, 9);
    }
    // views
    @NonNull
    private final androidx.constraintlayout.widget.ConstraintLayout mboundView1;
    @NonNull
    private final android.widget.TextView mboundView3;
    @NonNull
    private final android.widget.TextView mboundView4;
    // variables
    @Nullable
    private final android.view.View.OnClickListener mCallback129;
    @Nullable
    private final android.view.View.OnClickListener mCallback130;
    // values
    // listeners
    // Inverse Binding Event Handlers

    public FragmentPanicButtonSettingsBindingImpl(@Nullable androidx.databinding.DataBindingComponent bindingComponent, @NonNull View root) {
        this(bindingComponent, root, mapBindings(bindingComponent, root, 10, sIncludes, sViewsWithIds));
    }
    private FragmentPanicButtonSettingsBindingImpl(androidx.databinding.DataBindingComponent bindingComponent, View root, Object[] bindings) {
        super(bindingComponent, root, 0
            , (androidx.core.widget.NestedScrollView) bindings[0]
            , (androidx.appcompat.widget.AppCompatImageView) bindings[5]
            , (android.widget.TextView) bindings[2]
            , (android.widget.TextView) bindings[6]
            , (com.google.android.material.switchmaterial.SwitchMaterial) bindings[8]
            , (com.google.android.material.switchmaterial.SwitchMaterial) bindings[7]
            , (com.google.android.material.switchmaterial.SwitchMaterial) bindings[9]
            );
        this.activityClazzEditFieldsScrollview.setTag(null);
        this.itemPanicbuttonSelectAppAppName.setTag(null);
        this.mboundView1 = (androidx.constraintlayout.widget.ConstraintLayout) bindings[1];
        this.mboundView1.setTag(null);
        this.mboundView3 = (android.widget.TextView) bindings[3];
        this.mboundView3.setTag(null);
        this.mboundView4 = (android.widget.TextView) bindings[4];
        this.mboundView4.setTag(null);
        setRootTag(root);
        // listeners
        mCallback129 = new com.toughra.ustadmobile.generated.callback.OnClickListener(this, 1);
        mCallback130 = new com.toughra.ustadmobile.generated.callback.OnClickListener(this, 2);
        invalidateAll();
    }

    @Override
    public void invalidateAll() {
        synchronized(this) {
                mDirtyFlags = 0x8L;
        }
        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.panicButtonAppName == variableId) {
            setPanicButtonAppName((java.lang.String) variable);
        }
        else if (BR.eventListener == variableId) {
            setEventListener((com.ustadmobile.port.android.view.PanicButtonSettingsFragmentEventListener) variable);
        }
        else if (BR.unlockCode == variableId) {
            setUnlockCode((java.lang.String) variable);
        }
        else {
            variableSet = false;
        }
            return variableSet;
    }

    public void setPanicButtonAppName(@Nullable java.lang.String PanicButtonAppName) {
        this.mPanicButtonAppName = PanicButtonAppName;
        synchronized(this) {
            mDirtyFlags |= 0x1L;
        }
        notifyPropertyChanged(BR.panicButtonAppName);
        super.requestRebind();
    }
    public void setEventListener(@Nullable com.ustadmobile.port.android.view.PanicButtonSettingsFragmentEventListener EventListener) {
        this.mEventListener = EventListener;
        synchronized(this) {
            mDirtyFlags |= 0x2L;
        }
        notifyPropertyChanged(BR.eventListener);
        super.requestRebind();
    }
    public void setUnlockCode(@Nullable java.lang.String UnlockCode) {
        this.mUnlockCode = UnlockCode;
        synchronized(this) {
            mDirtyFlags |= 0x4L;
        }
        notifyPropertyChanged(BR.unlockCode);
        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.String panicButtonAppName = mPanicButtonAppName;
        com.ustadmobile.port.android.view.PanicButtonSettingsFragmentEventListener eventListener = mEventListener;
        java.lang.String mboundView4AndroidStringHideAppExplanationMboundView4AndroidStringAppNameUnlockCode = null;
        java.lang.String unlockCode = mUnlockCode;

        if ((dirtyFlags & 0x9L) != 0) {
        }
        if ((dirtyFlags & 0xcL) != 0) {



                // read @android:string/hide_app_explanation
                mboundView4AndroidStringHideAppExplanationMboundView4AndroidStringAppNameUnlockCode = mboundView4.getResources().getString(R.string.hide_app_explanation, mboundView4.getResources().getString(R.string.app_name), unlockCode);
        }
        // batch finished
        if ((dirtyFlags & 0x9L) != 0) {
            // api target 1

            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.itemPanicbuttonSelectAppAppName, panicButtonAppName);
        }
        if ((dirtyFlags & 0x8L) != 0) {
            // api target 1

            this.mboundView1.setOnClickListener(mCallback129);
            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.mboundView3, mboundView3.getResources().getString(R.string.panic_button_explanation, mboundView3.getResources().getString(R.string.app_name)));
            this.mboundView3.setOnClickListener(mCallback130);
        }
        if ((dirtyFlags & 0xcL) != 0) {
            // api target 1

            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.mboundView4, mboundView4AndroidStringHideAppExplanationMboundView4AndroidStringAppNameUnlockCode);
        }
    }
    // Listener Stub Implementations
    // callback impls
    public final void _internalCallbackOnClick(int sourceId , android.view.View callbackArg_0) {
        switch(sourceId) {
            case 1: {
                // localize variables for thread safety
                // eventListener
                com.ustadmobile.port.android.view.PanicButtonSettingsFragmentEventListener eventListener = mEventListener;
                // eventListener != null
                boolean eventListenerJavaLangObjectNull = false;



                eventListenerJavaLangObjectNull = (eventListener) != (null);
                if (eventListenerJavaLangObjectNull) {


                    eventListener.onClickSelectPanicTriggerApp();
                }
                break;
            }
            case 2: {
                // localize variables for thread safety
                // eventListener
                com.ustadmobile.port.android.view.PanicButtonSettingsFragmentEventListener eventListener = mEventListener;
                // eventListener != null
                boolean eventListenerJavaLangObjectNull = false;



                eventListenerJavaLangObjectNull = (eventListener) != (null);
                if (eventListenerJavaLangObjectNull) {


                    eventListener.onClickExplanation();
                }
                break;
            }
        }
    }
    // dirty flag
    private  long mDirtyFlags = 0xffffffffffffffffL;
    /* flag mapping
        flag 0 (0x1L): panicButtonAppName
        flag 1 (0x2L): eventListener
        flag 2 (0x3L): unlockCode
        flag 3 (0x4L): null
    flag mapping end*/
    //end
}