package v4;

import android.content.Context;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.lifecycle.n;

/* loaded from: classes.dex */
public final class h implements Parcelable {

    /* renamed from: p, reason: collision with root package name */
    private final String f39073p;

    /* renamed from: q, reason: collision with root package name */
    private final int f39074q;

    /* renamed from: r, reason: collision with root package name */
    private final Bundle f39075r;

    /* renamed from: s, reason: collision with root package name */
    private final Bundle f39076s;

    /* renamed from: t, reason: collision with root package name */
    public static final b f39072t = new b(null);
    public static final Parcelable.Creator<h> CREATOR = new a();

    /* loaded from: classes.dex */
    public static final class a implements Parcelable.Creator {
        a() {
        }

        @Override // android.os.Parcelable.Creator
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public h createFromParcel(Parcel inParcel) {
            kotlin.jvm.internal.t.g(inParcel, "inParcel");
            return new h(inParcel);
        }

        @Override // android.os.Parcelable.Creator
        /* renamed from: b, reason: merged with bridge method [inline-methods] */
        public h[] newArray(int i10) {
            return new h[i10];
        }
    }

    /* loaded from: classes.dex */
    public static final class b {
        private b() {
        }

        public /* synthetic */ b(kotlin.jvm.internal.k kVar) {
            this();
        }
    }

    public h(g entry) {
        kotlin.jvm.internal.t.g(entry, "entry");
        this.f39073p = entry.g();
        this.f39074q = entry.f().D();
        this.f39075r = entry.d();
        Bundle bundle = new Bundle();
        this.f39076s = bundle;
        entry.k(bundle);
    }

    public final int a() {
        return this.f39074q;
    }

    public final String b() {
        return this.f39073p;
    }

    public final g c(Context context, o destination, n.b hostLifecycleState, k kVar) {
        kotlin.jvm.internal.t.g(context, "context");
        kotlin.jvm.internal.t.g(destination, "destination");
        kotlin.jvm.internal.t.g(hostLifecycleState, "hostLifecycleState");
        Bundle bundle = this.f39075r;
        if (bundle == null) {
            bundle = null;
        } else {
            bundle.setClassLoader(context.getClassLoader());
        }
        return g.C.a(context, destination, bundle, hostLifecycleState, kVar, this.f39073p, this.f39076s);
    }

    @Override // android.os.Parcelable
    public int describeContents() {
        return 0;
    }

    @Override // android.os.Parcelable
    public void writeToParcel(Parcel parcel, int i10) {
        kotlin.jvm.internal.t.g(parcel, "parcel");
        parcel.writeString(this.f39073p);
        parcel.writeInt(this.f39074q);
        parcel.writeBundle(this.f39075r);
        parcel.writeBundle(this.f39076s);
    }

    public h(Parcel inParcel) {
        kotlin.jvm.internal.t.g(inParcel, "inParcel");
        String readString = inParcel.readString();
        kotlin.jvm.internal.t.d(readString);
        kotlin.jvm.internal.t.f(readString, "inParcel.readString()!!");
        this.f39073p = readString;
        this.f39074q = inParcel.readInt();
        this.f39075r = inParcel.readBundle(h.class.getClassLoader());
        Bundle readBundle = inParcel.readBundle(h.class.getClassLoader());
        kotlin.jvm.internal.t.d(readBundle);
        kotlin.jvm.internal.t.f(readBundle, "inParcel.readBundle(javaClass.classLoader)!!");
        this.f39076s = readBundle;
    }
}
