package defpackage;

import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.content.res.Resources;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.LinearInterpolator;
import ar.tvplayer.tv.R;
import java.util.ArrayList;
import java.util.Iterator;

/* renamed from: ᵗᵯ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C2473 {

    /* renamed from: ˀᵗᵝᵭ, reason: contains not printable characters */
    public boolean f9646;

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public final ViewGroup f9647;

    /* renamed from: ˌʾˀ, reason: contains not printable characters */
    public final AnimatorSet f9648;

    /* renamed from: ˌᵜᵹᵩ, reason: contains not printable characters */
    public final View f9649;

    /* renamed from: ˎˏʜʾ, reason: contains not printable characters */
    public final ViewGroup f9650;

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public final ViewGroup f9651;

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public final ViewGroup f9652;

    /* renamed from: ᵝᵵᵺ, reason: contains not printable characters */
    public final ViewGroup f9655;

    /* renamed from: ᵞʡ, reason: contains not printable characters */
    public final ValueAnimator f9656;

    /* renamed from: ᵡʠ, reason: contains not printable characters */
    public final AnimatorSet f9657;

    /* renamed from: ᵡˎ, reason: contains not printable characters */
    public boolean f9658;

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final C5225 f9662;

    /* renamed from: ᵪʩ, reason: contains not printable characters */
    public final AnimatorSet f9665;

    /* renamed from: ᵯٴᵦ, reason: contains not printable characters */
    public final AnimatorSet f9666;

    /* renamed from: ᵳٴᵶ, reason: contains not printable characters */
    public final AnimatorSet f9667;

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public final View f9668;

    /* renamed from: ᵶᵷᵕ, reason: contains not printable characters */
    public final ViewGroup f9669;

    /* renamed from: ᵸʓᵠ, reason: contains not printable characters */
    public final ValueAnimator f9670;

    /* renamed from: ᵸˑ, reason: contains not printable characters */
    public final View f9671;

    /* renamed from: ᵹᵝᵶ, reason: contains not printable characters */
    public final ViewGroup f9672;

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public final ViewGroup f9673;

    /* renamed from: ᵨᵳʝ, reason: contains not printable characters */
    public final RunnableC2688 f9664 = new RunnableC2688(this, 0);

    /* renamed from: ˑᵱ, reason: contains not printable characters */
    public final RunnableC2688 f9654 = new RunnableC2688(this, 3);

    /* renamed from: ᵧᵾˀˈ, reason: contains not printable characters */
    public final RunnableC2688 f9663 = new RunnableC2688(this, 4);

    /* renamed from: ᵢˇᵭ, reason: contains not printable characters */
    public final RunnableC2688 f9660 = new RunnableC2688(this, 5);

    /* renamed from: ᵿʗᵝʽ, reason: contains not printable characters */
    public final RunnableC2688 f9675 = new RunnableC2688(this, 6);

    /* renamed from: ᵾᵬ, reason: contains not printable characters */
    public final ViewOnLayoutChangeListenerC4452 f9674 = new ViewOnLayoutChangeListenerC4452(2, this);

    /* renamed from: ˑᵥˁ, reason: contains not printable characters */
    public boolean f9653 = true;

    /* renamed from: ᵡⁱᵥ, reason: contains not printable characters */
    public int f9659 = 0;

    /* renamed from: ᵤᵙᵷ, reason: contains not printable characters */
    public final ArrayList f9661 = new ArrayList();

    public C2473(C5225 c5225) throws Resources.NotFoundException {
        this.f9662 = c5225;
        final int i = 0;
        final int i2 = 3;
        final int i3 = 2;
        final int i4 = 1;
        this.f9652 = (ViewGroup) c5225.findViewById(R.id._11_res_0x7f0b0191);
        this.f9668 = c5225.findViewById(R.id._11_res_0x7f0b016b);
        this.f9673 = (ViewGroup) c5225.findViewById(R.id._11_res_0x7f0b0166);
        this.f9651 = (ViewGroup) c5225.findViewById(R.id._11_res_0x7f0b0177);
        ViewGroup viewGroup = (ViewGroup) c5225.findViewById(R.id._11_res_0x7f0b0164);
        this.f9647 = viewGroup;
        this.f9669 = (ViewGroup) c5225.findViewById(R.id._11_res_0x7f0b0190);
        View viewFindViewById = c5225.findViewById(R.id._11_res_0x7f0b0183);
        this.f9671 = viewFindViewById;
        this.f9650 = (ViewGroup) c5225.findViewById(R.id._11_res_0x7f0b0163);
        this.f9672 = (ViewGroup) c5225.findViewById(R.id._11_res_0x7f0b016e);
        this.f9655 = (ViewGroup) c5225.findViewById(R.id._11_res_0x7f0b016f);
        View viewFindViewById2 = c5225.findViewById(R.id._11_res_0x7f0b017b);
        this.f9649 = viewFindViewById2;
        View viewFindViewById3 = c5225.findViewById(R.id._11_res_0x7f0b017a);
        if (viewFindViewById2 != null && viewFindViewById3 != null) {
            viewFindViewById2.setOnClickListener(new ᵳˋˁ(11, this));
            viewFindViewById3.setOnClickListener(new ᵳˋˁ(11, this));
        }
        ValueAnimator valueAnimatorOfFloat = ValueAnimator.ofFloat(1.0f, 0.0f);
        valueAnimatorOfFloat.setInterpolator(new LinearInterpolator());
        valueAnimatorOfFloat.addUpdateListener(new ValueAnimator.AnimatorUpdateListener(this) { // from class: ᵣˏˎ

            /* renamed from: ᵴᵳ, reason: contains not printable characters */
            public final /* synthetic */ C2473 f12537;

            {
                this.f12537 = this;
            }

            @Override // android.animation.ValueAnimator.AnimatorUpdateListener
            public final void onAnimationUpdate(ValueAnimator valueAnimator) {
                int i5 = i2;
                C2473 c2473 = this.f12537;
                switch (i5) {
                    case 0:
                        float fFloatValue = ((Float) valueAnimator.getAnimatedValue()).floatValue();
                        View view = c2473.f9668;
                        if (view != null) {
                            view.setAlpha(fFloatValue);
                        }
                        ViewGroup viewGroup2 = c2473.f9652;
                        if (viewGroup2 != null) {
                            viewGroup2.setAlpha(fFloatValue);
                        }
                        ViewGroup viewGroup3 = c2473.f9673;
                        if (viewGroup3 != null) {
                            viewGroup3.setAlpha(fFloatValue);
                        }
                        ViewGroup viewGroup4 = c2473.f9651;
                        if (viewGroup4 != null) {
                            viewGroup4.setAlpha(fFloatValue);
                            break;
                        }
                        break;
                    case 1:
                        c2473.m6315(((Float) valueAnimator.getAnimatedValue()).floatValue());
                        break;
                    case 2:
                        c2473.m6315(((Float) valueAnimator.getAnimatedValue()).floatValue());
                        break;
                    default:
                        float fFloatValue2 = ((Float) valueAnimator.getAnimatedValue()).floatValue();
                        View view2 = c2473.f9668;
                        if (view2 != null) {
                            view2.setAlpha(fFloatValue2);
                        }
                        ViewGroup viewGroup5 = c2473.f9652;
                        if (viewGroup5 != null) {
                            viewGroup5.setAlpha(fFloatValue2);
                        }
                        ViewGroup viewGroup6 = c2473.f9673;
                        if (viewGroup6 != null) {
                            viewGroup6.setAlpha(fFloatValue2);
                        }
                        ViewGroup viewGroup7 = c2473.f9651;
                        if (viewGroup7 != null) {
                            viewGroup7.setAlpha(fFloatValue2);
                            break;
                        }
                        break;
                }
            }
        });
        valueAnimatorOfFloat.addListener(new C1035(this, 0));
        ValueAnimator valueAnimatorOfFloat2 = ValueAnimator.ofFloat(0.0f, 1.0f);
        valueAnimatorOfFloat2.setInterpolator(new LinearInterpolator());
        valueAnimatorOfFloat2.addUpdateListener(new ValueAnimator.AnimatorUpdateListener(this) { // from class: ᵣˏˎ

            /* renamed from: ᵴᵳ, reason: contains not printable characters */
            public final /* synthetic */ C2473 f12537;

            {
                this.f12537 = this;
            }

            @Override // android.animation.ValueAnimator.AnimatorUpdateListener
            public final void onAnimationUpdate(ValueAnimator valueAnimator) {
                int i5 = i;
                C2473 c2473 = this.f12537;
                switch (i5) {
                    case 0:
                        float fFloatValue = ((Float) valueAnimator.getAnimatedValue()).floatValue();
                        View view = c2473.f9668;
                        if (view != null) {
                            view.setAlpha(fFloatValue);
                        }
                        ViewGroup viewGroup2 = c2473.f9652;
                        if (viewGroup2 != null) {
                            viewGroup2.setAlpha(fFloatValue);
                        }
                        ViewGroup viewGroup3 = c2473.f9673;
                        if (viewGroup3 != null) {
                            viewGroup3.setAlpha(fFloatValue);
                        }
                        ViewGroup viewGroup4 = c2473.f9651;
                        if (viewGroup4 != null) {
                            viewGroup4.setAlpha(fFloatValue);
                            break;
                        }
                        break;
                    case 1:
                        c2473.m6315(((Float) valueAnimator.getAnimatedValue()).floatValue());
                        break;
                    case 2:
                        c2473.m6315(((Float) valueAnimator.getAnimatedValue()).floatValue());
                        break;
                    default:
                        float fFloatValue2 = ((Float) valueAnimator.getAnimatedValue()).floatValue();
                        View view2 = c2473.f9668;
                        if (view2 != null) {
                            view2.setAlpha(fFloatValue2);
                        }
                        ViewGroup viewGroup5 = c2473.f9652;
                        if (viewGroup5 != null) {
                            viewGroup5.setAlpha(fFloatValue2);
                        }
                        ViewGroup viewGroup6 = c2473.f9673;
                        if (viewGroup6 != null) {
                            viewGroup6.setAlpha(fFloatValue2);
                        }
                        ViewGroup viewGroup7 = c2473.f9651;
                        if (viewGroup7 != null) {
                            viewGroup7.setAlpha(fFloatValue2);
                            break;
                        }
                        break;
                }
            }
        });
        valueAnimatorOfFloat2.addListener(new C1035(this, 1));
        Resources resources = c5225.getResources();
        float dimension = resources.getDimension(R.dimen._11_res_0x7f0700bb) - resources.getDimension(R.dimen._11_res_0x7f0700c0);
        float dimension2 = resources.getDimension(R.dimen._11_res_0x7f0700bb);
        AnimatorSet animatorSet = new AnimatorSet();
        this.f9666 = animatorSet;
        animatorSet.setDuration(250L);
        animatorSet.addListener(new C0184(this, c5225, i));
        animatorSet.play(valueAnimatorOfFloat).with(m6310(viewFindViewById, 0.0f, dimension)).with(m6310(viewGroup, 0.0f, dimension));
        AnimatorSet animatorSet2 = new AnimatorSet();
        this.f9665 = animatorSet2;
        animatorSet2.setDuration(250L);
        animatorSet2.addListener(new C0184(this, c5225, i4));
        animatorSet2.play(m6310(viewFindViewById, dimension, dimension2)).with(m6310(viewGroup, dimension, dimension2));
        AnimatorSet animatorSet3 = new AnimatorSet();
        this.f9667 = animatorSet3;
        animatorSet3.setDuration(250L);
        animatorSet3.addListener(new C0184(this, c5225, i3));
        animatorSet3.play(valueAnimatorOfFloat).with(m6310(viewFindViewById, 0.0f, dimension2)).with(m6310(viewGroup, 0.0f, dimension2));
        AnimatorSet animatorSet4 = new AnimatorSet();
        this.f9648 = animatorSet4;
        animatorSet4.setDuration(250L);
        animatorSet4.addListener(new C1035(this, 2));
        animatorSet4.play(valueAnimatorOfFloat2).with(m6310(viewFindViewById, dimension, 0.0f)).with(m6310(viewGroup, dimension, 0.0f));
        AnimatorSet animatorSet5 = new AnimatorSet();
        this.f9657 = animatorSet5;
        animatorSet5.setDuration(250L);
        animatorSet5.addListener(new C1035(this, 3));
        animatorSet5.play(valueAnimatorOfFloat2).with(m6310(viewFindViewById, dimension2, 0.0f)).with(m6310(viewGroup, dimension2, 0.0f));
        ValueAnimator valueAnimatorOfFloat3 = ValueAnimator.ofFloat(0.0f, 1.0f);
        this.f9670 = valueAnimatorOfFloat3;
        valueAnimatorOfFloat3.setDuration(250L);
        valueAnimatorOfFloat3.addUpdateListener(new ValueAnimator.AnimatorUpdateListener(this) { // from class: ᵣˏˎ

            /* renamed from: ᵴᵳ, reason: contains not printable characters */
            public final /* synthetic */ C2473 f12537;

            {
                this.f12537 = this;
            }

            @Override // android.animation.ValueAnimator.AnimatorUpdateListener
            public final void onAnimationUpdate(ValueAnimator valueAnimator) {
                int i5 = i4;
                C2473 c2473 = this.f12537;
                switch (i5) {
                    case 0:
                        float fFloatValue = ((Float) valueAnimator.getAnimatedValue()).floatValue();
                        View view = c2473.f9668;
                        if (view != null) {
                            view.setAlpha(fFloatValue);
                        }
                        ViewGroup viewGroup2 = c2473.f9652;
                        if (viewGroup2 != null) {
                            viewGroup2.setAlpha(fFloatValue);
                        }
                        ViewGroup viewGroup3 = c2473.f9673;
                        if (viewGroup3 != null) {
                            viewGroup3.setAlpha(fFloatValue);
                        }
                        ViewGroup viewGroup4 = c2473.f9651;
                        if (viewGroup4 != null) {
                            viewGroup4.setAlpha(fFloatValue);
                            break;
                        }
                        break;
                    case 1:
                        c2473.m6315(((Float) valueAnimator.getAnimatedValue()).floatValue());
                        break;
                    case 2:
                        c2473.m6315(((Float) valueAnimator.getAnimatedValue()).floatValue());
                        break;
                    default:
                        float fFloatValue2 = ((Float) valueAnimator.getAnimatedValue()).floatValue();
                        View view2 = c2473.f9668;
                        if (view2 != null) {
                            view2.setAlpha(fFloatValue2);
                        }
                        ViewGroup viewGroup5 = c2473.f9652;
                        if (viewGroup5 != null) {
                            viewGroup5.setAlpha(fFloatValue2);
                        }
                        ViewGroup viewGroup6 = c2473.f9673;
                        if (viewGroup6 != null) {
                            viewGroup6.setAlpha(fFloatValue2);
                        }
                        ViewGroup viewGroup7 = c2473.f9651;
                        if (viewGroup7 != null) {
                            viewGroup7.setAlpha(fFloatValue2);
                            break;
                        }
                        break;
                }
            }
        });
        valueAnimatorOfFloat3.addListener(new C1035(this, 4));
        ValueAnimator valueAnimatorOfFloat4 = ValueAnimator.ofFloat(1.0f, 0.0f);
        this.f9656 = valueAnimatorOfFloat4;
        valueAnimatorOfFloat4.setDuration(250L);
        valueAnimatorOfFloat4.addUpdateListener(new ValueAnimator.AnimatorUpdateListener(this) { // from class: ᵣˏˎ

            /* renamed from: ᵴᵳ, reason: contains not printable characters */
            public final /* synthetic */ C2473 f12537;

            {
                this.f12537 = this;
            }

            @Override // android.animation.ValueAnimator.AnimatorUpdateListener
            public final void onAnimationUpdate(ValueAnimator valueAnimator) {
                int i5 = i3;
                C2473 c2473 = this.f12537;
                switch (i5) {
                    case 0:
                        float fFloatValue = ((Float) valueAnimator.getAnimatedValue()).floatValue();
                        View view = c2473.f9668;
                        if (view != null) {
                            view.setAlpha(fFloatValue);
                        }
                        ViewGroup viewGroup2 = c2473.f9652;
                        if (viewGroup2 != null) {
                            viewGroup2.setAlpha(fFloatValue);
                        }
                        ViewGroup viewGroup3 = c2473.f9673;
                        if (viewGroup3 != null) {
                            viewGroup3.setAlpha(fFloatValue);
                        }
                        ViewGroup viewGroup4 = c2473.f9651;
                        if (viewGroup4 != null) {
                            viewGroup4.setAlpha(fFloatValue);
                            break;
                        }
                        break;
                    case 1:
                        c2473.m6315(((Float) valueAnimator.getAnimatedValue()).floatValue());
                        break;
                    case 2:
                        c2473.m6315(((Float) valueAnimator.getAnimatedValue()).floatValue());
                        break;
                    default:
                        float fFloatValue2 = ((Float) valueAnimator.getAnimatedValue()).floatValue();
                        View view2 = c2473.f9668;
                        if (view2 != null) {
                            view2.setAlpha(fFloatValue2);
                        }
                        ViewGroup viewGroup5 = c2473.f9652;
                        if (viewGroup5 != null) {
                            viewGroup5.setAlpha(fFloatValue2);
                        }
                        ViewGroup viewGroup6 = c2473.f9673;
                        if (viewGroup6 != null) {
                            viewGroup6.setAlpha(fFloatValue2);
                        }
                        ViewGroup viewGroup7 = c2473.f9651;
                        if (viewGroup7 != null) {
                            viewGroup7.setAlpha(fFloatValue2);
                            break;
                        }
                        break;
                }
            }
        });
        valueAnimatorOfFloat4.addListener(new C1035(this, 5));
    }

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public static int m6308(View view) {
        if (view == null) {
            return 0;
        }
        int width = view.getWidth();
        ViewGroup.LayoutParams layoutParams = view.getLayoutParams();
        if (!(layoutParams instanceof ViewGroup.MarginLayoutParams)) {
            return width;
        }
        ViewGroup.MarginLayoutParams marginLayoutParams = (ViewGroup.MarginLayoutParams) layoutParams;
        return marginLayoutParams.leftMargin + marginLayoutParams.rightMargin + width;
    }

    /* renamed from: ᵶᵷᵕ, reason: contains not printable characters */
    public static boolean m6309(View view) {
        int id = view.getId();
        return id == R.id._11_res_0x7f0b0164 || id == R.id._11_res_0x7f0b0176 || id == R.id._11_res_0x7f0b0182 || id == R.id._11_res_0x7f0b0179 || id == R.id._11_res_0x7f0b0186 || id == R.id._11_res_0x7f0b0187 || id == R.id._11_res_0x7f0b0170 || id == R.id._11_res_0x7f0b0171;
    }

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public static ObjectAnimator m6310(View view, float f, float f2) {
        return ObjectAnimator.ofFloat(view, "translationY", f, f2);
    }

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public final void m6311(Runnable runnable, long j) {
        if (j >= 0) {
            this.f9662.postDelayed(runnable, j);
        }
    }

    /* renamed from: ˎˏʜʾ, reason: contains not printable characters */
    public final void m6312() {
        if (this.f9659 == 3) {
            return;
        }
        m6313();
        int showTimeoutMs = this.f9662.getShowTimeoutMs();
        if (showTimeoutMs > 0) {
            if (!this.f9653) {
                m6311(this.f9675, showTimeoutMs);
            } else if (this.f9659 == 1) {
                m6311(this.f9663, 2000L);
            } else {
                m6311(this.f9660, showTimeoutMs);
            }
        }
    }

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public final void m6313() {
        RunnableC2688 runnableC2688 = this.f9675;
        C5225 c5225 = this.f9662;
        c5225.removeCallbacks(runnableC2688);
        c5225.removeCallbacks(this.f9654);
        c5225.removeCallbacks(this.f9660);
        c5225.removeCallbacks(this.f9663);
    }

    /* renamed from: ᵝᵵᵺ, reason: contains not printable characters */
    public final void m6314(int i) {
        int i2 = this.f9659;
        this.f9659 = i;
        C5225 c5225 = this.f9662;
        if (i == 2) {
            c5225.setVisibility(8);
        } else if (i2 == 2) {
            c5225.setVisibility(0);
        }
        if (i2 != i) {
            Iterator it = c5225.f19565.iterator();
            while (it.hasNext()) {
                InterfaceC3027 interfaceC3027 = (InterfaceC3027) it.next();
                c5225.getVisibility();
                ((ViewOnClickListenerC4825) interfaceC3027).f17914.m9375();
            }
        }
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final void m6315(float f) {
        ViewGroup viewGroup = this.f9655;
        if (viewGroup != null) {
            viewGroup.setTranslationX((int) ((1.0f - f) * viewGroup.getWidth()));
        }
        ViewGroup viewGroup2 = this.f9669;
        if (viewGroup2 != null) {
            viewGroup2.setAlpha(1.0f - f);
        }
        ViewGroup viewGroup3 = this.f9650;
        if (viewGroup3 != null) {
            viewGroup3.setAlpha(1.0f - f);
        }
    }

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public final boolean m6316(View view) {
        return view != null && this.f9661.contains(view);
    }

    /* renamed from: ᵸˑ, reason: contains not printable characters */
    public final void m6317() {
        if (!this.f9653) {
            m6314(0);
            m6312();
            return;
        }
        int i = this.f9659;
        if (i == 1) {
            this.f9648.start();
        } else if (i == 2) {
            this.f9657.start();
        } else if (i == 3) {
            this.f9658 = true;
        } else if (i == 4) {
            return;
        }
        m6312();
    }

    /* renamed from: ᵹᵝᵶ, reason: contains not printable characters */
    public final void m6318(View view, boolean z) {
        if (view == null) {
            return;
        }
        ArrayList arrayList = this.f9661;
        if (!z) {
            view.setVisibility(8);
            arrayList.remove(view);
            return;
        }
        if (this.f9646 && m6309(view)) {
            view.setVisibility(4);
        } else {
            view.setVisibility(0);
        }
        arrayList.add(view);
    }
}
