package com.revenuecat.purchases.google;

import I2.C0328l;
import com.revenuecat.purchases.common.LogIntent;
import com.revenuecat.purchases.strings.BillingStrings;
import java.util.Arrays;
import java.util.List;
import kotlin.jvm.internal.p;
import x4.AbstractC3251q;

/* JADX INFO: loaded from: classes3.dex */
public final class BillingWrapper$onPurchasesUpdated$$inlined$log$1 extends p implements J4.a {
    final /* synthetic */ C0328l $billingResult$inlined;
    final /* synthetic */ LogIntent $intent;
    final /* synthetic */ List $notNullPurchasesList$inlined;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public BillingWrapper$onPurchasesUpdated$$inlined$log$1(LogIntent logIntent, C0328l c0328l, List list) {
        super(0);
        this.$intent = logIntent;
        this.$billingResult$inlined = c0328l;
        this.$notNullPurchasesList$inlined = list;
    }

    /* JADX WARN: Removed duplicated region for block: B:9:0x005d  */
    @Override // J4.a
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final String invoke() {
        String str;
        StringBuilder sb = new StringBuilder();
        sb.append(AbstractC3251q.m0(this.$intent.getEmojiList(), "", null, null, null, 62));
        sb.append(' ');
        String str2 = String.format(BillingStrings.BILLING_WRAPPER_PURCHASES_ERROR, Arrays.copyOf(new Object[]{BillingResultExtensionsBillingIndependentKt.toHumanReadableDescription(this.$billingResult$inlined)}, 1));
        List list = this.$notNullPurchasesList$inlined;
        if (list.isEmpty()) {
            list = null;
        }
        List list2 = list;
        if (list2 != null) {
            str = " Purchases:" + AbstractC3251q.m0(list2, ", ", null, null, BillingWrapper$onPurchasesUpdated$2$2$1.INSTANCE, 30);
            if (str == null) {
                str = " No purchases received";
            }
        }
        sb.append(str2.concat(str));
        return sb.toString();
    }
}
