package i3;

import java.io.EOFException;
import java.util.concurrent.atomic.AtomicLong;
import okhttp3.Request;
import org.json.JSONObject;

/* JADX INFO: renamed from: i3.h, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final /* synthetic */ class C2274h implements J4.c {

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ JSONObject f18938b;

    public /* synthetic */ C2274h(J j4, JSONObject jSONObject, int i6) {
        this.f18937a = i6;
        this.f18938b = jSONObject;
    }

    @Override // J4.c
    public final Object invoke(Object obj) throws EOFException {
        JSONObject jSONObject = this.f18938b;
        String str = (String) obj;
        switch (this.f18937a) {
            case 0:
                Request.Builder builder = new Request.Builder();
                builder.i("https://api.trakt.tv/sync/history");
                AtomicLong atomicLong = J.f18885e;
                builder.f(J.y(str));
                builder.h(J.x(jSONObject));
                return builder.b();
            case 1:
                Request.Builder builder2 = new Request.Builder();
                builder2.i("https://api.trakt.tv/sync/history");
                AtomicLong atomicLong2 = J.f18885e;
                builder2.f(J.y(str));
                builder2.h(J.x(jSONObject));
                return builder2.b();
            case 2:
                Request.Builder builder3 = new Request.Builder();
                builder3.i("https://api.trakt.tv/sync/history");
                AtomicLong atomicLong3 = J.f18885e;
                builder3.f(J.y(str));
                builder3.h(J.x(jSONObject));
                return builder3.b();
            case 3:
                Request.Builder builder4 = new Request.Builder();
                builder4.i("https://api.trakt.tv/sync/watchlist");
                AtomicLong atomicLong4 = J.f18885e;
                builder4.f(J.y(str));
                builder4.h(J.x(jSONObject));
                return builder4.b();
            case 4:
                Request.Builder builder5 = new Request.Builder();
                builder5.i("https://api.trakt.tv/sync/history/remove");
                AtomicLong atomicLong5 = J.f18885e;
                builder5.f(J.y(str));
                builder5.h(J.x(jSONObject));
                return builder5.b();
            case 5:
                Request.Builder builder6 = new Request.Builder();
                builder6.i("https://api.trakt.tv/sync/watchlist/remove");
                AtomicLong atomicLong6 = J.f18885e;
                builder6.f(J.y(str));
                builder6.h(J.x(jSONObject));
                return builder6.b();
            case 6:
                Request.Builder builder7 = new Request.Builder();
                builder7.i("https://api.trakt.tv/sync/history/remove");
                AtomicLong atomicLong7 = J.f18885e;
                builder7.f(J.y(str));
                builder7.h(J.x(jSONObject));
                return builder7.b();
            default:
                Request.Builder builder8 = new Request.Builder();
                builder8.i("https://api.trakt.tv/sync/history/remove");
                AtomicLong atomicLong8 = J.f18885e;
                builder8.f(J.y(str));
                builder8.h(J.x(jSONObject));
                return builder8.b();
        }
    }
}
