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

import X.0Gp;
import X.0HH;
import X.9DY;
import X.A7A;
import X.AnonymousClass9rI;
import X.C0488A4u;
import X.IUu;
import X.JMA;
import X.PUw;
import com.bytedance.covode.number.Covode;
import com.bytedance.ies.ugc.aweme.network.RetrofitFactory;
import com.ss.android.ugc.aweme.base.api.BaseResponse;
import com.ss.android.ugc.aweme.music.model.CollectMusicResponse;

public final class UserFavoritesApi {
    public static final RetrofitApi LIZ = ((RetrofitApi) RetrofitFactory.LIZ().LIZ(9DY.LJ).LIZ(RetrofitApi.class));

    public interface RetrofitApi {
        static {
            Covode.recordClassIndex(75545);
        }

        @JMA(LIZ = "/aweme/v1/aweme/collect/")
        0Gp<BaseResponse> collectAweme(@PUw(LIZ = "aweme_id") String str, @PUw(LIZ = "action") int i, @PUw(LIZ = "collect_privacy_setting") int i2);

        @JMA(LIZ = "/aweme/v1/challenge/collect/")
        0Gp<BaseResponse> collectChallenge(@PUw(LIZ = "ch_id") String str, @PUw(LIZ = "action") int i);

        @IUu(LIZ = "/tiktok/comment/collect/v1/")
        0Gp<BaseResponse> collectComment(@PUw(LIZ = "comment_id") String str, @PUw(LIZ = "action") int i);

        @IUu(LIZ = "/aweme/v1/lvideo/collect/")
        0Gp<BaseResponse> collectLongVideo(@PUw(LIZ = "album_id") String str, @PUw(LIZ = "action") int i);

        @JMA(LIZ = "/aweme/v1/mix/collect/")
        0Gp<BaseResponse> collectMix(@PUw(LIZ = "mix_id") String str, @PUw(LIZ = "action") int i);

        @JMA(LIZ = "/aweme/v1/music/collect/")
        0Gp<CollectMusicResponse> collectMusic(@PUw(LIZ = "music_id") String str, @PUw(LIZ = "action") int i);

        @IUu(LIZ = "/tiktok/v1/forum/question/collect/")
        0Gp<BaseResponse> collectQuestion(@PUw(LIZ = "question_id") long j, @PUw(LIZ = "action") int i);

        @JMA(LIZ = "/aweme/v2/shop/seeding/collect/")
        0Gp<BaseResponse> collectSeeding(@PUw(LIZ = "seed_id") String str, @PUw(LIZ = "operate_type") int i);

        @JMA(LIZ = "/aweme/v1/aweme/listcollection/")
        0Gp<BaseResponse> fetchCollectAwemeList(@PUw(LIZ = "cursor") int i, @PUw(LIZ = "count") int i2);

        @JMA(LIZ = "/aweme/v1/challenge/listcollection/")
        0Gp<Object> fetchCollectChallengeList(@PUw(LIZ = "cursor") int i, @PUw(LIZ = "count") int i2);

        @JMA(LIZ = "/tiktok/comment/listcollection/v1/")
        0Gp<AnonymousClass9rI> fetchCollectCommentList(@PUw(LIZ = "cursor") int i, @PUw(LIZ = "count") int i2);

        @JMA(LIZ = "/aweme/v1/music/listcollection/")
        0Gp<BaseResponse> fetchCollectMusicList(@PUw(LIZ = "cursor") int i, @PUw(LIZ = "count") int i2);

        @JMA(LIZ = "/tiktok/v1/forum/question/listcollection/")
        0Gp<C0488A4u> fetchCollectQuestionList(@PUw(LIZ = "cursor") int i, @PUw(LIZ = "count") int i2);

        @JMA(LIZ = "/aweme/v1/sticker/listcollection/")
        0Gp<A7A> fetchStickerList(@PUw(LIZ = "cursor") int i, @PUw(LIZ = "count") int i2);
    }

    static {
        Covode.recordClassIndex(75544);
    }

    public static AnonymousClass9rI LIZ(int i, int i2) {
        0Gp<AnonymousClass9rI> fetchCollectCommentList = LIZ.fetchCollectCommentList(i, i2);
        try {
            fetchCollectCommentList.LJFF();
        } catch (InterruptedException e) {
            0HH.LIZ(e);
        }
        if (fetchCollectCommentList.LIZJ()) {
            try {
                throw fetchCollectCommentList.LJ();
            } catch (Exception e2) {
                0HH.LIZ(e2);
            }
        }
        return (AnonymousClass9rI) fetchCollectCommentList.LIZLLL();
    }

    public static C0488A4u LIZIZ(int i, int i2) {
        0Gp<C0488A4u> fetchCollectQuestionList = LIZ.fetchCollectQuestionList(i, i2);
        try {
            fetchCollectQuestionList.LJFF();
        } catch (InterruptedException e) {
            0HH.LIZ(e);
        }
        if (fetchCollectQuestionList.LIZJ()) {
            try {
                throw fetchCollectQuestionList.LJ();
            } catch (Exception e2) {
                0HH.LIZ(e2);
            }
        }
        return (C0488A4u) fetchCollectQuestionList.LIZLLL();
    }

    public static A7A LIZJ(int i, int i2) {
        0Gp<A7A> fetchStickerList = LIZ.fetchStickerList(i, i2);
        try {
            fetchStickerList.LJFF();
        } catch (InterruptedException e) {
            0HH.LIZ(e);
        }
        if (fetchStickerList.LIZJ()) {
            try {
                throw fetchStickerList.LJ();
            } catch (Exception e2) {
                0HH.LIZ(e2);
            }
        }
        return (A7A) fetchStickerList.LIZLLL();
    }
}
