package V2;

/* JADX INFO: loaded from: classes.dex */
public final class h implements S2.g {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public boolean f3002a = false;

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

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public S2.c f3004c;

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

    public h(f fVar) {
        this.f3005d = fVar;
    }

    @Override // S2.g
    public final S2.g c(String str) {
        if (this.f3002a) {
            throw new S2.b("Cannot encode a second value in the ValueEncoderContext");
        }
        this.f3002a = true;
        this.f3005d.d(this.f3004c, str, this.f3003b);
        return this;
    }

    @Override // S2.g
    public final S2.g d(boolean z5) {
        if (this.f3002a) {
            throw new S2.b("Cannot encode a second value in the ValueEncoderContext");
        }
        this.f3002a = true;
        this.f3005d.c(this.f3004c, z5 ? 1 : 0, this.f3003b);
        return this;
    }
}
