package com.google.maps.android.compose;

import com.google.android.gms.maps.model.Polygon;
import com.google.maps.android.compose.MapNode;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;

/* JADX INFO: compiled from: Polygon.kt */
/* JADX INFO: loaded from: classes2.dex */
@Metadata(d1 = {"\u0000\u001c\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\n\b\u0001\u0018\u00002\u00020\u0001B#\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0012\u0010\u0004\u001a\u000e\u0012\u0004\u0012\u00020\u0003\u0012\u0004\u0012\u00020\u00060\u0005¢\u0006\u0004\b\u0007\u0010\bJ\b\u0010\u000f\u001a\u00020\u0006H\u0016R\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\t\u0010\nR&\u0010\u0004\u001a\u000e\u0012\u0004\u0012\u00020\u0003\u0012\u0004\u0012\u00020\u00060\u0005X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u000b\u0010\f\"\u0004\b\r\u0010\u000e¨\u0006\u0010"}, d2 = {"Lcom/google/maps/android/compose/PolygonNode;", "Lcom/google/maps/android/compose/MapNode;", "polygon", "Lcom/google/android/gms/maps/model/Polygon;", "onPolygonClick", "Lkotlin/Function1;", "", "<init>", "(Lcom/google/android/gms/maps/model/Polygon;Lkotlin/jvm/functions/Function1;)V", "getPolygon", "()Lcom/google/android/gms/maps/model/Polygon;", "getOnPolygonClick", "()Lkotlin/jvm/functions/Function1;", "setOnPolygonClick", "(Lkotlin/jvm/functions/Function1;)V", "onRemoved", "maps-compose_release"}, k = 1, mv = {2, 0, 0}, xi = 48)
public final class PolygonNode implements MapNode {
    public static final int $stable = 8;
    private Function1<? super Polygon, Unit> onPolygonClick;
    private final Polygon polygon;

    public PolygonNode(Polygon polygon, Function1<? super Polygon, Unit> onPolygonClick) {
        Intrinsics.checkNotNullParameter(polygon, "polygon");
        Intrinsics.checkNotNullParameter(onPolygonClick, "onPolygonClick");
        this.polygon = polygon;
        this.onPolygonClick = onPolygonClick;
    }

    @Override // com.google.maps.android.compose.MapNode
    public void onAttached() {
        MapNode.DefaultImpls.onAttached(this);
    }

    @Override // com.google.maps.android.compose.MapNode
    public void onCleared() {
        MapNode.DefaultImpls.onCleared(this);
    }

    public final Polygon getPolygon() {
        return this.polygon;
    }

    public final Function1<Polygon, Unit> getOnPolygonClick() {
        return this.onPolygonClick;
    }

    public final void setOnPolygonClick(Function1<? super Polygon, Unit> function1) {
        Intrinsics.checkNotNullParameter(function1, "<set-?>");
        this.onPolygonClick = function1;
    }

    @Override // com.google.maps.android.compose.MapNode
    public void onRemoved() {
        this.polygon.remove();
    }
}