package com.ss.android.ugc.aweme.setting.api;

import X.2b0;
import X.6tJ;
import X.9DY;
import X.C0935PUu;
import X.C0937PUw;
import X.IUu;
import X.JLr;
import X.JMA;
import X.JMB;
import X.QO2;
import X.QO6;
import X.QV6;
import com.bytedance.covode.number.Covode;
import java.util.concurrent.ExecutionException;

public final class RestrictApi {
    public static final RealApi LIZ = ((RealApi) 2b0.LIZ(9DY.LJ, RealApi.class));

    public interface RealApi {
        static {
            Covode.recordClassIndex(105668);
        }

        @JMA(LIZ = "/aweme/v1/item/restrict/info/")
        JLr<QV6> getRestrictInfo(@C0937PUw(LIZ = "target_iid") String str);

        @IUu(LIZ = "/aweme/v1/item/restrict/")
        @6tJ
        JLr<QO6> restrictAweme(@C0935PUu(LIZ = "target_iid") String str);

        @IUu(LIZ = "/aweme/v1/user/restrict/")
        @6tJ
        JLr<QO6> restrictUser(@C0935PUu(LIZ = "target_uid") String str);
    }

    static {
        Covode.recordClassIndex(105667);
    }

    public static QO2 LIZ(String str) {
        try {
            QV6 qv6 = (QV6) LIZ.getRestrictInfo(str).get();
            if (qv6 == null) {
                return null;
            }
            qv6.LIZ.LIZ = str;
            return qv6.LIZ;
        } catch (ExecutionException e) {
            throw JMB.getCompatibleException(e);
        }
    }

    public static QO6 LIZIZ(String str) {
        try {
            return (QO6) LIZ.restrictAweme(str).get();
        } catch (ExecutionException e) {
            throw JMB.getCompatibleException(e);
        }
    }

    public static QO6 LIZJ(String str) {
        try {
            return (QO6) LIZ.restrictUser(str).get();
        } catch (ExecutionException e) {
            throw JMB.getCompatibleException(e);
        }
    }
}
