package v4;

import android.os.Bundle;
import com.google.firebase.remoteconfig.RemoteConfigConstants;
import java.util.Iterator;
import java.util.List;
import kotlin.Metadata;
import v4.z;

@Metadata(d1 = {"\u00006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010 \n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\b\u0017\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001B\u000f\u0012\u0006\u0010\u0012\u001a\u00020\u000f¢\u0006\u0004\b\u0013\u0010\u0014J$\u0010\n\u001a\u00020\t2\u0006\u0010\u0004\u001a\u00020\u00032\b\u0010\u0006\u001a\u0004\u0018\u00010\u00052\b\u0010\b\u001a\u0004\u0018\u00010\u0007H\u0002J\b\u0010\u000b\u001a\u00020\u0002H\u0016J*\u0010\u000e\u001a\u00020\t2\f\u0010\r\u001a\b\u0012\u0004\u0012\u00020\u00030\f2\b\u0010\u0006\u001a\u0004\u0018\u00010\u00052\b\u0010\b\u001a\u0004\u0018\u00010\u0007H\u0016R\u0014\u0010\u0012\u001a\u00020\u000f8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0010\u0010\u0011¨\u0006\u0015"}, d2 = {"Lv4/q;", "Lv4/z;", "Lv4/p;", "Lv4/g;", "entry", "Lv4/t;", "navOptions", "Lv4/z$a;", "navigatorExtras", "Lrm/n0;", "m", "l", "", RemoteConfigConstants.ResponseFieldKey.ENTRIES, "e", "Lv4/a0;", "c", "Lv4/a0;", "navigatorProvider", "<init>", "(Lv4/a0;)V", "navigation-common_release"}, k = 1, mv = {1, 6, 0})
@z.b("navigation")
/* loaded from: classes.dex */
public class q extends z {

    /* renamed from: c, reason: collision with root package name and from kotlin metadata */
    private final a0 navigatorProvider;

    public q(a0 navigatorProvider) {
        kotlin.jvm.internal.t.g(navigatorProvider, "navigatorProvider");
        this.navigatorProvider = navigatorProvider;
    }

    private final void m(g gVar, t tVar, z.a aVar) {
        List e10;
        p pVar = (p) gVar.f();
        Bundle d10 = gVar.d();
        int Z = pVar.Z();
        String a02 = pVar.a0();
        if (!((Z == 0 && a02 == null) ? false : true)) {
            throw new IllegalStateException(kotlin.jvm.internal.t.p("no start destination defined via app:startDestination for ", pVar.C()).toString());
        }
        o W = a02 != null ? pVar.W(a02, false) : pVar.U(Z, false);
        if (W != null) {
            z d11 = this.navigatorProvider.d(W.F());
            e10 = sm.t.e(b().a(W, W.m(d10)));
            d11.e(e10, tVar, aVar);
        } else {
            throw new IllegalArgumentException("navigation destination " + pVar.Y() + " is not a direct child of this NavGraph");
        }
    }

    @Override // v4.z
    public void e(List entries, t tVar, z.a aVar) {
        kotlin.jvm.internal.t.g(entries, "entries");
        Iterator it = entries.iterator();
        while (it.hasNext()) {
            m((g) it.next(), tVar, aVar);
        }
    }

    @Override // v4.z
    /* renamed from: l, reason: merged with bridge method [inline-methods] */
    public p a() {
        return new p(this);
    }
}
