package V2;

import V4.C0772m;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.revenuecat.purchases.CustomerInfo;
import com.revenuecat.purchases.PurchasesError;
import com.revenuecat.purchases.interfaces.ReceiveCustomerInfoCallback;
import m3.AbstractC2467b;
import w4.C3137A;

/* JADX INFO: renamed from: V2.w0, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C0733w0 implements ReceiveCustomerInfoCallback, OnCompleteListener {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ int f8135a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ C0772m f8136b;

    public /* synthetic */ C0733w0(C0772m c0772m, int i6) {
        this.f8135a = i6;
        this.f8136b = c0772m;
    }

    @Override // com.google.android.gms.tasks.OnCompleteListener
    public void onComplete(Task task) {
        Exception exception = task.getException();
        C0772m c0772m = this.f8136b;
        if (exception != null) {
            c0772m.resumeWith(AbstractC2467b.d(exception));
        } else if (task.isCanceled()) {
            c0772m.i(null);
        } else {
            c0772m.resumeWith(task.getResult());
        }
    }

    @Override // com.revenuecat.purchases.interfaces.ReceiveCustomerInfoCallback
    public void onError(PurchasesError error) {
        switch (this.f8135a) {
            case 0:
                kotlin.jvm.internal.o.h(error, "error");
                this.f8136b.resumeWith(AbstractC2467b.d(new IllegalStateException(error.getMessage())));
                break;
            default:
                kotlin.jvm.internal.o.h(error, "error");
                this.f8136b.resumeWith(AbstractC2467b.d(new IllegalStateException(error.getMessage())));
                break;
        }
    }

    @Override // com.revenuecat.purchases.interfaces.ReceiveCustomerInfoCallback
    public void onReceived(CustomerInfo customerInfo) {
        switch (this.f8135a) {
            case 0:
                kotlin.jvm.internal.o.h(customerInfo, "customerInfo");
                this.f8136b.resumeWith(customerInfo);
                break;
            default:
                kotlin.jvm.internal.o.h(customerInfo, "customerInfo");
                this.f8136b.resumeWith(C3137A.f25453a);
                break;
        }
    }
}
