package C0;

import I0.t0;
import android.view.MotionEvent;
import w4.C3137A;

/* JADX INFO: loaded from: classes.dex */
public final class L extends kotlin.jvm.internal.p implements J4.c {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ int f541a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ k1.y f542b;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public /* synthetic */ L(k1.y yVar, int i6) {
        super(1);
        this.f541a = i6;
        this.f542b = yVar;
    }

    @Override // J4.c
    public final Object invoke(Object obj) {
        boolean zDispatchTouchEvent;
        switch (this.f541a) {
            case 0:
                MotionEvent motionEvent = (MotionEvent) obj;
                int actionMasked = motionEvent.getActionMasked();
                k1.y yVar = this.f542b;
                switch (actionMasked) {
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                    case 6:
                        zDispatchTouchEvent = yVar.dispatchTouchEvent(motionEvent);
                        break;
                    default:
                        zDispatchTouchEvent = yVar.dispatchGenericMotionEvent(motionEvent);
                        break;
                }
                break;
            case 1:
                t0 t0Var = (t0) obj;
                J0.A a6 = t0Var instanceof J0.A ? (J0.A) t0Var : null;
                k1.y yVar2 = this.f542b;
                if (a6 != null) {
                    a6.getAndroidViewsHandler$ui().removeViewInLayout(yVar2);
                    kotlin.jvm.internal.F.b(a6.getAndroidViewsHandler$ui().getLayoutNodeToHolder()).remove(a6.getAndroidViewsHandler$ui().getHolderToLayoutNode().remove(yVar2));
                    yVar2.setImportantForAccessibility(0);
                }
                yVar2.removeAllViewsInLayout();
                break;
            default:
                this.f542b.f19689t = (J4.c) obj;
                break;
        }
        return C3137A.f25453a;
    }
}
