package hanson.xyz.vpnhotspotmod.databinding;
import hanson.xyz.vpnhotspotmod.R;
import hanson.xyz.vpnhotspotmod.BR;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import android.view.View;
@SuppressWarnings("unchecked")
public class ListitemInterfaceBindingImpl extends ListitemInterfaceBinding  {

    @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.LinearLayout mboundView0;
    @NonNull
    private final android.widget.ImageView mboundView1;
    @NonNull
    private final android.widget.TextView mboundView2;
    @NonNull
    private final com.google.android.material.materialswitch.MaterialSwitch mboundView4;
    // variables
    // values
    // listeners
    // Inverse Binding Event Handlers

    public ListitemInterfaceBindingImpl(@Nullable androidx.databinding.DataBindingComponent bindingComponent, @NonNull View root) {
        this(bindingComponent, root, mapBindings(bindingComponent, root, 5, sIncludes, sViewsWithIds));
    }
    private ListitemInterfaceBindingImpl(androidx.databinding.DataBindingComponent bindingComponent, View root, Object[] bindings) {
        super(bindingComponent, root, 1
            , (hanson.xyz.vpnhotspotmod.widget.AutoCollapseTextView) bindings[3]
            );
        this.mboundView0 = (android.widget.LinearLayout) bindings[0];
        this.mboundView0.setTag(null);
        this.mboundView1 = (android.widget.ImageView) bindings[1];
        this.mboundView1.setTag(null);
        this.mboundView2 = (android.widget.TextView) bindings[2];
        this.mboundView2.setTag(null);
        this.mboundView4 = (com.google.android.material.materialswitch.MaterialSwitch) bindings[4];
        this.mboundView4.setTag(null);
        this.text.setTag(null);
        setRootTag(root);
        // listeners
        invalidateAll();
    }

    @Override
    public void invalidateAll() {
        synchronized(this) {
                mDirtyFlags = 0x2L;
        }
        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.data == variableId) {
            setData((hanson.xyz.vpnhotspotmod.manage.Data) variable);
        }
        else {
            variableSet = false;
        }
            return variableSet;
    }

    public void setData(@Nullable hanson.xyz.vpnhotspotmod.manage.Data Data) {
        updateRegistration(0, Data);
        this.mData = Data;
        synchronized(this) {
            mDirtyFlags |= 0x1L;
        }
        notifyPropertyChanged(BR.data);
        super.requestRebind();
    }

    @Override
    protected boolean onFieldChange(int localFieldId, Object object, int fieldId) {
        switch (localFieldId) {
            case 0 :
                return onChangeData((hanson.xyz.vpnhotspotmod.manage.Data) object, fieldId);
        }
        return false;
    }
    private boolean onChangeData(hanson.xyz.vpnhotspotmod.manage.Data Data, int fieldId) {
        if (fieldId == BR._all) {
            synchronized(this) {
                    mDirtyFlags |= 0x1L;
            }
            return true;
        }
        return false;
    }

    @Override
    protected void executeBindings() {
        long dirtyFlags = 0;
        synchronized(this) {
            dirtyFlags = mDirtyFlags;
            mDirtyFlags = 0;
        }
        java.lang.CharSequence dataText = null;
        java.lang.CharSequence dataTitle = null;
        boolean dataActive = false;
        boolean dataSelectable = false;
        hanson.xyz.vpnhotspotmod.manage.Data data = mData;
        int dataIcon = 0;

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



                if (data != null) {
                    // read data.text
                    dataText = data.getText();
                    // read data.title
                    dataTitle = data.getTitle();
                    // read data.active
                    dataActive = data.getActive();
                    // read data.selectable
                    dataSelectable = data.getSelectable();
                    // read data.icon
                    dataIcon = data.getIcon();
                }
        }
        // batch finished
        if ((dirtyFlags & 0x3L) != 0) {
            // api target 1

            hanson.xyz.vpnhotspotmod.util.UtilsKt.setImageResource(this.mboundView1, dataIcon);
            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.mboundView2, dataTitle);
            androidx.databinding.adapters.CompoundButtonBindingAdapter.setChecked(this.mboundView4, dataActive);
            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.text, dataText);
            // api target 11
            if(getBuildSdkInt() >= 11) {

                this.text.setTextIsSelectable(dataSelectable);
            }
        }
    }
    // Listener Stub Implementations
    // callback impls
    // dirty flag
    private  long mDirtyFlags = 0xffffffffffffffffL;
    /* flag mapping
        flag 0 (0x1L): data
        flag 1 (0x2L): null
    flag mapping end*/
    //end
}