package com.google.android.material.navigation;

import android.view.View;
import android.view.ViewGroup;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.recyclerview.widget.r1;
import ie.i5;

/* JADX INFO: loaded from: classes2.dex */
public final /* synthetic */ class c implements View.OnLayoutChangeListener {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ int f22950a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ Object f22951b;

    public /* synthetic */ c(Object obj, int i10) {
        this.f22950a = i10;
        this.f22951b = obj;
    }

    @Override // android.view.View.OnLayoutChangeListener
    public final void onLayoutChange(View view, int i10, int i11, int i12, int i13, int i14, int i15, int i16, int i17) {
        int i18 = this.f22950a;
        Object obj = this.f22951b;
        switch (i18) {
            case 0:
                NavigationBarItemView.a((NavigationBarItemView) obj, i10, i11, i12, i13);
                break;
            case 1:
                hf.c cVar = (hf.c) obj;
                if (i12 - i10 == i16 - i14) {
                    int i19 = hf.c.Q0;
                    cVar.getClass();
                } else {
                    ViewGroup.LayoutParams layoutParams = cVar.M0.f27643a.getLayoutParams();
                    layoutParams.width = -1;
                    cVar.M0.f27643a.setLayoutParams(layoutParams);
                }
                break;
            default:
                i5 i5Var = ((kf.i) obj).f29158a;
                if (i5Var != null && i12 - i10 != i16 - i14) {
                    ConstraintLayout constraintLayout = i5Var.f27010a;
                    ViewGroup.LayoutParams layoutParams2 = constraintLayout.getLayoutParams();
                    if (layoutParams2 == null) {
                        layoutParams2 = new r1(-1, constraintLayout.getMeasuredHeight() > 0 ? constraintLayout.getMeasuredHeight() : -2);
                    }
                    layoutParams2.width = -1;
                    constraintLayout.setLayoutParams(layoutParams2);
                }
                break;
        }
    }
}
