package com.android.billingclient.api; import androidx.annotation.NonNull; import c.d.a.a.p; import java.util.ArrayList; /* compiled from: com.android.billingclient:billing@@3.0.3 */ public class BillingFlowParams { public boolean a; public String b; /* renamed from: c reason: collision with root package name */ public String f1547c; public String d; public String e; public int f = 0; public ArrayList g; public boolean h; /* compiled from: com.android.billingclient:billing@@3.0.3 */ public static class a { public String a; public String b; /* renamed from: c reason: collision with root package name */ public String f1548c; public int d = 0; public ArrayList e; @NonNull public BillingFlowParams a() { ArrayList arrayList = this.e; if (arrayList == null || arrayList.isEmpty()) { throw new IllegalArgumentException("SkuDetails must be provided."); } ArrayList arrayList2 = this.e; int size = arrayList2.size(); int i = 0; while (i < size) { int i2 = i + 1; if (arrayList2.get(i) != null) { i = i2; } else { throw new IllegalArgumentException("SKU cannot be null."); } } if (this.e.size() > 1) { SkuDetails skuDetails = this.e.get(0); String e = skuDetails.e(); ArrayList arrayList3 = this.e; int size2 = arrayList3.size(); for (int i3 = 0; i3 < size2; i3++) { SkuDetails skuDetails2 = arrayList3.get(i3); if (!e.equals("play_pass_subs") && !skuDetails2.e().equals("play_pass_subs") && !e.equals(skuDetails2.e())) { throw new IllegalArgumentException("SKUs should have the same type."); } } String f = skuDetails.f(); ArrayList arrayList4 = this.e; int size3 = arrayList4.size(); for (int i4 = 0; i4 < size3; i4++) { SkuDetails skuDetails3 = arrayList4.get(i4); if (!e.equals("play_pass_subs") && !skuDetails3.e().equals("play_pass_subs") && !f.equals(skuDetails3.f())) { throw new IllegalArgumentException("All SKUs must have the same package name."); } } } BillingFlowParams billingFlowParams = new BillingFlowParams(null); billingFlowParams.a = true ^ this.e.get(0).f().isEmpty(); billingFlowParams.b = this.a; billingFlowParams.e = null; billingFlowParams.f1547c = this.b; billingFlowParams.d = this.f1548c; billingFlowParams.f = this.d; billingFlowParams.g = this.e; billingFlowParams.h = false; return billingFlowParams; } } public BillingFlowParams() { } public /* synthetic */ BillingFlowParams(p pVar) { } }