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 ListitemClientBindingImpl extends ListitemClientBinding  {

    @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 hanson.xyz.vpnhotspotmod.widget.LinkTextView mboundView2;
    @NonNull
    private final hanson.xyz.vpnhotspotmod.widget.AutoCollapseTextView mboundView4;
    // variables
    // values
    // listeners
    // Inverse Binding Event Handlers

    public ListitemClientBindingImpl(@Nullable androidx.databinding.DataBindingComponent bindingComponent, @NonNull View root) {
        this(bindingComponent, root, mapBindings(bindingComponent, root, 5, sIncludes, sViewsWithIds));
    }
    private ListitemClientBindingImpl(androidx.databinding.DataBindingComponent bindingComponent, View root, Object[] bindings) {
        super(bindingComponent, root, 4
            , (hanson.xyz.vpnhotspotmod.widget.AutoCollapseTextView) bindings[3]
            );
        this.description.setTag(null);
        this.mboundView0 = (android.widget.LinearLayout) bindings[0];
        this.mboundView0.setTag(null);
        this.mboundView1 = (android.widget.ImageView) bindings[1];
        this.mboundView1.setTag(null);
        this.mboundView2 = (hanson.xyz.vpnhotspotmod.widget.LinkTextView) bindings[2];
        this.mboundView2.setTag(null);
        this.mboundView4 = (hanson.xyz.vpnhotspotmod.widget.AutoCollapseTextView) bindings[4];
        this.mboundView4.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.rate == variableId) {
            setRate((hanson.xyz.vpnhotspotmod.client.ClientsFragment.TrafficRate) variable);
        }
        else if (BR.client == variableId) {
            setClient((hanson.xyz.vpnhotspotmod.client.Client) variable);
        }
        else {
            variableSet = false;
        }
            return variableSet;
    }

    public void setRate(@Nullable hanson.xyz.vpnhotspotmod.client.ClientsFragment.TrafficRate Rate) {
        updateRegistration(0, Rate);
        this.mRate = Rate;
        synchronized(this) {
            mDirtyFlags |= 0x1L;
        }
        notifyPropertyChanged(BR.rate);
        super.requestRebind();
    }
    public void setClient(@Nullable hanson.xyz.vpnhotspotmod.client.Client Client) {
        this.mClient = Client;
        synchronized(this) {
            mDirtyFlags |= 0x10L;
        }
        notifyPropertyChanged(BR.client);
        super.requestRebind();
    }

    @Override
    protected boolean onFieldChange(int localFieldId, Object object, int fieldId) {
        switch (localFieldId) {
            case 0 :
                return onChangeRate((hanson.xyz.vpnhotspotmod.client.ClientsFragment.TrafficRate) object, fieldId);
            case 1 :
                return onChangeClientTitleSelectable((androidx.lifecycle.LiveData<java.lang.Boolean>) object, fieldId);
            case 2 :
                return onChangeClientDescription((androidx.lifecycle.LiveData<java.lang.CharSequence>) object, fieldId);
            case 3 :
                return onChangeClientTitle((androidx.lifecycle.LiveData<android.text.SpannableStringBuilder>) object, fieldId);
        }
        return false;
    }
    private boolean onChangeRate(hanson.xyz.vpnhotspotmod.client.ClientsFragment.TrafficRate Rate, int fieldId) {
        if (fieldId == BR._all) {
            synchronized(this) {
                    mDirtyFlags |= 0x1L;
            }
            return true;
        }
        return false;
    }
    private boolean onChangeClientTitleSelectable(androidx.lifecycle.LiveData<java.lang.Boolean> ClientTitleSelectable, int fieldId) {
        if (fieldId == BR._all) {
            synchronized(this) {
                    mDirtyFlags |= 0x2L;
            }
            return true;
        }
        return false;
    }
    private boolean onChangeClientDescription(androidx.lifecycle.LiveData<java.lang.CharSequence> ClientDescription, int fieldId) {
        if (fieldId == BR._all) {
            synchronized(this) {
                    mDirtyFlags |= 0x4L;
            }
            return true;
        }
        return false;
    }
    private boolean onChangeClientTitle(androidx.lifecycle.LiveData<android.text.SpannableStringBuilder> ClientTitle, int fieldId) {
        if (fieldId == BR._all) {
            synchronized(this) {
                    mDirtyFlags |= 0x8L;
            }
            return true;
        }
        return false;
    }

    @Override
    protected void executeBindings() {
        long dirtyFlags = 0;
        synchronized(this) {
            dirtyFlags = mDirtyFlags;
            mDirtyFlags = 0;
        }
        java.lang.Boolean clientTitleSelectableGetValue = null;
        hanson.xyz.vpnhotspotmod.client.ClientsFragment.TrafficRate rate = mRate;
        int clientIcon = 0;
        androidx.lifecycle.LiveData<java.lang.Boolean> clientTitleSelectable = null;
        androidx.lifecycle.LiveData<java.lang.CharSequence> clientDescription = null;
        hanson.xyz.vpnhotspotmod.client.Client client = mClient;
        java.lang.CharSequence clientDescriptionGetValue = null;
        androidx.lifecycle.LiveData<android.text.SpannableStringBuilder> clientTitle = null;
        java.lang.String rateToString = null;
        boolean androidxDatabindingViewDataBindingSafeUnboxClientTitleSelectableGetValue = false;
        android.text.SpannableStringBuilder clientTitleGetValue = null;

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



                if (rate != null) {
                    // read rate.toString()
                    rateToString = rate.toString();
                }
        }
        if ((dirtyFlags & 0x3eL) != 0) {


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

                    if (client != null) {
                        // read client.icon
                        clientIcon = client.getIcon();
                    }
            }
            if ((dirtyFlags & 0x32L) != 0) {

                    if (client != null) {
                        // read client.titleSelectable
                        clientTitleSelectable = client.getTitleSelectable();
                    }
                    updateLiveDataRegistration(1, clientTitleSelectable);


                    if (clientTitleSelectable != null) {
                        // read client.titleSelectable.getValue()
                        clientTitleSelectableGetValue = clientTitleSelectable.getValue();
                    }


                    // read androidx.databinding.ViewDataBinding.safeUnbox(client.titleSelectable.getValue())
                    androidxDatabindingViewDataBindingSafeUnboxClientTitleSelectableGetValue = androidx.databinding.ViewDataBinding.safeUnbox(clientTitleSelectableGetValue);
            }
            if ((dirtyFlags & 0x34L) != 0) {

                    if (client != null) {
                        // read client.description
                        clientDescription = client.getDescription();
                    }
                    updateLiveDataRegistration(2, clientDescription);


                    if (clientDescription != null) {
                        // read client.description.getValue()
                        clientDescriptionGetValue = clientDescription.getValue();
                    }
            }
            if ((dirtyFlags & 0x38L) != 0) {

                    if (client != null) {
                        // read client.title
                        clientTitle = client.getTitle();
                    }
                    updateLiveDataRegistration(3, clientTitle);


                    if (clientTitle != null) {
                        // read client.title.getValue()
                        clientTitleGetValue = clientTitle.getValue();
                    }
            }
        }
        // batch finished
        if ((dirtyFlags & 0x34L) != 0) {
            // api target 1

            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.description, clientDescriptionGetValue);
        }
        if ((dirtyFlags & 0x30L) != 0) {
            // api target 1

            hanson.xyz.vpnhotspotmod.util.UtilsKt.setImageResource(this.mboundView1, clientIcon);
        }
        if ((dirtyFlags & 0x38L) != 0) {
            // api target 1

            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.mboundView2, clientTitleGetValue);
        }
        if ((dirtyFlags & 0x32L) != 0) {
            // api target 11
            if(getBuildSdkInt() >= 11) {

                this.mboundView2.setTextIsSelectable(androidxDatabindingViewDataBindingSafeUnboxClientTitleSelectableGetValue);
            }
        }
        if ((dirtyFlags & 0x21L) != 0) {
            // api target 1

            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.mboundView4, rateToString);
        }
    }
    // Listener Stub Implementations
    // callback impls
    // dirty flag
    private  long mDirtyFlags = 0xffffffffffffffffL;
    /* flag mapping
        flag 0 (0x1L): rate
        flag 1 (0x2L): client.titleSelectable
        flag 2 (0x3L): client.description
        flag 3 (0x4L): client.title
        flag 4 (0x5L): client
        flag 5 (0x6L): null
    flag mapping end*/
    //end
}