package com.chartboost.sdk.impl;

import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public final class eb {

    /* renamed from: a  reason: collision with root package name */
    public final boolean f1689a;
    public final Float b;
    public final boolean c;
    public final j8 d;

    public eb(boolean z, Float f, boolean z2, j8 j8Var) {
        this.f1689a = z;
        this.b = f;
        this.c = z2;
        this.d = j8Var;
    }

    public JSONObject a() {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("skippable", this.f1689a);
            if (this.f1689a) {
                jSONObject.put("skipOffset", this.b);
            }
            jSONObject.put("autoPlay", this.c);
            jSONObject.put("position", this.d);
        } catch (JSONException e) {
            dd.a("VastProperties: JSON error", e);
        }
        return jSONObject;
    }

    public static eb a(boolean z, j8 j8Var) {
        nd.a(j8Var, "Position is null");
        return new eb(false, null, z, j8Var);
    }

    public static eb a(float f, boolean z, j8 j8Var) {
        nd.a(j8Var, "Position is null");
        return new eb(true, Float.valueOf(f), z, j8Var);
    }
}
