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

import J4.a;
import b1.C1186a;
import com.revenuecat.purchases.paywalls.components.common.LocaleId;
import com.revenuecat.purchases.paywalls.components.properties.ThemeImageUrls;
import com.revenuecat.purchases.ui.revenuecatui.components.PresentedImagePartial;
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 ImageComponentState$themeImageUrls$2 extends p implements a {
    final /* synthetic */ ImageComponentState this$0;

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

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