package com.revenuecat.purchases.ui.revenuecatui.components.video;

import androidx.compose.runtime.MutableState;
import com.revenuecat.purchases.ui.revenuecatui.components.video.TextureVideoView;
import java.util.Map;
import kotlin.jvm.internal.o;
import kotlin.jvm.internal.p;
import w4.C3137A;

/* JADX INFO: loaded from: classes3.dex */
public final class VideoViewKt$Video$3$2$1 extends p implements J4.c {
    final /* synthetic */ String $key;
    final /* synthetic */ Map<String, VideoPlaybackState> $savedState;
    final /* synthetic */ MutableState<TextureVideoView> $videoView;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public VideoViewKt$Video$3$2$1(MutableState<TextureVideoView> mutableState, Map<String, VideoPlaybackState> map, String str) {
        super(1);
        this.$videoView = mutableState;
        this.$savedState = map;
        this.$key = str;
    }

    @Override // J4.c
    public /* bridge */ /* synthetic */ Object invoke(Object obj) {
        invoke((TextureVideoView) obj);
        return C3137A.f25453a;
    }

    public final void invoke(TextureVideoView view) {
        o.h(view, "view");
        Map<String, VideoPlaybackState> map = this.$savedState;
        String str = this.$key;
        TextureVideoView.PlaybackState playbackState = view.getPlaybackState();
        map.put(str, new VideoPlaybackState(playbackState.getPositionMs(), playbackState.getPlayWhenReady()));
        view.release();
        this.$videoView.setValue(null);
    }
}
