package defpackage;

import android.animation.ValueAnimator;
import android.view.ViewGroup;
import android.widget.ImageView;
import defpackage.kd7;

/* JADX INFO: loaded from: classes3.dex */
public final /* synthetic */ class ld7 implements ValueAnimator.AnimatorUpdateListener {
    public final /* synthetic */ int a;
    public final /* synthetic */ kd7.b b;

    public /* synthetic */ ld7(kd7.b bVar, int i) {
        this.a = i;
        this.b = bVar;
    }

    @Override // android.animation.ValueAnimator.AnimatorUpdateListener
    public final void onAnimationUpdate(ValueAnimator valueAnimator) {
        int i = this.a;
        kd7.b bVar = this.b;
        switch (i) {
            case 0:
                int i2 = kd7.b.ag;
                cr4.g(valueAnimator, "animator");
                ViewGroup.LayoutParams layoutParams = bVar.itemView.getLayoutParams();
                if (layoutParams != null) {
                    Object animatedValue = valueAnimator.getAnimatedValue();
                    cr4.e(animatedValue, "null cannot be cast to non-null type kotlin.Int");
                    layoutParams.width = ((Integer) animatedValue).intValue();
                    bVar.itemView.setLayoutParams(layoutParams);
                }
                break;
            case 1:
                int i3 = kd7.b.ag;
                cr4.g(valueAnimator, "it");
                ImageView imageView = bVar.a;
                Object animatedValue2 = valueAnimator.getAnimatedValue();
                cr4.e(animatedValue2, "null cannot be cast to non-null type kotlin.Float");
                imageView.setAlpha(((Float) animatedValue2).floatValue());
                break;
            default:
                int i4 = kd7.b.ag;
                cr4.g(valueAnimator, "animator");
                ViewGroup.LayoutParams layoutParams2 = bVar.itemView.getLayoutParams();
                if (layoutParams2 != null) {
                    Object animatedValue3 = valueAnimator.getAnimatedValue();
                    cr4.e(animatedValue3, "null cannot be cast to non-null type kotlin.Int");
                    layoutParams2.width = ((Integer) animatedValue3).intValue();
                    bVar.itemView.setLayoutParams(layoutParams2);
                }
                break;
        }
    }
}
