package com.google.maps.android.compose.clustering;

import android.os.Handler;
import android.os.Looper;
import kotlin.Metadata;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;

/* JADX INFO: compiled from: Clustering.kt */
/* JADX INFO: loaded from: classes2.dex */
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\n"}, d2 = {"<anonymous>", "", "Lkotlinx/coroutines/CoroutineScope;"}, k = 3, mv = {2, 0, 0}, xi = 48)
@DebugMetadata(c = "com.google.maps.android.compose.clustering.ClusteringKt$ResetMapListeners$1$1", f = "Clustering.kt", i = {}, l = {}, m = "invokeSuspend", n = {}, s = {})
final class ClusteringKt$ResetMapListeners$1$1 extends SuspendLambda implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
    final /* synthetic */ Function0<Unit> $reattach;
    int label;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    ClusteringKt$ResetMapListeners$1$1(Function0<Unit> function0, Continuation<? super ClusteringKt$ResetMapListeners$1$1> continuation) {
        super(2, continuation);
        this.$reattach = function0;
    }

    @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
    public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
        return new ClusteringKt$ResetMapListeners$1$1(this.$reattach, continuation);
    }

    @Override // kotlin.jvm.functions.Function2
    public final Object invoke(CoroutineScope coroutineScope, Continuation<? super Unit> continuation) {
        return ((ClusteringKt$ResetMapListeners$1$1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
    }

    @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
    public final Object invokeSuspend(Object obj) throws Throwable {
        IntrinsicsKt.getCOROUTINE_SUSPENDED();
        if (this.label != 0) {
            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
        }
        ResultKt.throwOnFailure(obj);
        Handler handler = new Handler(Looper.getMainLooper());
        final Function0<Unit> function0 = this.$reattach;
        handler.post(new Runnable() { // from class: com.google.maps.android.compose.clustering.ClusteringKt$ResetMapListeners$1$1$$ExternalSyntheticLambda0
            @Override // java.lang.Runnable
            public final void run() {
                function0.invoke();
            }
        });
        return Unit.INSTANCE;
    }
}