package com.google.firebase.messaging;

import io.sentry.M0;
import io.sentry.N0;
import io.sentry.P;
import io.sentry.protocol.C0748a;
import io.sentry.protocol.C0750c;
import java.util.ArrayList;
import java.util.Iterator;

/* JADX INFO: loaded from: classes.dex */
public final /* synthetic */ class l implements P1.g, N0 {

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

    /* JADX INFO: renamed from: l, reason: collision with root package name */
    public final /* synthetic */ String f5904l;

    public /* synthetic */ l(String str, int i) {
        this.f5903k = i;
        this.f5904l = str;
    }

    @Override // P1.g
    public P1.o c(Object obj) {
        String str = this.f5904l;
        D d3 = (D) obj;
        switch (this.f5903k) {
            case 0:
                S.g gVar = FirebaseMessaging.f5845l;
                d3.getClass();
                P1.o oVarD = d3.d(new A("S", str));
                d3.f();
                return oVarD;
            default:
                S.g gVar2 = FirebaseMessaging.f5845l;
                d3.getClass();
                P1.o oVarD2 = d3.d(new A("U", str));
                d3.f();
                return oVarD2;
        }
    }

    @Override // io.sentry.N0
    public void d(M0 m02) {
        String str = this.f5904l;
        m02.f6949c = str;
        C0750c c0750c = m02.f6960o;
        C0748a c0748a = (C0748a) c0750c.d(C0748a.class, "app");
        if (c0748a == null) {
            c0748a = new C0748a();
            c0750c.b(c0748a);
        }
        if (str == null) {
            c0748a.f7935s = null;
        } else {
            ArrayList arrayList = new ArrayList(1);
            arrayList.add(str);
            c0748a.f7935s = arrayList;
        }
        Iterator<P> it = m02.f6955j.getScopeObservers().iterator();
        while (it.hasNext()) {
            it.next().m(c0750c);
        }
    }
}
