package m7;

import android.content.Context;
import android.net.Uri;
import android.text.TextUtils;
import androidx.annotation.Nullable;
import com.google.android.gms.internal.ads.hz;
import com.google.android.gms.internal.ads.l10;
import com.google.android.gms.internal.ads.p10;
import java.util.Collections;
import java.util.List;
import p7.a0;
import p7.r0;

/* JADX INFO: loaded from: classes2.dex */
public final class b {

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public boolean f30424b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final hz f30425c = new hz(Collections.emptyList(), false);

    @Nullable
    private final p10 zzc;

    public b(Context context, @Nullable p10 p10Var, @Nullable hz hzVar) {
        this.f30423a = context;
        this.zzc = p10Var;
    }

    public final boolean a() {
        p10 p10Var = this.zzc;
        return ((p10Var == null || !((l10) p10Var).f13466g.f14800f) && !this.f30425c.f12290a) || this.f30424b;
    }

    public final void zzc(@Nullable String str) {
        List<String> list;
        p10 p10Var = this.zzc;
        hz hzVar = this.f30425c;
        if ((p10Var == null || !((l10) p10Var).f13466g.f14800f) && !hzVar.f12290a) {
            return;
        }
        if (str == null) {
            str = "";
        }
        if (p10Var != null) {
            ((l10) p10Var).b(str, null, 3);
            return;
        }
        if (!hzVar.f12290a || (list = hzVar.zzb) == null) {
            return;
        }
        for (String str2 : list) {
            if (!TextUtils.isEmpty(str2)) {
                String strReplace = str2.replace("{NAVIGATION_URL}", Uri.encode(str));
                r0 r0Var = n.C.f30464c;
                new a0(this.f30423a, "", strReplace, null, null).b();
            }
        }
    }
}
