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

import b1.C1186a;
import com.revenuecat.purchases.paywalls.components.common.LocaleId;
import com.revenuecat.purchases.paywalls.components.properties.ThemeVideoUrls;
import com.revenuecat.purchases.ui.revenuecatui.components.PresentedVideoPartial;
import com.revenuecat.purchases.ui.revenuecatui.components.ktx.LocalizationKt;
import com.revenuecat.purchases.ui.revenuecatui.helpers.NonEmptyMap;
import kotlin.jvm.internal.p;

/* JADX INFO: loaded from: classes3.dex */
public final class VideoComponentState$themeVideoUrls$2 extends p implements J4.a {
    final /* synthetic */ VideoComponentState this$0;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public VideoComponentState$themeVideoUrls$2(VideoComponentState videoComponentState) {
        super(0);
        this.this$0 = videoComponentState;
    }

    /* JADX WARN: Multi-variable type inference failed */
    @Override // J4.a
    public final ThemeVideoUrls invoke() {
        NonEmptyMap sources;
        ThemeVideoUrls themeVideoUrls;
        String localeId = LocalizationKt.toLocaleId((C1186a) this.this$0.localeProvider.invoke());
        PresentedVideoPartial presentedPartial = this.this$0.getPresentedPartial();
        if (presentedPartial != null && (sources = presentedPartial.getSources()) != null && (themeVideoUrls = (ThemeVideoUrls) sources.getOrDefault(LocaleId.m571boximpl(localeId), sources.getEntry().getValue())) != null) {
            return themeVideoUrls;
        }
        NonEmptyMap sources2 = this.this$0.style.getSources();
        return (ThemeVideoUrls) sources2.getOrDefault(LocaleId.m571boximpl(localeId), sources2.getEntry().getValue());
    }
}
