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;

/* JADX INFO: renamed from: ʿٴᵥ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C0408 {

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final View f2289;

    /* JADX INFO: renamed from: ˈᵲᵢ, reason: contains not printable characters */
    public boolean f2290;

    /* JADX INFO: renamed from: ˉᵲ, reason: contains not printable characters */
    public final ValueAnimator f2291;

    /* JADX INFO: renamed from: ˊᵙᵾᵲ, reason: contains not printable characters */
    public final ValueAnimator f2292;

    /* JADX INFO: renamed from: ˊᵨᵧ, reason: contains not printable characters */
    public final RunnableC1457 f2293;

    /* JADX INFO: renamed from: ˊᵫᵗ, reason: contains not printable characters */
    public final ViewGroup f2294;

    /* JADX INFO: renamed from: ˋˈ, reason: contains not printable characters */
    public final AnimatorSet f2295;

    /* JADX INFO: renamed from: ˌᵨʠᵫ, reason: contains not printable characters */
    public boolean f2297;

    /* JADX INFO: renamed from: ˏːˆ, reason: contains not printable characters */
    public final RunnableC1457 f2298;

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public final ViewGroup f2299;

    /* JADX INFO: renamed from: ᵝᵶ, reason: contains not printable characters */
    public final AnimatorSet f2302;

    /* JADX INFO: renamed from: ᵟᵹᵙ, reason: contains not printable characters */
    public final AnimatorSet f2303;

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public final ViewGroup f2304;

    /* JADX INFO: renamed from: ᵨᵼⁱ, reason: contains not printable characters */
    public final ViewOnLayoutChangeListenerC0889 f2305;

    /* JADX INFO: renamed from: ᵪᵹᵥᵻ, reason: contains not printable characters */
    public final AnimatorSet f2306;

    /* JADX INFO: renamed from: ᵮᵣᵗˈ, reason: contains not printable characters */
    public final View f2307;

    /* JADX INFO: renamed from: ᵱʡˏ, reason: contains not printable characters */
    public final AnimatorSet f2309;

    /* JADX INFO: renamed from: ᵱᵽʡᵚ, reason: contains not printable characters */
    public final ViewGroup f2310;

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final C1702 f2311;

    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    public final ViewGroup f2312;

    /* JADX INFO: renamed from: ᵶᵥᵝ, reason: contains not printable characters */
    public final View f2314;

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public final ViewGroup f2315;

    /* JADX INFO: renamed from: ᵻʽᵯ, reason: contains not printable characters */
    public final ViewGroup f2317;

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public final ViewGroup f2318;

    /* JADX INFO: renamed from: ˌᴵ, reason: contains not printable characters */
    public final RunnableC1457 f2296 = new RunnableC1457(this, 4);

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public final RunnableC1457 f2301 = new RunnableC1457(this, 5);

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public final RunnableC1457 f2300 = new RunnableC1457(this, 6);

    /* JADX INFO: renamed from: ᵸˆˁ, reason: contains not printable characters */
    public boolean f2316 = true;

    /* JADX INFO: renamed from: ᵶˇᵱ, reason: contains not printable characters */
    public int f2313 = 0;

    /* JADX INFO: renamed from: ᵯᵷʽ, reason: contains not printable characters */
    public final ArrayList f2308 = new ArrayList();

    public C0408(C1702 c1702) {
        this.f2311 = c1702;
        final int i = 0;
        this.f2298 = new RunnableC1457(this, i);
        final int i2 = 3;
        this.f2293 = new RunnableC1457(this, i2);
        final int i3 = 2;
        this.f2305 = new ViewOnLayoutChangeListenerC0889(i3, this);
        final int i4 = 1;
        this.f2299 = (ViewGroup) c1702.findViewById(R.id.h);
        this.f2289 = c1702.findViewById(R.id.h);
        this.f2315 = (ViewGroup) c1702.findViewById(R.id.h);
        this.f2318 = (ViewGroup) c1702.findViewById(R.id.h);
        ViewGroup viewGroup = (ViewGroup) c1702.findViewById(R.id.h);
        this.f2304 = viewGroup;
        this.f2310 = (ViewGroup) c1702.findViewById(R.id.h);
        View viewFindViewById = c1702.findViewById(R.id.h);
        this.f2314 = viewFindViewById;
        this.f2312 = (ViewGroup) c1702.findViewById(R.id.h);
        this.f2294 = (ViewGroup) c1702.findViewById(R.id.h);
        this.f2317 = (ViewGroup) c1702.findViewById(R.id.h);
        View viewFindViewById2 = c1702.findViewById(R.id.h);
        this.f2307 = viewFindViewById2;
        View viewFindViewById3 = c1702.findViewById(R.id.h);
        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: ᵤᵷٴ

            /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
            public final /* synthetic */ C0408 f13370;

            {
                this.f13370 = this;
            }

            @Override // android.animation.ValueAnimator.AnimatorUpdateListener
            public final void onAnimationUpdate(ValueAnimator valueAnimator) {
                int i5 = i2;
                C0408 c0408 = this.f13370;
                switch (i5) {
                    case 0:
                        float fFloatValue = ((Float) valueAnimator.getAnimatedValue()).floatValue();
                        View view = c0408.f2289;
                        if (view != null) {
                            view.setAlpha(fFloatValue);
                        }
                        ViewGroup viewGroup2 = c0408.f2299;
                        if (viewGroup2 != null) {
                            viewGroup2.setAlpha(fFloatValue);
                        }
                        ViewGroup viewGroup3 = c0408.f2315;
                        if (viewGroup3 != null) {
                            viewGroup3.setAlpha(fFloatValue);
                        }
                        ViewGroup viewGroup4 = c0408.f2318;
                        if (viewGroup4 != null) {
                            viewGroup4.setAlpha(fFloatValue);
                        }
                        break;
                    case 1:
                        c0408.m1751(((Float) valueAnimator.getAnimatedValue()).floatValue());
                        break;
                    case 2:
                        c0408.m1751(((Float) valueAnimator.getAnimatedValue()).floatValue());
                        break;
                    default:
                        float fFloatValue2 = ((Float) valueAnimator.getAnimatedValue()).floatValue();
                        View view2 = c0408.f2289;
                        if (view2 != null) {
                            view2.setAlpha(fFloatValue2);
                        }
                        ViewGroup viewGroup5 = c0408.f2299;
                        if (viewGroup5 != null) {
                            viewGroup5.setAlpha(fFloatValue2);
                        }
                        ViewGroup viewGroup6 = c0408.f2315;
                        if (viewGroup6 != null) {
                            viewGroup6.setAlpha(fFloatValue2);
                        }
                        ViewGroup viewGroup7 = c0408.f2318;
                        if (viewGroup7 != null) {
                            viewGroup7.setAlpha(fFloatValue2);
                        }
                        break;
                }
            }
        });
        valueAnimatorOfFloat.addListener(new C1666(this, 0));
        ValueAnimator valueAnimatorOfFloat2 = ValueAnimator.ofFloat(0.0f, 1.0f);
        valueAnimatorOfFloat2.setInterpolator(new LinearInterpolator());
        valueAnimatorOfFloat2.addUpdateListener(new ValueAnimator.AnimatorUpdateListener(this) { // from class: ᵤᵷٴ

            /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
            public final /* synthetic */ C0408 f13370;

            {
                this.f13370 = this;
            }

            @Override // android.animation.ValueAnimator.AnimatorUpdateListener
            public final void onAnimationUpdate(ValueAnimator valueAnimator) {
                int i5 = i;
                C0408 c0408 = this.f13370;
                switch (i5) {
                    case 0:
                        float fFloatValue = ((Float) valueAnimator.getAnimatedValue()).floatValue();
                        View view = c0408.f2289;
                        if (view != null) {
                            view.setAlpha(fFloatValue);
                        }
                        ViewGroup viewGroup2 = c0408.f2299;
                        if (viewGroup2 != null) {
                            viewGroup2.setAlpha(fFloatValue);
                        }
                        ViewGroup viewGroup3 = c0408.f2315;
                        if (viewGroup3 != null) {
                            viewGroup3.setAlpha(fFloatValue);
                        }
                        ViewGroup viewGroup4 = c0408.f2318;
                        if (viewGroup4 != null) {
                            viewGroup4.setAlpha(fFloatValue);
                        }
                        break;
                    case 1:
                        c0408.m1751(((Float) valueAnimator.getAnimatedValue()).floatValue());
                        break;
                    case 2:
                        c0408.m1751(((Float) valueAnimator.getAnimatedValue()).floatValue());
                        break;
                    default:
                        float fFloatValue2 = ((Float) valueAnimator.getAnimatedValue()).floatValue();
                        View view2 = c0408.f2289;
                        if (view2 != null) {
                            view2.setAlpha(fFloatValue2);
                        }
                        ViewGroup viewGroup5 = c0408.f2299;
                        if (viewGroup5 != null) {
                            viewGroup5.setAlpha(fFloatValue2);
                        }
                        ViewGroup viewGroup6 = c0408.f2315;
                        if (viewGroup6 != null) {
                            viewGroup6.setAlpha(fFloatValue2);
                        }
                        ViewGroup viewGroup7 = c0408.f2318;
                        if (viewGroup7 != null) {
                            viewGroup7.setAlpha(fFloatValue2);
                        }
                        break;
                }
            }
        });
        valueAnimatorOfFloat2.addListener(new C1666(this, 1));
        Resources resources = c1702.getResources();
        float dimension = resources.getDimension(R.dimen.h) - resources.getDimension(R.dimen.h);
        float dimension2 = resources.getDimension(R.dimen.h);
        AnimatorSet animatorSet = new AnimatorSet();
        this.f2302 = animatorSet;
        animatorSet.setDuration(250L);
        animatorSet.addListener(new C1271(this, c1702, i));
        animatorSet.play(valueAnimatorOfFloat).with(m1747(viewFindViewById, 0.0f, dimension)).with(m1747(viewGroup, 0.0f, dimension));
        AnimatorSet animatorSet2 = new AnimatorSet();
        this.f2295 = animatorSet2;
        animatorSet2.setDuration(250L);
        animatorSet2.addListener(new C1271(this, c1702, i4));
        animatorSet2.play(m1747(viewFindViewById, dimension, dimension2)).with(m1747(viewGroup, dimension, dimension2));
        AnimatorSet animatorSet3 = new AnimatorSet();
        this.f2306 = animatorSet3;
        animatorSet3.setDuration(250L);
        animatorSet3.addListener(new C1271(this, c1702, i3));
        animatorSet3.play(valueAnimatorOfFloat).with(m1747(viewFindViewById, 0.0f, dimension2)).with(m1747(viewGroup, 0.0f, dimension2));
        AnimatorSet animatorSet4 = new AnimatorSet();
        this.f2303 = animatorSet4;
        animatorSet4.setDuration(250L);
        animatorSet4.addListener(new C1666(this, 2));
        animatorSet4.play(valueAnimatorOfFloat2).with(m1747(viewFindViewById, dimension, 0.0f)).with(m1747(viewGroup, dimension, 0.0f));
        AnimatorSet animatorSet5 = new AnimatorSet();
        this.f2309 = animatorSet5;
        animatorSet5.setDuration(250L);
        animatorSet5.addListener(new C1666(this, 3));
        animatorSet5.play(valueAnimatorOfFloat2).with(m1747(viewFindViewById, dimension2, 0.0f)).with(m1747(viewGroup, dimension2, 0.0f));
        ValueAnimator valueAnimatorOfFloat3 = ValueAnimator.ofFloat(0.0f, 1.0f);
        this.f2292 = valueAnimatorOfFloat3;
        valueAnimatorOfFloat3.setDuration(250L);
        valueAnimatorOfFloat3.addUpdateListener(new ValueAnimator.AnimatorUpdateListener(this) { // from class: ᵤᵷٴ

            /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
            public final /* synthetic */ C0408 f13370;

            {
                this.f13370 = this;
            }

            @Override // android.animation.ValueAnimator.AnimatorUpdateListener
            public final void onAnimationUpdate(ValueAnimator valueAnimator) {
                int i5 = i4;
                C0408 c0408 = this.f13370;
                switch (i5) {
                    case 0:
                        float fFloatValue = ((Float) valueAnimator.getAnimatedValue()).floatValue();
                        View view = c0408.f2289;
                        if (view != null) {
                            view.setAlpha(fFloatValue);
                        }
                        ViewGroup viewGroup2 = c0408.f2299;
                        if (viewGroup2 != null) {
                            viewGroup2.setAlpha(fFloatValue);
                        }
                        ViewGroup viewGroup3 = c0408.f2315;
                        if (viewGroup3 != null) {
                            viewGroup3.setAlpha(fFloatValue);
                        }
                        ViewGroup viewGroup4 = c0408.f2318;
                        if (viewGroup4 != null) {
                            viewGroup4.setAlpha(fFloatValue);
                        }
                        break;
                    case 1:
                        c0408.m1751(((Float) valueAnimator.getAnimatedValue()).floatValue());
                        break;
                    case 2:
                        c0408.m1751(((Float) valueAnimator.getAnimatedValue()).floatValue());
                        break;
                    default:
                        float fFloatValue2 = ((Float) valueAnimator.getAnimatedValue()).floatValue();
                        View view2 = c0408.f2289;
                        if (view2 != null) {
                            view2.setAlpha(fFloatValue2);
                        }
                        ViewGroup viewGroup5 = c0408.f2299;
                        if (viewGroup5 != null) {
                            viewGroup5.setAlpha(fFloatValue2);
                        }
                        ViewGroup viewGroup6 = c0408.f2315;
                        if (viewGroup6 != null) {
                            viewGroup6.setAlpha(fFloatValue2);
                        }
                        ViewGroup viewGroup7 = c0408.f2318;
                        if (viewGroup7 != null) {
                            viewGroup7.setAlpha(fFloatValue2);
                        }
                        break;
                }
            }
        });
        valueAnimatorOfFloat3.addListener(new C1666(this, 4));
        ValueAnimator valueAnimatorOfFloat4 = ValueAnimator.ofFloat(1.0f, 0.0f);
        this.f2291 = valueAnimatorOfFloat4;
        valueAnimatorOfFloat4.setDuration(250L);
        valueAnimatorOfFloat4.addUpdateListener(new ValueAnimator.AnimatorUpdateListener(this) { // from class: ᵤᵷٴ

            /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
            public final /* synthetic */ C0408 f13370;

            {
                this.f13370 = this;
            }

            @Override // android.animation.ValueAnimator.AnimatorUpdateListener
            public final void onAnimationUpdate(ValueAnimator valueAnimator) {
                int i5 = i3;
                C0408 c0408 = this.f13370;
                switch (i5) {
                    case 0:
                        float fFloatValue = ((Float) valueAnimator.getAnimatedValue()).floatValue();
                        View view = c0408.f2289;
                        if (view != null) {
                            view.setAlpha(fFloatValue);
                        }
                        ViewGroup viewGroup2 = c0408.f2299;
                        if (viewGroup2 != null) {
                            viewGroup2.setAlpha(fFloatValue);
                        }
                        ViewGroup viewGroup3 = c0408.f2315;
                        if (viewGroup3 != null) {
                            viewGroup3.setAlpha(fFloatValue);
                        }
                        ViewGroup viewGroup4 = c0408.f2318;
                        if (viewGroup4 != null) {
                            viewGroup4.setAlpha(fFloatValue);
                        }
                        break;
                    case 1:
                        c0408.m1751(((Float) valueAnimator.getAnimatedValue()).floatValue());
                        break;
                    case 2:
                        c0408.m1751(((Float) valueAnimator.getAnimatedValue()).floatValue());
                        break;
                    default:
                        float fFloatValue2 = ((Float) valueAnimator.getAnimatedValue()).floatValue();
                        View view2 = c0408.f2289;
                        if (view2 != null) {
                            view2.setAlpha(fFloatValue2);
                        }
                        ViewGroup viewGroup5 = c0408.f2299;
                        if (viewGroup5 != null) {
                            viewGroup5.setAlpha(fFloatValue2);
                        }
                        ViewGroup viewGroup6 = c0408.f2315;
                        if (viewGroup6 != null) {
                            viewGroup6.setAlpha(fFloatValue2);
                        }
                        ViewGroup viewGroup7 = c0408.f2318;
                        if (viewGroup7 != null) {
                            viewGroup7.setAlpha(fFloatValue2);
                        }
                        break;
                }
            }
        });
        valueAnimatorOfFloat4.addListener(new C1666(this, 5));
    }

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public static int m1745(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;
    }

    /* JADX INFO: renamed from: ᵱᵽʡᵚ, reason: contains not printable characters */
    public static boolean m1746(View view) {
        int id = view.getId();
        return id == R.id.h || id == R.id.h || id == R.id.h || id == R.id.h || id == R.id.h || id == R.id.h || id == R.id.h || id == R.id.h;
    }

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public static ObjectAnimator m1747(View view, float f, float f2) {
        return ObjectAnimator.ofFloat(view, "translationY", f, f2);
    }

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final boolean m1748(View view) {
        return view != null && this.f2308.contains(view);
    }

    /* JADX INFO: renamed from: ˊᵫᵗ, reason: contains not printable characters */
    public final void m1749(View view, boolean z) {
        if (view == null) {
            return;
        }
        ArrayList arrayList = this.f2308;
        if (!z) {
            view.setVisibility(8);
            arrayList.remove(view);
            return;
        }
        if (this.f2290 && m1746(view)) {
            view.setVisibility(4);
        } else {
            view.setVisibility(0);
        }
        arrayList.add(view);
    }

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public final void m1750(Runnable runnable, long j) {
        if (j >= 0) {
            this.f2311.postDelayed(runnable, j);
        }
    }

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final void m1751(float f) {
        ViewGroup viewGroup = this.f2317;
        if (viewGroup != null) {
            viewGroup.setTranslationX((int) ((1.0f - f) * viewGroup.getWidth()));
        }
        ViewGroup viewGroup2 = this.f2310;
        if (viewGroup2 != null) {
            viewGroup2.setAlpha(1.0f - f);
        }
        ViewGroup viewGroup3 = this.f2312;
        if (viewGroup3 != null) {
            viewGroup3.setAlpha(1.0f - f);
        }
    }

    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    public final void m1752() {
        if (this.f2313 == 3) {
            return;
        }
        m1755();
        int showTimeoutMs = this.f2311.getShowTimeoutMs();
        if (showTimeoutMs > 0) {
            if (!this.f2316) {
                m1750(this.f2300, showTimeoutMs);
            } else if (this.f2313 == 1) {
                m1750(this.f2296, 2000L);
            } else {
                m1750(this.f2301, showTimeoutMs);
            }
        }
    }

    /* JADX INFO: renamed from: ᵶᵥᵝ, reason: contains not printable characters */
    public final void m1753() {
        if (!this.f2316) {
            m1754(0);
            m1752();
            return;
        }
        int i = this.f2313;
        if (i == 1) {
            this.f2303.start();
        } else if (i == 2) {
            this.f2309.start();
        } else if (i == 3) {
            this.f2297 = true;
        } else if (i == 4) {
            return;
        }
        m1752();
    }

    /* JADX INFO: renamed from: ᵻʽᵯ, reason: contains not printable characters */
    public final void m1754(int i) {
        int i2 = this.f2313;
        this.f2313 = i;
        C1702 c1702 = this.f2311;
        if (i == 2) {
            c1702.setVisibility(8);
        } else if (i2 == 2) {
            c1702.setVisibility(0);
        }
        if (i2 != i) {
            for (InterfaceC2536 interfaceC2536 : c1702.f6719) {
                c1702.getVisibility();
                ((ViewOnClickListenerC3012) interfaceC2536).f11604.m8907();
            }
        }
    }

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public final void m1755() {
        RunnableC1457 runnableC1457 = this.f2300;
        C1702 c1702 = this.f2311;
        c1702.removeCallbacks(runnableC1457);
        c1702.removeCallbacks(this.f2293);
        c1702.removeCallbacks(this.f2301);
        c1702.removeCallbacks(this.f2296);
    }
}
