package com.google.maps.android.compose;

import androidx.compose.foundation.layout.PaddingKt;
import androidx.compose.foundation.layout.PaddingValues;
import androidx.compose.runtime.Applier;
import androidx.compose.runtime.ComposablesKt;
import androidx.compose.runtime.Composer;
import androidx.compose.runtime.ComposerKt;
import androidx.compose.runtime.ProvidableCompositionLocal;
import androidx.compose.runtime.Updater;
import androidx.compose.ui.platform.CompositionLocalsKt;
import androidx.compose.ui.unit.Density;
import androidx.compose.ui.unit.LayoutDirection;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.LocationSource;
import com.google.android.gms.maps.MapView;
import kotlin.Metadata;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.Intrinsics;

/* JADX INFO: compiled from: MapUpdater.kt */
/* JADX INFO: loaded from: classes2.dex */
@Metadata(d1 = {"\u00008\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u000e\n\u0000\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\u001aN\u0010\u0004\u001a\u00020\u00052\b\b\u0002\u0010\u0006\u001a\u00020\u00072\b\u0010\b\u001a\u0004\u0018\u00010\t2\u0006\u0010\n\u001a\u00020\u000b2\b\b\u0002\u0010\f\u001a\u00020\u00012\b\u0010\r\u001a\u0004\u0018\u00010\u000e2\u0006\u0010\u000f\u001a\u00020\u00102\u0006\u0010\u0011\u001a\u00020\u0012H\u0081\b¢\u0006\u0002\u0010\u0013\"\u0011\u0010\u0000\u001a\u00020\u0001¢\u0006\b\n\u0000\u001a\u0004\b\u0002\u0010\u0003¨\u0006\u0014"}, d2 = {"DefaultMapContentPadding", "Landroidx/compose/foundation/layout/PaddingValues;", "getDefaultMapContentPadding", "()Landroidx/compose/foundation/layout/PaddingValues;", "MapUpdater", "", "mergeDescendants", "", "contentDescription", "", "cameraPositionState", "Lcom/google/maps/android/compose/CameraPositionState;", "contentPadding", "locationSource", "Lcom/google/android/gms/maps/LocationSource;", "mapProperties", "Lcom/google/maps/android/compose/MapProperties;", "mapUiSettings", "Lcom/google/maps/android/compose/MapUiSettings;", "(ZLjava/lang/String;Lcom/google/maps/android/compose/CameraPositionState;Landroidx/compose/foundation/layout/PaddingValues;Lcom/google/android/gms/maps/LocationSource;Lcom/google/maps/android/compose/MapProperties;Lcom/google/maps/android/compose/MapUiSettings;Landroidx/compose/runtime/Composer;II)V", "maps-compose_release"}, k = 2, mv = {2, 0, 0}, xi = 48)
public final class MapUpdaterKt {
    private static final PaddingValues DefaultMapContentPadding = PaddingKt.m827PaddingValuesYgX7TsA$default(0.0f, 0.0f, 3, null);

    public static final PaddingValues getDefaultMapContentPadding() {
        return DefaultMapContentPadding;
    }

    public static final void MapUpdater(boolean z, String str, CameraPositionState cameraPositionState, PaddingValues paddingValues, LocationSource locationSource, MapProperties mapProperties, MapUiSettings mapUiSettings, Composer composer, int i, int i2) {
        Intrinsics.checkNotNullParameter(cameraPositionState, "cameraPositionState");
        Intrinsics.checkNotNullParameter(mapProperties, "mapProperties");
        Intrinsics.checkNotNullParameter(mapUiSettings, "mapUiSettings");
        composer.startReplaceableGroup(1782787885);
        boolean z2 = (i2 & 1) != 0 ? false : z;
        PaddingValues defaultMapContentPadding = (i2 & 8) != 0 ? getDefaultMapContentPadding() : paddingValues;
        Applier<?> applier = composer.getApplier();
        Intrinsics.checkNotNull(applier, "null cannot be cast to non-null type com.google.maps.android.compose.MapApplier");
        GoogleMap map = ((MapApplier) applier).getMap();
        Applier<?> applier2 = composer.getApplier();
        Intrinsics.checkNotNull(applier2, "null cannot be cast to non-null type com.google.maps.android.compose.MapApplier");
        MapView mapView = ((MapApplier) applier2).getMapView();
        if (z2) {
            mapView.setImportantForAccessibility(4);
        }
        ProvidableCompositionLocal<Density> localDensity = CompositionLocalsKt.getLocalDensity();
        ComposerKt.sourceInformationMarkerStart(composer, 2023513938, "CC:CompositionLocal.kt#9igjgp");
        Object objConsume = composer.consume(localDensity);
        ComposerKt.sourceInformationMarkerEnd(composer);
        Density density = (Density) objConsume;
        ProvidableCompositionLocal<LayoutDirection> localLayoutDirection = CompositionLocalsKt.getLocalLayoutDirection();
        ComposerKt.sourceInformationMarkerStart(composer, 2023513938, "CC:CompositionLocal.kt#9igjgp");
        Object objConsume2 = composer.consume(localLayoutDirection);
        ComposerKt.sourceInformationMarkerEnd(composer);
        LayoutDirection layoutDirection = (LayoutDirection) objConsume2;
        AnonymousClass1 anonymousClass1 = new AnonymousClass1(map, cameraPositionState, str, density, layoutDirection);
        composer.startReplaceableGroup(1886828752);
        ComposerKt.sourceInformation(composer, "CC(ComposeNode):Composables.kt#9igjgp");
        if (!(composer.getApplier() instanceof MapApplier)) {
            ComposablesKt.invalidApplier();
        }
        composer.startNode();
        if (composer.getInserting()) {
            composer.createNode(new MapUpdaterKt$MapUpdater$$inlined$ComposeNode$1(anonymousClass1));
        } else {
            composer.useNode();
        }
        Composer composerM3820constructorimpl = Updater.m3820constructorimpl(composer);
        Updater.m3830updateimpl(composerM3820constructorimpl, density, MapUpdaterKt$MapUpdater$2$1.INSTANCE);
        Updater.m3830updateimpl(composerM3820constructorimpl, layoutDirection, MapUpdaterKt$MapUpdater$2$2.INSTANCE);
        Updater.m3830updateimpl(composerM3820constructorimpl, str, MapUpdaterKt$MapUpdater$2$3.INSTANCE);
        Updater.m3827setimpl(composerM3820constructorimpl, locationSource, new MapUpdaterKt$MapUpdater$2$4(map));
        Updater.m3827setimpl(composerM3820constructorimpl, Boolean.valueOf(mapProperties.getIsBuildingEnabled()), new MapUpdaterKt$MapUpdater$2$5(map));
        Updater.m3827setimpl(composerM3820constructorimpl, Boolean.valueOf(mapProperties.getIsIndoorEnabled()), new MapUpdaterKt$MapUpdater$2$6(map));
        Updater.m3827setimpl(composerM3820constructorimpl, Boolean.valueOf(mapProperties.getIsMyLocationEnabled()), new MapUpdaterKt$MapUpdater$2$7(map));
        Updater.m3827setimpl(composerM3820constructorimpl, Boolean.valueOf(mapProperties.getIsTrafficEnabled()), new MapUpdaterKt$MapUpdater$2$8(map));
        Updater.m3827setimpl(composerM3820constructorimpl, mapProperties.getLatLngBoundsForCameraTarget(), new MapUpdaterKt$MapUpdater$2$9(map));
        Updater.m3827setimpl(composerM3820constructorimpl, mapProperties.getMapStyleOptions(), new MapUpdaterKt$MapUpdater$2$10(map));
        Updater.m3827setimpl(composerM3820constructorimpl, mapProperties.getMapType(), new MapUpdaterKt$MapUpdater$2$11(map));
        Updater.m3827setimpl(composerM3820constructorimpl, Float.valueOf(mapProperties.getMaxZoomPreference()), new MapUpdaterKt$MapUpdater$2$12(map));
        Updater.m3827setimpl(composerM3820constructorimpl, Float.valueOf(mapProperties.getMinZoomPreference()), new MapUpdaterKt$MapUpdater$2$13(map));
        Updater.m3827setimpl(composerM3820constructorimpl, defaultMapContentPadding, new MapUpdaterKt$MapUpdater$2$14(map));
        Updater.m3827setimpl(composerM3820constructorimpl, Boolean.valueOf(mapUiSettings.getCompassEnabled()), new MapUpdaterKt$MapUpdater$2$15(map));
        Updater.m3827setimpl(composerM3820constructorimpl, Boolean.valueOf(mapUiSettings.getIndoorLevelPickerEnabled()), new MapUpdaterKt$MapUpdater$2$16(map));
        Updater.m3827setimpl(composerM3820constructorimpl, Boolean.valueOf(mapUiSettings.getMapToolbarEnabled()), new MapUpdaterKt$MapUpdater$2$17(map));
        Updater.m3827setimpl(composerM3820constructorimpl, Boolean.valueOf(mapUiSettings.getMyLocationButtonEnabled()), new MapUpdaterKt$MapUpdater$2$18(map));
        Updater.m3827setimpl(composerM3820constructorimpl, Boolean.valueOf(mapUiSettings.getRotationGesturesEnabled()), new MapUpdaterKt$MapUpdater$2$19(map));
        Updater.m3827setimpl(composerM3820constructorimpl, Boolean.valueOf(mapUiSettings.getScrollGesturesEnabled()), new MapUpdaterKt$MapUpdater$2$20(map));
        Updater.m3827setimpl(composerM3820constructorimpl, Boolean.valueOf(mapUiSettings.getScrollGesturesEnabledDuringRotateOrZoom()), new MapUpdaterKt$MapUpdater$2$21(map));
        Updater.m3827setimpl(composerM3820constructorimpl, Boolean.valueOf(mapUiSettings.getTiltGesturesEnabled()), new MapUpdaterKt$MapUpdater$2$22(map));
        Updater.m3827setimpl(composerM3820constructorimpl, Boolean.valueOf(mapUiSettings.getZoomControlsEnabled()), new MapUpdaterKt$MapUpdater$2$23(map));
        Updater.m3827setimpl(composerM3820constructorimpl, Boolean.valueOf(mapUiSettings.getZoomGesturesEnabled()), new MapUpdaterKt$MapUpdater$2$24(map));
        Updater.m3830updateimpl(composerM3820constructorimpl, cameraPositionState, MapUpdaterKt$MapUpdater$2$25.INSTANCE);
        composer.endNode();
        composer.endReplaceableGroup();
        composer.endReplaceableGroup();
    }

    /* JADX INFO: renamed from: com.google.maps.android.compose.MapUpdaterKt$MapUpdater$1, reason: invalid class name */
    /* JADX INFO: compiled from: MapUpdater.kt */
    @Metadata(k = 3, mv = {2, 0, 0}, xi = 176)
    public static final class AnonymousClass1 implements Function0<MapPropertiesNode> {
        final /* synthetic */ CameraPositionState $cameraPositionState;
        final /* synthetic */ String $contentDescription;
        final /* synthetic */ Density $density;
        final /* synthetic */ LayoutDirection $layoutDirection;
        final /* synthetic */ GoogleMap $map;

        public AnonymousClass1(GoogleMap googleMap, CameraPositionState cameraPositionState, String str, Density density, LayoutDirection layoutDirection) {
            this.$map = googleMap;
            this.$cameraPositionState = cameraPositionState;
            this.$contentDescription = str;
            this.$density = density;
            this.$layoutDirection = layoutDirection;
        }

        /* JADX WARN: Can't rename method to resolve collision */
        @Override // kotlin.jvm.functions.Function0
        public final MapPropertiesNode invoke() {
            return new MapPropertiesNode(this.$map, this.$cameraPositionState, this.$contentDescription, this.$density, this.$layoutDirection);
        }
    }
}