package o;

import android.view.View;
import java.util.ArrayList;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class Xl0 implements InterfaceC0707aL {
    public final /* synthetic */ C0168Gm l;
    public final /* synthetic */ N5 m;
    public final /* synthetic */ P00 n;

    /* renamed from: o, reason: collision with root package name */
    public final /* synthetic */ B10 f411o;
    public final /* synthetic */ View p;

    public Xl0(C0168Gm c0168Gm, N5 n5, P00 p00, B10 b10, View view) {
        this.l = c0168Gm;
        this.m = n5;
        this.n = p00;
        this.f411o = b10;
        this.p = view;
    }

    @Override // o.InterfaceC0707aL
    public final void f(InterfaceC0898cL interfaceC0898cL, UK uk) {
        boolean z;
        InterfaceC2259qg interfaceC2259qgV = null;
        switch (Wl0.a[uk.ordinal()]) {
            case 1:
                AbstractC1692kh0.C(this.l, null, new C1833m6(this.f411o, this.n, interfaceC0898cL, this, this.p, null), 1);
                return;
            case 2:
                N5 n5 = this.m;
                if (n5 != null) {
                    C0949cs c0949cs = (C0949cs) n5.n;
                    synchronized (c0949cs.b) {
                        try {
                            synchronized (c0949cs.b) {
                                z = c0949cs.a;
                            }
                            if (!z) {
                                ArrayList arrayList = (ArrayList) c0949cs.c;
                                c0949cs.c = (ArrayList) c0949cs.d;
                                c0949cs.d = arrayList;
                                c0949cs.a = true;
                                int size = arrayList.size();
                                for (int i = 0; i < size; i++) {
                                    ((InterfaceC0220Im) arrayList.get(i)).resumeWith(Oh0.a);
                                }
                                arrayList.clear();
                            }
                        } catch (Throwable th) {
                            throw th;
                        }
                    }
                }
                P00 p00 = this.n;
                synchronized (p00.b) {
                    if (p00.s) {
                        p00.s = false;
                        interfaceC2259qgV = p00.v();
                    }
                }
                if (interfaceC2259qgV != null) {
                    ((C2448sg) interfaceC2259qgV).resumeWith(Oh0.a);
                    return;
                }
                return;
            case 3:
                P00 p002 = this.n;
                synchronized (p002.b) {
                    p002.s = true;
                }
                return;
            case 4:
                this.n.u();
                return;
            case 5:
            case 6:
            case 7:
                return;
            default:
                throw new C2170pj();
        }
    }
}
