package zf;

import android.content.res.Resources;
import android.util.SparseIntArray;
import android.view.View;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.databinding.n;
import cg.a;

/* loaded from: classes4.dex */
public class h2 extends g2 implements a.InterfaceC0282a {
    private static final n.i R;
    private static final SparseIntArray S;
    private final LinearLayout G;
    private final TextView H;
    private final TextView I;
    private final TextView J;
    private final LinearLayout K;
    private final TextView L;
    private final LinearLayout M;
    private final TextView N;
    private final View.OnClickListener O;
    private final View.OnClickListener P;
    private long Q;

    static {
        n.i iVar = new n.i(13);
        R = iVar;
        iVar.a(0, new String[]{"package_item_feature_duty_taxes_buttons", "package_item_feature_pay_dutied_n_taxes_link"}, new int[]{9, 10}, new int[]{yf.e.T, yf.e.X});
        SparseIntArray sparseIntArray = new SparseIntArray();
        S = sparseIntArray;
        sparseIntArray.put(yf.d.B0, 11);
        sparseIntArray.put(yf.d.f52466q, 12);
    }

    public h2(androidx.databinding.e eVar, View view) {
        this(eVar, view, androidx.databinding.n.E(eVar, view, 13, R, S));
    }

    private boolean V(i2 i2Var, int i10) {
        if (i10 != yf.a.f52370a) {
            return false;
        }
        synchronized (this) {
            this.Q |= 2;
        }
        return true;
    }

    private boolean W(androidx.lifecycle.f0 f0Var, int i10) {
        if (i10 != yf.a.f52370a) {
            return false;
        }
        synchronized (this) {
            this.Q |= 4;
        }
        return true;
    }

    private boolean X(androidx.lifecycle.f0 f0Var, int i10) {
        if (i10 != yf.a.f52370a) {
            return false;
        }
        synchronized (this) {
            this.Q |= 1;
        }
        return true;
    }

    private boolean Y(q2 q2Var, int i10) {
        if (i10 != yf.a.f52370a) {
            return false;
        }
        synchronized (this) {
            this.Q |= 8;
        }
        return true;
    }

    @Override // androidx.databinding.n
    public void B() {
        synchronized (this) {
            this.Q = 32L;
        }
        this.A.B();
        this.E.B();
        J();
    }

    @Override // androidx.databinding.n
    protected boolean F(int i10, Object obj, int i11) {
        if (i10 == 0) {
            return X((androidx.lifecycle.f0) obj, i11);
        }
        if (i10 == 1) {
            return V((i2) obj, i11);
        }
        if (i10 == 2) {
            return W((androidx.lifecycle.f0) obj, i11);
        }
        if (i10 != 3) {
            return false;
        }
        return Y((q2) obj, i11);
    }

    @Override // androidx.databinding.n
    public void O(androidx.lifecycle.u uVar) {
        super.O(uVar);
        this.A.O(uVar);
        this.E.O(uVar);
    }

    @Override // androidx.databinding.n
    public boolean Q(int i10, Object obj) {
        if (yf.a.f52373d != i10) {
            return false;
        }
        U((jg.i3) obj);
        return true;
    }

    @Override // zf.g2
    public void U(jg.i3 i3Var) {
        this.F = i3Var;
        synchronized (this) {
            this.Q |= 16;
        }
        f(yf.a.f52373d);
        super.J();
    }

    @Override // cg.a.InterfaceC0282a
    public final void a(int i10, View view) {
        if (i10 == 1) {
            jg.i3 i3Var = this.F;
            if (i3Var != null) {
                i3Var.Y0();
                return;
            }
            return;
        }
        if (i10 != 2) {
            return;
        }
        jg.i3 i3Var2 = this.F;
        if (i3Var2 != null) {
            i3Var2.c1();
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:35:0x008b  */
    /* JADX WARN: Removed duplicated region for block: B:38:0x0095  */
    /* JADX WARN: Removed duplicated region for block: B:41:0x00a2  */
    /* JADX WARN: Removed duplicated region for block: B:46:0x0133  */
    @Override // androidx.databinding.n
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    protected void n() {
        long j10;
        String str;
        synchronized (this) {
            j10 = this.Q;
            this.Q = 0L;
        }
        jg.i3 i3Var = this.F;
        int i10 = 0;
        if ((53 & j10) != 0) {
            long j11 = j10 & 49;
            if (j11 != 0) {
                androidx.lifecycle.f0 q02 = i3Var != null ? i3Var.q0() : null;
                S(0, q02);
                boolean M = androidx.databinding.n.M(q02 != null ? (Boolean) q02.f() : null);
                if (j11 != 0) {
                    j10 |= M ? 128L : 64L;
                }
                if (!M) {
                    i10 = 8;
                }
            }
            if ((j10 & 52) != 0) {
                androidx.lifecycle.f0 d02 = i3Var != null ? i3Var.d0() : null;
                S(2, d02);
                r12 = d02 != null ? (String) d02.f() : null;
                String str2 = r12;
                r12 = this.K.getResources().getString(yf.h.f52615n0) + r12;
                str = str2;
                if ((48 & j10) != 0) {
                    this.A.U(i3Var);
                }
                if ((49 & j10) != 0) {
                    this.C.setVisibility(i10);
                }
                if ((32 & j10) != 0) {
                    this.C.setOnClickListener(this.O);
                    this.M.setOnClickListener(this.P);
                    if (androidx.databinding.n.u() >= 4) {
                        TextView textView = this.H;
                        Resources resources = textView.getResources();
                        int i11 = yf.h.I0;
                        textView.setContentDescription(resources.getString(i11, this.H.getResources().getString(yf.h.f52600k0)));
                        TextView textView2 = this.I;
                        textView2.setContentDescription(textView2.getResources().getString(i11, this.I.getResources().getString(yf.h.f52633q3)));
                        TextView textView3 = this.J;
                        textView3.setContentDescription(textView3.getResources().getString(i11, this.J.getResources().getString(yf.h.f52566d1)));
                        TextView textView4 = this.N;
                        textView4.setContentDescription(textView4.getResources().getString(yf.h.E, this.N.getResources().getString(yf.h.f52663w3)));
                    }
                }
                if ((j10 & 52) != 0) {
                    if (androidx.databinding.n.u() >= 4) {
                        this.K.setContentDescription(r12);
                    }
                    b4.e.e(this.L, str);
                }
                androidx.databinding.n.p(this.A);
                androidx.databinding.n.p(this.E);
            }
        }
        str = null;
        if ((48 & j10) != 0) {
        }
        if ((49 & j10) != 0) {
        }
        if ((32 & j10) != 0) {
        }
        if ((j10 & 52) != 0) {
        }
        androidx.databinding.n.p(this.A);
        androidx.databinding.n.p(this.E);
    }

    @Override // androidx.databinding.n
    public boolean z() {
        synchronized (this) {
            if (this.Q != 0) {
                return true;
            }
            return this.A.z() || this.E.z();
        }
    }

    private h2(androidx.databinding.e eVar, View view, Object[] objArr) {
        super(eVar, view, 4, (i2) objArr[9], (CheckBox) objArr[12], (ImageView) objArr[6], (TextView) objArr[11], (q2) objArr[10]);
        this.Q = -1L;
        N(this.A);
        this.C.setTag(null);
        LinearLayout linearLayout = (LinearLayout) objArr[0];
        this.G = linearLayout;
        linearLayout.setTag(null);
        TextView textView = (TextView) objArr[1];
        this.H = textView;
        textView.setTag(null);
        TextView textView2 = (TextView) objArr[2];
        this.I = textView2;
        textView2.setTag(null);
        TextView textView3 = (TextView) objArr[3];
        this.J = textView3;
        textView3.setTag(null);
        LinearLayout linearLayout2 = (LinearLayout) objArr[4];
        this.K = linearLayout2;
        linearLayout2.setTag(null);
        TextView textView4 = (TextView) objArr[5];
        this.L = textView4;
        textView4.setTag(null);
        LinearLayout linearLayout3 = (LinearLayout) objArr[7];
        this.M = linearLayout3;
        linearLayout3.setTag(null);
        TextView textView5 = (TextView) objArr[8];
        this.N = textView5;
        textView5.setTag(null);
        N(this.E);
        P(view);
        this.O = new cg.a(this, 1);
        this.P = new cg.a(this, 2);
        B();
    }
}
