package com.google.android.gms.ads.nonagon.signalgeneration;

import android.text.TextUtils;
import androidx.annotation.Nullable;
import com.google.android.gms.internal.ads.mk0;
import com.google.android.gms.internal.ads.zq0;
import org.json.JSONException;
import org.json.JSONObject;

/* JADX INFO: loaded from: classes2.dex */
public final class s0 implements mk0 {

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

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

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final String f8137c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final int f8138d;

    public s0(zq0 zq0Var, r0 r0Var, String str, int i10) {
        this.f8135a = zq0Var;
        this.f8136b = r0Var;
        this.f8137c = str;
        this.f8138d = i10;
    }

    @Override // com.google.android.gms.internal.ads.mk0
    public final void zzd(@Nullable c0 c0Var) {
        String strOptString;
        if (c0Var == null || this.f8138d == 2) {
            return;
        }
        boolean zIsEmpty = TextUtils.isEmpty(c0Var.zzc);
        zq0 zq0Var = this.f8135a;
        r0 r0Var = this.f8136b;
        if (zIsEmpty) {
            r0Var.a(this.f8137c, c0Var.f8005b, zq0Var);
            return;
        }
        try {
            strOptString = new JSONObject(c0Var.zzc).optString("request_id");
        } catch (JSONException e10) {
            m7.n.C.f30469h.d("RenderSignals.getRequestId", e10);
            strOptString = null;
        }
        if (TextUtils.isEmpty(strOptString)) {
            return;
        }
        r0Var.a(strOptString, c0Var.zzc, zq0Var);
    }

    @Override // com.google.android.gms.internal.ads.mk0
    public final void zze(@Nullable String str) {
    }
}
