package P;

import android.view.View;
import android.view.ViewGroup;
import android.view.WindowInsets;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.DecelerateInterpolator;
import android.view.animation.PathInterpolator;
import com.riyaz.zvytour.R;
import h0.C0618a;
import io.sentry.C0732k1;
import java.util.List;

/* JADX INFO: loaded from: classes.dex */
public final class X extends a0 {

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public static final PathInterpolator f2409e = new PathInterpolator(0.0f, 1.1f, 0.0f, 1.0f);

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public static final C0618a f2410f = new C0618a();

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public static final DecelerateInterpolator f2411g = new DecelerateInterpolator(1.5f);

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public static final AccelerateInterpolator f2412h = new AccelerateInterpolator(1.5f);

    public static void e(View view) {
        V1.f fVarJ = j(view);
        if (fVarJ != null) {
            ((View) fVarJ.f2987d).setTranslationY(0.0f);
            return;
        }
        if (view instanceof ViewGroup) {
            ViewGroup viewGroup = (ViewGroup) view;
            for (int i = 0; i < viewGroup.getChildCount(); i++) {
                e(viewGroup.getChildAt(i));
            }
        }
    }

    public static void f(View view, s0 s0Var, boolean z5) {
        V1.f fVarJ = j(view);
        if (fVarJ != null) {
            fVarJ.f2986c = s0Var;
            if (!z5) {
                View view2 = (View) fVarJ.f2987d;
                int[] iArr = (int[]) fVarJ.f2988e;
                view2.getLocationOnScreen(iArr);
                z5 = true;
                fVarJ.f2984a = iArr[1];
            }
        }
        if (view instanceof ViewGroup) {
            ViewGroup viewGroup = (ViewGroup) view;
            for (int i = 0; i < viewGroup.getChildCount(); i++) {
                f(viewGroup.getChildAt(i), s0Var, z5);
            }
        }
    }

    public static void g(View view, s0 s0Var, List list) {
        V1.f fVarJ = j(view);
        if (fVarJ != null) {
            fVarJ.e(s0Var, list);
            return;
        }
        if (view instanceof ViewGroup) {
            ViewGroup viewGroup = (ViewGroup) view;
            for (int i = 0; i < viewGroup.getChildCount(); i++) {
                g(viewGroup.getChildAt(i), s0Var, list);
            }
        }
    }

    public static void h(View view, C0732k1 c0732k1) {
        V1.f fVarJ = j(view);
        if (fVarJ != null) {
            View view2 = (View) fVarJ.f2987d;
            int[] iArr = (int[]) fVarJ.f2988e;
            view2.getLocationOnScreen(iArr);
            int i = fVarJ.f2984a - iArr[1];
            fVarJ.f2985b = i;
            view2.setTranslationY(i);
            return;
        }
        if (view instanceof ViewGroup) {
            ViewGroup viewGroup = (ViewGroup) view;
            for (int i5 = 0; i5 < viewGroup.getChildCount(); i5++) {
                h(viewGroup.getChildAt(i5), c0732k1);
            }
        }
    }

    public static WindowInsets i(View view, WindowInsets windowInsets) {
        return view.getTag(R.id.tag_on_apply_window_listener) != null ? windowInsets : view.onApplyWindowInsets(windowInsets);
    }

    public static V1.f j(View view) {
        Object tag = view.getTag(R.id.tag_window_insets_animation_callback);
        if (tag instanceof W) {
            return ((W) tag).f2407a;
        }
        return null;
    }
}
