package zf;

import android.util.SparseIntArray;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.databinding.n;
import ca.canadapost.core.common.ui.CpcDialogFragmentFullView;
import ca.canadapost.core.common.ui.CpcFormatView;
import cg.a;
import jg.q4;

/* loaded from: classes4.dex */
public class p3 extends o3 implements a.InterfaceC0282a {
    private static final n.i M;
    private static final SparseIntArray N;
    private final LinearLayout I;
    private final View.OnClickListener J;
    private final View.OnClickListener K;
    private long L;

    static {
        n.i iVar = new n.i(8);
        M = iVar;
        int i10 = yf.e.f52496a;
        iVar.a(2, new String[]{"basic_horizontal_image_text_view", "basic_horizontal_image_text_view", "basic_horizontal_image_text_view"}, new int[]{3, 4, 5}, new int[]{i10, i10, i10});
        SparseIntArray sparseIntArray = new SparseIntArray();
        N = sparseIntArray;
        sparseIntArray.put(yf.d.f52493z, 6);
        sparseIntArray.put(yf.d.f52490y, 7);
    }

    public p3(androidx.databinding.e eVar, View view) {
        this(eVar, view, androidx.databinding.n.E(eVar, view, 8, M, N));
    }

    private boolean U(a aVar, int i10) {
        if (i10 != yf.a.f52370a) {
            return false;
        }
        synchronized (this) {
            this.L |= 1;
        }
        return true;
    }

    private boolean V(a aVar, int i10) {
        if (i10 != yf.a.f52370a) {
            return false;
        }
        synchronized (this) {
            this.L |= 4;
        }
        return true;
    }

    private boolean W(a aVar, int i10) {
        if (i10 != yf.a.f52370a) {
            return false;
        }
        synchronized (this) {
            this.L |= 2;
        }
        return true;
    }

    @Override // androidx.databinding.n
    public void B() {
        synchronized (this) {
            this.L = 16L;
        }
        this.E.B();
        this.F.B();
        this.G.B();
        J();
    }

    @Override // androidx.databinding.n
    protected boolean F(int i10, Object obj, int i11) {
        if (i10 == 0) {
            return U((a) obj, i11);
        }
        if (i10 == 1) {
            return W((a) obj, i11);
        }
        if (i10 != 2) {
            return false;
        }
        return V((a) obj, i11);
    }

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

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

    public void X(q4 q4Var) {
        this.H = q4Var;
        synchronized (this) {
            this.L |= 8;
        }
        f(yf.a.f52373d);
        super.J();
    }

    @Override // cg.a.InterfaceC0282a
    public final void a(int i10, View view) {
        if (i10 == 1) {
            q4 q4Var = this.H;
            if (q4Var != null) {
                q4Var.V();
                return;
            }
            return;
        }
        if (i10 != 2) {
            return;
        }
        q4 q4Var2 = this.H;
        if (q4Var2 != null) {
            q4Var2.U();
        }
    }

    @Override // androidx.databinding.n
    protected void n() {
        long j10;
        synchronized (this) {
            j10 = this.L;
            this.L = 0L;
        }
        q4 q4Var = this.H;
        long j11 = 24 & j10;
        String Q = (j11 == 0 || q4Var == null) ? null : q4Var.Q();
        if ((j10 & 16) != 0) {
            u8.m.a(this.A, this.J);
            u8.m.b(this.A, this.K);
            this.E.U(j.a.b(x().getContext(), yf.c.L));
            this.E.V(x().getResources().getString(yf.h.C));
            this.F.U(j.a.b(x().getContext(), yf.c.f52411t));
            this.F.V(x().getResources().getString(yf.h.f52664x));
            this.G.U(j.a.b(x().getContext(), yf.c.f52409r));
            this.G.V(x().getResources().getString(yf.h.C2));
        }
        if (j11 != 0) {
            this.A.setPrimaryButtonText(Q);
        }
        androidx.databinding.n.p(this.E);
        androidx.databinding.n.p(this.F);
        androidx.databinding.n.p(this.G);
    }

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

    private p3(androidx.databinding.e eVar, View view, Object[] objArr) {
        super(eVar, view, 3, (CpcFormatView) objArr[1], (TextView) objArr[7], (TextView) objArr[6], (CpcDialogFragmentFullView) objArr[0], (a) objArr[3], (a) objArr[4], (a) objArr[5]);
        this.L = -1L;
        this.A.setTag(null);
        this.D.setTag(null);
        LinearLayout linearLayout = (LinearLayout) objArr[2];
        this.I = linearLayout;
        linearLayout.setTag(null);
        N(this.E);
        N(this.F);
        N(this.G);
        P(view);
        this.J = new cg.a(this, 1);
        this.K = new cg.a(this, 2);
        B();
    }
}
