package o;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.content.res.ColorStateList;
import android.view.View;
import androidx.appcompat.widget.ActionBarOverlayLayout;
import com.google.android.material.behavior.HideBottomViewOnScrollBehavior;
import java.util.ArrayList;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class X0 extends AnimatorListenerAdapter {
    public final /* synthetic */ int a;
    public final /* synthetic */ Object b;

    public /* synthetic */ X0(int i, Object obj) {
        this.a = i;
        this.b = obj;
    }

    @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
    public void onAnimationCancel(Animator animator) {
        switch (this.a) {
            case 0:
                ActionBarOverlayLayout actionBarOverlayLayout = (ActionBarOverlayLayout) this.b;
                actionBarOverlayLayout.H = null;
                actionBarOverlayLayout.u = false;
                break;
            case 5:
                ((InterfaceC1888mk0) this.b).b();
                break;
            default:
                super.onAnimationCancel(animator);
                break;
        }
    }

    @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
    public final void onAnimationEnd(Animator animator) {
        switch (this.a) {
            case 0:
                ActionBarOverlayLayout actionBarOverlayLayout = (ActionBarOverlayLayout) this.b;
                actionBarOverlayLayout.H = null;
                actionBarOverlayLayout.u = false;
                break;
            case 1:
                G6 g6 = (G6) this.b;
                ArrayList arrayList = new ArrayList(g6.p);
                int size = arrayList.size();
                for (int i = 0; i < size; i++) {
                    ColorStateList colorStateList = ((WN) arrayList.get(i)).b.z;
                    if (colorStateList != null) {
                        g6.setTintList(colorStateList);
                    }
                }
                break;
            case 2:
                C0253Jt c0253Jt = (C0253Jt) this.b;
                c0253Jt.p();
                c0253Jt.r.start();
                break;
            case 3:
                ((HideBottomViewOnScrollBehavior) this.b).h = null;
                break;
            case 4:
                ((AbstractC3019yg0) this.b).n();
                animator.removeListener(this);
                break;
            default:
                ((InterfaceC1888mk0) this.b).a();
                break;
        }
    }

    @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
    public void onAnimationStart(Animator animator) {
        switch (this.a) {
            case 1:
                G6 g6 = (G6) this.b;
                ArrayList arrayList = new ArrayList(g6.p);
                int size = arrayList.size();
                for (int i = 0; i < size; i++) {
                    YN yn = ((WN) arrayList.get(i)).b;
                    ColorStateList colorStateList = yn.z;
                    if (colorStateList != null) {
                        g6.setTint(colorStateList.getColorForState(yn.D, colorStateList.getDefaultColor()));
                    }
                }
                break;
            case 5:
                ((InterfaceC1888mk0) this.b).c();
                break;
            default:
                super.onAnimationStart(animator);
                break;
        }
    }

    public X0(InterfaceC1888mk0 interfaceC1888mk0, View view) {
        this.a = 5;
        this.b = interfaceC1888mk0;
    }
}
