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

import android.content.ComponentCallbacks;
import android.content.Context;
import android.content.res.Configuration;
import android.os.Bundle;
import android.util.Log;
import androidx.compose.runtime.Applier;
import androidx.compose.runtime.ComposablesKt;
import androidx.compose.runtime.Composer;
import androidx.compose.runtime.ComposerKt;
import androidx.compose.runtime.Composition;
import androidx.compose.runtime.CompositionContext;
import androidx.compose.runtime.CompositionKt;
import androidx.compose.runtime.DisposableEffectResult;
import androidx.compose.runtime.DisposableEffectScope;
import androidx.compose.runtime.EffectsKt;
import androidx.compose.runtime.MutableState;
import androidx.compose.runtime.ProvidableCompositionLocal;
import androidx.compose.runtime.RecomposeScopeImplKt;
import androidx.compose.runtime.ScopeUpdateScope;
import androidx.compose.runtime.SnapshotStateKt__SnapshotStateKt;
import androidx.compose.runtime.State;
import androidx.compose.runtime.Updater;
import androidx.compose.runtime.internal.ComposableLambda;
import androidx.compose.runtime.internal.ComposableLambdaKt;
import androidx.compose.ui.Modifier;
import androidx.compose.ui.platform.AndroidCompositionLocals_androidKt;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleEventObserver;
import androidx.lifecycle.LifecycleOwner;
import com.google.android.gms.maps.StreetViewPanorama;
import com.google.android.gms.maps.StreetViewPanoramaOptions;
import com.google.android.gms.maps.StreetViewPanoramaView;
import com.google.android.gms.maps.model.StreetViewPanoramaOrientation;
import com.google.maps.android.compose.streetview.StreetViewPanoramaUpdaterKt;
import kotlin.KotlinNothingValueException;
import kotlin.Metadata;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.SafeContinuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.DebugProbesKt;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.InlineMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.DelayKt;

/* JADX INFO: compiled from: StreetView.kt */
/* JADX INFO: loaded from: classes2.dex */
@Metadata(d1 = {"\u0000j\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\u001a\u0085\u0001\u0010\u0000\u001a\u00020\u00012\b\b\u0002\u0010\u0002\u001a\u00020\u00032\b\b\u0002\u0010\u0004\u001a\u00020\u00052\u000e\b\u0002\u0010\u0006\u001a\b\u0012\u0004\u0012\u00020\b0\u00072\b\b\u0002\u0010\t\u001a\u00020\n2\b\b\u0002\u0010\u000b\u001a\u00020\n2\b\b\u0002\u0010\f\u001a\u00020\n2\b\b\u0002\u0010\r\u001a\u00020\n2\u0014\b\u0002\u0010\u000e\u001a\u000e\u0012\u0004\u0012\u00020\u0010\u0012\u0004\u0012\u00020\u00010\u000f2\u0014\b\u0002\u0010\u0011\u001a\u000e\u0012\u0004\u0012\u00020\u0010\u0012\u0004\u0012\u00020\u00010\u000fH\u0007¢\u0006\u0002\u0010\u0012\u001a\u0015\u0010\u0013\u001a\u00020\u00012\u0006\u0010\u0014\u001a\u00020\u0015H\u0003¢\u0006\u0002\u0010\u0016\u001a/\u0010\u0017\u001a\u00020\u0018*\u00020\u00152\u0006\u0010\u0019\u001a\u00020\u001a2\u0013\b\b\u0010\u001b\u001a\r\u0012\u0004\u0012\u00020\u00010\u0007¢\u0006\u0002\b\u001cH\u0082H¢\u0006\u0002\u0010\u001d\u001a\u001a\u0010\u001e\u001a\u00020\u001f*\u00020\u00152\f\u0010 \u001a\b\u0012\u0004\u0012\u00020\"0!H\u0002\u001a\f\u0010#\u001a\u00020$*\u00020\u0015H\u0002¨\u0006%²\u0006\n\u0010&\u001a\u00020\u0005X\u008a\u0084\u0002²\u0006\n\u0010'\u001a\u00020\nX\u008a\u0084\u0002²\u0006\n\u0010(\u001a\u00020\nX\u008a\u0084\u0002²\u0006\n\u0010)\u001a\u00020\nX\u008a\u0084\u0002²\u0006\n\u0010*\u001a\u00020\nX\u008a\u0084\u0002²\u0006\n\u0010+\u001a\u00020,X\u008a\u0084\u0002"}, d2 = {"StreetView", "", "modifier", "Landroidx/compose/ui/Modifier;", "cameraPositionState", "Lcom/google/maps/android/compose/streetview/StreetViewCameraPositionState;", "streetViewPanoramaOptionsFactory", "Lkotlin/Function0;", "Lcom/google/android/gms/maps/StreetViewPanoramaOptions;", "isPanningGesturesEnabled", "", "isStreetNamesEnabled", "isUserNavigationEnabled", "isZoomGesturesEnabled", "onClick", "Lkotlin/Function1;", "Lcom/google/android/gms/maps/model/StreetViewPanoramaOrientation;", "onLongClick", "(Landroidx/compose/ui/Modifier;Lcom/google/maps/android/compose/streetview/StreetViewCameraPositionState;Lkotlin/jvm/functions/Function0;ZZZZLkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Landroidx/compose/runtime/Composer;II)V", "StreetViewLifecycle", "streetView", "Lcom/google/android/gms/maps/StreetViewPanoramaView;", "(Lcom/google/android/gms/maps/StreetViewPanoramaView;Landroidx/compose/runtime/Composer;I)V", "newComposition", "Landroidx/compose/runtime/Composition;", "parent", "Landroidx/compose/runtime/CompositionContext;", "content", "Landroidx/compose/runtime/Composable;", "(Lcom/google/android/gms/maps/StreetViewPanoramaView;Landroidx/compose/runtime/CompositionContext;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "lifecycleObserver", "Landroidx/lifecycle/LifecycleEventObserver;", "previousState", "Landroidx/compose/runtime/MutableState;", "Landroidx/lifecycle/Lifecycle$Event;", "componentCallbacks", "Landroid/content/ComponentCallbacks;", "maps-compose_release", "currentCameraPositionState", "currentIsPanningGestureEnabled", "currentIsStreetNamesEnabled", "currentIsUserNavigationEnabled", "currentIsZoomGesturesEnabled", "clickListeners", "Lcom/google/maps/android/compose/streetview/StreetViewPanoramaEventListeners;"}, k = 2, mv = {2, 0, 0}, xi = 48)
public final class StreetViewKt {

    /* JADX INFO: compiled from: StreetView.kt */
    @Metadata(k = 3, mv = {2, 0, 0}, xi = 48)
    public /* synthetic */ class WhenMappings {
        public static final /* synthetic */ int[] $EnumSwitchMapping$0;

        static {
            int[] iArr = new int[Lifecycle.Event.values().length];
            try {
                iArr[Lifecycle.Event.ON_CREATE.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            try {
                iArr[Lifecycle.Event.ON_START.ordinal()] = 2;
            } catch (NoSuchFieldError unused2) {
            }
            try {
                iArr[Lifecycle.Event.ON_RESUME.ordinal()] = 3;
            } catch (NoSuchFieldError unused3) {
            }
            try {
                iArr[Lifecycle.Event.ON_PAUSE.ordinal()] = 4;
            } catch (NoSuchFieldError unused4) {
            }
            try {
                iArr[Lifecycle.Event.ON_STOP.ordinal()] = 5;
            } catch (NoSuchFieldError unused5) {
            }
            try {
                iArr[Lifecycle.Event.ON_DESTROY.ordinal()] = 6;
            } catch (NoSuchFieldError unused6) {
            }
            $EnumSwitchMapping$0 = iArr;
        }
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final Unit StreetView$lambda$13(Modifier modifier, StreetViewCameraPositionState streetViewCameraPositionState, Function0 function0, boolean z, boolean z2, boolean z3, boolean z4, Function1 function1, Function1 function12, int i, int i2, Composer composer, int i3) {
        StreetView(modifier, streetViewCameraPositionState, function0, z, z2, z3, z4, function1, function12, composer, RecomposeScopeImplKt.updateChangedFlags(i | 1), i2);
        return Unit.INSTANCE;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final StreetViewPanoramaView StreetView$lambda$4(StreetViewPanoramaView streetView, Context it) {
        Intrinsics.checkNotNullParameter(streetView, "$streetView");
        Intrinsics.checkNotNullParameter(it, "it");
        return streetView;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final Unit StreetViewLifecycle$lambda$17(StreetViewPanoramaView streetView, int i, Composer composer, int i2) {
        Intrinsics.checkNotNullParameter(streetView, "$streetView");
        StreetViewLifecycle(streetView, composer, RecomposeScopeImplKt.updateChangedFlags(i | 1));
        return Unit.INSTANCE;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final StreetViewPanoramaOptions StreetView$lambda$0() {
        return new StreetViewPanoramaOptions();
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final Unit StreetView$lambda$1(StreetViewPanoramaOrientation it) {
        Intrinsics.checkNotNullParameter(it, "it");
        return Unit.INSTANCE;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final Unit StreetView$lambda$2(StreetViewPanoramaOrientation it) {
        Intrinsics.checkNotNullParameter(it, "it");
        return Unit.INSTANCE;
    }

    /* JADX WARN: Removed duplicated region for block: B:108:0x0150  */
    /* JADX WARN: Removed duplicated region for block: B:109:0x0152  */
    /* JADX WARN: Removed duplicated region for block: B:110:0x0157  */
    /* JADX WARN: Removed duplicated region for block: B:112:0x015b  */
    /* JADX WARN: Removed duplicated region for block: B:116:0x018e  */
    /* JADX WARN: Removed duplicated region for block: B:118:0x0192  */
    /* JADX WARN: Removed duplicated region for block: B:119:0x0198  */
    /* JADX WARN: Removed duplicated region for block: B:122:0x019d  */
    /* JADX WARN: Removed duplicated region for block: B:123:0x019f  */
    /* JADX WARN: Removed duplicated region for block: B:125:0x01a3  */
    /* JADX WARN: Removed duplicated region for block: B:127:0x01a6  */
    /* JADX WARN: Removed duplicated region for block: B:130:0x01aa  */
    /* JADX WARN: Removed duplicated region for block: B:132:0x01ae  */
    /* JADX WARN: Removed duplicated region for block: B:133:0x01b4  */
    /* JADX WARN: Removed duplicated region for block: B:135:0x01b8  */
    /* JADX WARN: Removed duplicated region for block: B:138:0x01e7  */
    /* JADX WARN: Removed duplicated region for block: B:140:0x01ef  */
    /* JADX WARN: Removed duplicated region for block: B:144:0x02b4  */
    /* JADX WARN: Removed duplicated region for block: B:146:? A[RETURN, SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:29:0x0051  */
    /* JADX WARN: Removed duplicated region for block: B:30:0x0054  */
    /* JADX WARN: Removed duplicated region for block: B:40:0x006d  */
    /* JADX WARN: Removed duplicated region for block: B:41:0x0070  */
    /* JADX WARN: Removed duplicated region for block: B:51:0x008b  */
    /* JADX WARN: Removed duplicated region for block: B:52:0x008f  */
    /* JADX WARN: Removed duplicated region for block: B:62:0x00aa  */
    /* JADX WARN: Removed duplicated region for block: B:63:0x00b1  */
    /* JADX WARN: Removed duplicated region for block: B:72:0x00ca  */
    /* JADX WARN: Removed duplicated region for block: B:73:0x00d1  */
    /* JADX WARN: Removed duplicated region for block: B:82:0x00ea  */
    /* JADX WARN: Removed duplicated region for block: B:84:0x00ef  */
    /* JADX WARN: Removed duplicated region for block: B:92:0x0106  */
    /* JADX WARN: Removed duplicated region for block: B:98:0x012b  */
    @com.google.maps.android.ktx.MapsExperimentalFeature
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct code enable 'Show inconsistent code' option in preferences
    */
    public static final void StreetView(androidx.compose.ui.Modifier r23, com.google.maps.android.compose.streetview.StreetViewCameraPositionState r24, kotlin.jvm.functions.Function0<com.google.android.gms.maps.StreetViewPanoramaOptions> r25, boolean r26, boolean r27, boolean r28, boolean r29, kotlin.jvm.functions.Function1<? super com.google.android.gms.maps.model.StreetViewPanoramaOrientation, kotlin.Unit> r30, kotlin.jvm.functions.Function1<? super com.google.android.gms.maps.model.StreetViewPanoramaOrientation, kotlin.Unit> r31, androidx.compose.runtime.Composer r32, final int r33, final int r34) {
        /*
            Method dump skipped, instruction units count: 706
            To view this dump change 'Code comments level' option to 'DEBUG'
        */
        throw new UnsupportedOperationException("Method not decompiled: com.google.maps.android.compose.streetview.StreetViewKt.StreetView(androidx.compose.ui.Modifier, com.google.maps.android.compose.streetview.StreetViewCameraPositionState, kotlin.jvm.functions.Function0, boolean, boolean, boolean, boolean, kotlin.jvm.functions.Function1, kotlin.jvm.functions.Function1, androidx.compose.runtime.Composer, int, int):void");
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final Unit StreetView$lambda$5(StreetViewPanoramaView it) {
        Intrinsics.checkNotNullParameter(it, "it");
        return Unit.INSTANCE;
    }

    /* JADX INFO: renamed from: com.google.maps.android.compose.streetview.StreetViewKt$StreetView$6, reason: invalid class name */
    /* JADX INFO: compiled from: StreetView.kt */
    @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.streetview.StreetViewKt$StreetView$6", f = "StreetView.kt", i = {0, 0, 0, 1}, l = {181, 193}, m = "invokeSuspend", n = {"content$iv", "$completion$iv", "$this$awaitStreetViewPanorama$iv$iv", "composition$iv"}, s = {"L$1", "L$2", "L$3", "L$0"})
    static final class AnonymousClass6 extends SuspendLambda implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
        final /* synthetic */ State<StreetViewPanoramaEventListeners> $clickListeners$delegate;
        final /* synthetic */ State<StreetViewCameraPositionState> $currentCameraPositionState$delegate;
        final /* synthetic */ State<Boolean> $currentIsPanningGestureEnabled$delegate;
        final /* synthetic */ State<Boolean> $currentIsStreetNamesEnabled$delegate;
        final /* synthetic */ State<Boolean> $currentIsUserNavigationEnabled$delegate;
        final /* synthetic */ State<Boolean> $currentIsZoomGesturesEnabled$delegate;
        final /* synthetic */ CompositionContext $parentComposition;
        final /* synthetic */ StreetViewPanoramaView $streetView;
        Object L$0;
        Object L$1;
        Object L$2;
        Object L$3;
        int label;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        AnonymousClass6(StreetViewPanoramaView streetViewPanoramaView, CompositionContext compositionContext, State<StreetViewCameraPositionState> state, State<Boolean> state2, State<Boolean> state3, State<Boolean> state4, State<Boolean> state5, State<StreetViewPanoramaEventListeners> state6, Continuation<? super AnonymousClass6> continuation) {
            super(2, continuation);
            this.$streetView = streetViewPanoramaView;
            this.$parentComposition = compositionContext;
            this.$currentCameraPositionState$delegate = state;
            this.$currentIsPanningGestureEnabled$delegate = state2;
            this.$currentIsStreetNamesEnabled$delegate = state3;
            this.$currentIsUserNavigationEnabled$delegate = state4;
            this.$currentIsZoomGesturesEnabled$delegate = state5;
            this.$clickListeners$delegate = state6;
        }

        @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
        public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
            return new AnonymousClass6(this.$streetView, this.$parentComposition, this.$currentCameraPositionState$delegate, this.$currentIsPanningGestureEnabled$delegate, this.$currentIsStreetNamesEnabled$delegate, this.$currentIsUserNavigationEnabled$delegate, this.$currentIsZoomGesturesEnabled$delegate, this.$clickListeners$delegate, continuation);
        }

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

        @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
        public final Object invokeSuspend(Object obj) throws Throwable {
            CompositionContext compositionContext;
            Function2<? super Composer, ? super Integer, Unit> function2;
            Composition Composition;
            Composition composition;
            Throwable th;
            Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
            int i = this.label;
            try {
                if (i == 0) {
                    ResultKt.throwOnFailure(obj);
                    StreetViewPanoramaView streetViewPanoramaView = this.$streetView;
                    CompositionContext compositionContext2 = this.$parentComposition;
                    final State<StreetViewCameraPositionState> state = this.$currentCameraPositionState$delegate;
                    final State<Boolean> state2 = this.$currentIsPanningGestureEnabled$delegate;
                    final State<Boolean> state3 = this.$currentIsStreetNamesEnabled$delegate;
                    final State<Boolean> state4 = this.$currentIsUserNavigationEnabled$delegate;
                    final State<Boolean> state5 = this.$currentIsZoomGesturesEnabled$delegate;
                    final State<StreetViewPanoramaEventListeners> state6 = this.$clickListeners$delegate;
                    ComposableLambda composableLambdaComposableLambdaInstance = ComposableLambdaKt.composableLambdaInstance(-1039809540, true, new Function2<Composer, Integer, Unit>() { // from class: com.google.maps.android.compose.streetview.StreetViewKt$StreetView$6$1$1
                        @Override // kotlin.jvm.functions.Function2
                        public /* bridge */ /* synthetic */ Unit invoke(Composer composer, Integer num) {
                            invoke(composer, num.intValue());
                            return Unit.INSTANCE;
                        }

                        public final void invoke(Composer composer, int i2) {
                            if ((i2 & 11) != 2 || !composer.getSkipping()) {
                                StreetViewCameraPositionState streetViewCameraPositionStateStreetView$lambda$6 = StreetViewKt.StreetView$lambda$6(state);
                                boolean zStreetView$lambda$7 = StreetViewKt.StreetView$lambda$7(state2);
                                boolean zStreetView$lambda$8 = StreetViewKt.StreetView$lambda$8(state3);
                                boolean zStreetView$lambda$9 = StreetViewKt.StreetView$lambda$9(state4);
                                boolean zStreetView$lambda$10 = StreetViewKt.StreetView$lambda$10(state5);
                                StreetViewPanoramaEventListeners streetViewPanoramaEventListenersStreetView$lambda$12 = StreetViewKt.StreetView$lambda$12(state6);
                                composer.startReplaceableGroup(-647819622);
                                Applier<?> applier = composer.getApplier();
                                Intrinsics.checkNotNull(applier, "null cannot be cast to non-null type com.google.maps.android.compose.streetview.StreetViewPanoramaApplier");
                                StreetViewPanoramaUpdaterKt.AnonymousClass1 anonymousClass1 = new StreetViewPanoramaUpdaterKt.AnonymousClass1(streetViewCameraPositionStateStreetView$lambda$6, ((StreetViewPanoramaApplier) applier).getStreetViewPanorama(), streetViewPanoramaEventListenersStreetView$lambda$12);
                                composer.startReplaceableGroup(1886828752);
                                ComposerKt.sourceInformation(composer, "CC(ComposeNode):Composables.kt#9igjgp");
                                if (!(composer.getApplier() instanceof StreetViewPanoramaApplier)) {
                                    ComposablesKt.invalidApplier();
                                }
                                composer.startNode();
                                if (composer.getInserting()) {
                                    composer.createNode(new StreetViewPanoramaUpdaterKt$StreetViewUpdater$$inlined$ComposeNode$1(anonymousClass1));
                                } else {
                                    composer.useNode();
                                }
                                Composer composerM3820constructorimpl = Updater.m3820constructorimpl(composer);
                                Updater.m3827setimpl(composerM3820constructorimpl, Boolean.valueOf(zStreetView$lambda$7), new StreetViewPanoramaUpdaterKt$StreetViewUpdater$2$1(zStreetView$lambda$7));
                                Updater.m3827setimpl(composerM3820constructorimpl, Boolean.valueOf(zStreetView$lambda$8), new StreetViewPanoramaUpdaterKt$StreetViewUpdater$2$2(zStreetView$lambda$8));
                                Updater.m3827setimpl(composerM3820constructorimpl, Boolean.valueOf(zStreetView$lambda$9), new StreetViewPanoramaUpdaterKt$StreetViewUpdater$2$3(zStreetView$lambda$9));
                                Updater.m3827setimpl(composerM3820constructorimpl, Boolean.valueOf(zStreetView$lambda$10), new StreetViewPanoramaUpdaterKt$StreetViewUpdater$2$4(zStreetView$lambda$10));
                                Updater.m3827setimpl(composerM3820constructorimpl, streetViewPanoramaEventListenersStreetView$lambda$12, StreetViewPanoramaUpdaterKt$StreetViewUpdater$2$5.INSTANCE);
                                composer.endNode();
                                composer.endReplaceableGroup();
                                composer.endReplaceableGroup();
                                return;
                            }
                            composer.skipToGroupEnd();
                        }
                    });
                    this.L$0 = compositionContext2;
                    this.L$1 = composableLambdaComposableLambdaInstance;
                    this.L$2 = this;
                    this.L$3 = streetViewPanoramaView;
                    this.label = 1;
                    AnonymousClass6 anonymousClass6 = this;
                    SafeContinuation safeContinuation = new SafeContinuation(IntrinsicsKt.intercepted(anonymousClass6));
                    streetViewPanoramaView.getStreetViewPanoramaAsync(new StreetViewKt$newComposition$$inlined$awaitStreetViewPanorama$1(safeContinuation));
                    obj = safeContinuation.getOrThrow();
                    if (obj == IntrinsicsKt.getCOROUTINE_SUSPENDED()) {
                        DebugProbesKt.probeCoroutineSuspended(anonymousClass6);
                    }
                    if (obj == coroutine_suspended) {
                        return coroutine_suspended;
                    }
                    compositionContext = compositionContext2;
                    function2 = composableLambdaComposableLambdaInstance;
                } else {
                    if (i != 1) {
                        if (i != 2) {
                            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                        }
                        composition = (Composition) this.L$0;
                        try {
                            ResultKt.throwOnFailure(obj);
                            throw new KotlinNothingValueException();
                        } catch (Throwable th2) {
                            th = th2;
                            composition.dispose();
                            throw th;
                        }
                    }
                    function2 = (Function2) this.L$1;
                    compositionContext = (CompositionContext) this.L$0;
                    ResultKt.throwOnFailure(obj);
                }
                this.L$0 = Composition;
                this.L$1 = null;
                this.L$2 = null;
                this.L$3 = null;
                this.label = 2;
                if (DelayKt.awaitCancellation(this) == coroutine_suspended) {
                    return coroutine_suspended;
                }
                composition = Composition;
                throw new KotlinNothingValueException();
            } catch (Throwable th3) {
                composition = Composition;
                th = th3;
                composition.dispose();
                throw th;
            }
            StreetViewPanorama streetViewPanorama = (StreetViewPanorama) obj;
            Log.d("StreetView", "Location is " + streetViewPanorama.getLocation());
            Composition = CompositionKt.Composition(new StreetViewPanoramaApplier(streetViewPanorama), compositionContext);
            Composition.setContent(function2);
        }
    }

    private static final void StreetViewLifecycle(final StreetViewPanoramaView streetViewPanoramaView, Composer composer, final int i) {
        Composer composerStartRestartGroup = composer.startRestartGroup(1614301890);
        ProvidableCompositionLocal<Context> localContext = AndroidCompositionLocals_androidKt.getLocalContext();
        ComposerKt.sourceInformationMarkerStart(composerStartRestartGroup, 2023513938, "CC:CompositionLocal.kt#9igjgp");
        Object objConsume = composerStartRestartGroup.consume(localContext);
        ComposerKt.sourceInformationMarkerEnd(composerStartRestartGroup);
        final Context context = (Context) objConsume;
        ProvidableCompositionLocal<LifecycleOwner> localLifecycleOwner = AndroidCompositionLocals_androidKt.getLocalLifecycleOwner();
        ComposerKt.sourceInformationMarkerStart(composerStartRestartGroup, 2023513938, "CC:CompositionLocal.kt#9igjgp");
        Object objConsume2 = composerStartRestartGroup.consume(localLifecycleOwner);
        ComposerKt.sourceInformationMarkerEnd(composerStartRestartGroup);
        final Lifecycle lifecycle = ((LifecycleOwner) objConsume2).getLifecycle();
        composerStartRestartGroup.startReplaceableGroup(2084031324);
        Object objRememberedValue = composerStartRestartGroup.rememberedValue();
        if (objRememberedValue == Composer.INSTANCE.getEmpty()) {
            objRememberedValue = SnapshotStateKt__SnapshotStateKt.mutableStateOf$default(Lifecycle.Event.ON_CREATE, null, 2, null);
            composerStartRestartGroup.updateRememberedValue(objRememberedValue);
        }
        final MutableState mutableState = (MutableState) objRememberedValue;
        composerStartRestartGroup.endReplaceableGroup();
        EffectsKt.DisposableEffect(context, lifecycle, streetViewPanoramaView, new Function1() { // from class: com.google.maps.android.compose.streetview.StreetViewKt$$ExternalSyntheticLambda0
            @Override // kotlin.jvm.functions.Function1
            public final Object invoke(Object obj) {
                return StreetViewKt.StreetViewLifecycle$lambda$16(streetViewPanoramaView, mutableState, lifecycle, context, (DisposableEffectScope) obj);
            }
        }, composerStartRestartGroup, 584);
        ScopeUpdateScope scopeUpdateScopeEndRestartGroup = composerStartRestartGroup.endRestartGroup();
        if (scopeUpdateScopeEndRestartGroup != null) {
            scopeUpdateScopeEndRestartGroup.updateScope(new Function2() { // from class: com.google.maps.android.compose.streetview.StreetViewKt$$ExternalSyntheticLambda1
                @Override // kotlin.jvm.functions.Function2
                public final Object invoke(Object obj, Object obj2) {
                    return StreetViewKt.StreetViewLifecycle$lambda$17(streetViewPanoramaView, i, (Composer) obj, ((Integer) obj2).intValue());
                }
            });
        }
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final DisposableEffectResult StreetViewLifecycle$lambda$16(final StreetViewPanoramaView streetView, MutableState previousState, final Lifecycle lifecycle, final Context context, DisposableEffectScope DisposableEffect) {
        Intrinsics.checkNotNullParameter(streetView, "$streetView");
        Intrinsics.checkNotNullParameter(previousState, "$previousState");
        Intrinsics.checkNotNullParameter(lifecycle, "$lifecycle");
        Intrinsics.checkNotNullParameter(context, "$context");
        Intrinsics.checkNotNullParameter(DisposableEffect, "$this$DisposableEffect");
        final LifecycleEventObserver lifecycleEventObserverLifecycleObserver = lifecycleObserver(streetView, previousState);
        final ComponentCallbacks componentCallbacks = componentCallbacks(streetView);
        lifecycle.addObserver(lifecycleEventObserverLifecycleObserver);
        context.registerComponentCallbacks(componentCallbacks);
        return new DisposableEffectResult() { // from class: com.google.maps.android.compose.streetview.StreetViewKt$StreetViewLifecycle$lambda$16$$inlined$onDispose$1
            @Override // androidx.compose.runtime.DisposableEffectResult
            public void dispose() {
                lifecycle.removeObserver(lifecycleEventObserverLifecycleObserver);
                context.unregisterComponentCallbacks(componentCallbacks);
                streetView.onDestroy();
            }
        };
    }

    private static final LifecycleEventObserver lifecycleObserver(final StreetViewPanoramaView streetViewPanoramaView, final MutableState<Lifecycle.Event> mutableState) {
        return new LifecycleEventObserver() { // from class: com.google.maps.android.compose.streetview.StreetViewKt$$ExternalSyntheticLambda8
            @Override // androidx.lifecycle.LifecycleEventObserver
            public final void onStateChanged(LifecycleOwner lifecycleOwner, Lifecycle.Event event) {
                StreetViewKt.lifecycleObserver$lambda$19(mutableState, streetViewPanoramaView, lifecycleOwner, event);
            }
        };
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final void lifecycleObserver$lambda$19(MutableState previousState, StreetViewPanoramaView this_lifecycleObserver, LifecycleOwner lifecycleOwner, Lifecycle.Event event) {
        Intrinsics.checkNotNullParameter(previousState, "$previousState");
        Intrinsics.checkNotNullParameter(this_lifecycleObserver, "$this_lifecycleObserver");
        Intrinsics.checkNotNullParameter(lifecycleOwner, "<unused var>");
        Intrinsics.checkNotNullParameter(event, "event");
        event.getTargetState();
        switch (WhenMappings.$EnumSwitchMapping$0[event.ordinal()]) {
            case 1:
                if (previousState.getValue() != Lifecycle.Event.ON_STOP) {
                    this_lifecycleObserver.onCreate(new Bundle());
                }
                break;
            case 2:
                this_lifecycleObserver.onStart();
                break;
            case 3:
                this_lifecycleObserver.onResume();
                break;
            case 4:
                this_lifecycleObserver.onPause();
                break;
            case 5:
                this_lifecycleObserver.onStop();
                break;
            case 6:
                break;
            default:
                throw new IllegalStateException();
        }
        previousState.setValue(event);
    }

    private static final ComponentCallbacks componentCallbacks(final StreetViewPanoramaView streetViewPanoramaView) {
        return new ComponentCallbacks() { // from class: com.google.maps.android.compose.streetview.StreetViewKt.componentCallbacks.1
            @Override // android.content.ComponentCallbacks
            public void onConfigurationChanged(Configuration config) {
                Intrinsics.checkNotNullParameter(config, "config");
            }

            @Override // android.content.ComponentCallbacks
            public void onLowMemory() {
                streetViewPanoramaView.onLowMemory();
            }
        };
    }

    private static final Object newComposition(StreetViewPanoramaView streetViewPanoramaView, CompositionContext compositionContext, Function2<? super Composer, ? super Integer, Unit> function2, Continuation<? super Composition> continuation) throws Throwable {
        InlineMarker.mark(0);
        SafeContinuation safeContinuation = new SafeContinuation(IntrinsicsKt.intercepted(continuation));
        streetViewPanoramaView.getStreetViewPanoramaAsync(new StreetViewKt$newComposition$$inlined$awaitStreetViewPanorama$1(safeContinuation));
        Unit unit = Unit.INSTANCE;
        Object orThrow = safeContinuation.getOrThrow();
        if (orThrow == IntrinsicsKt.getCOROUTINE_SUSPENDED()) {
            DebugProbesKt.probeCoroutineSuspended(continuation);
        }
        InlineMarker.mark(1);
        StreetViewPanorama streetViewPanorama = (StreetViewPanorama) orThrow;
        Log.d("StreetView", "Location is " + streetViewPanorama.getLocation());
        Composition Composition = CompositionKt.Composition(new StreetViewPanoramaApplier(streetViewPanorama), compositionContext);
        Composition.setContent(function2);
        Unit unit2 = Unit.INSTANCE;
        return Composition;
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final StreetViewCameraPositionState StreetView$lambda$6(State<StreetViewCameraPositionState> state) {
        return state.getValue();
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final boolean StreetView$lambda$7(State<Boolean> state) {
        return state.getValue().booleanValue();
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final boolean StreetView$lambda$8(State<Boolean> state) {
        return state.getValue().booleanValue();
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final boolean StreetView$lambda$9(State<Boolean> state) {
        return state.getValue().booleanValue();
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final boolean StreetView$lambda$10(State<Boolean> state) {
        return state.getValue().booleanValue();
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static final StreetViewPanoramaEventListeners StreetView$lambda$12(State<StreetViewPanoramaEventListeners> state) {
        return state.getValue();
    }
}