package com.ss.android.ugc.aweme.kids.choosemusic.api;

import X.0Gp;
import X.2vM;
import X.C5312OQp;
import X.C5416OUp;
import X.JLr;
import X.JMA;
import X.OUB;
import X.OV5;
import X.OVB;
import X.PUw;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.base.api.BaseResponse;
import com.ss.android.ugc.aweme.music.model.CollectedMusicList;
import com.ss.android.ugc.aweme.services.RetrofitService;

public final class ChooseMusicApi {
    public static API LIZ = ((API) RetrofitService.createIRetrofitServicebyMonsterPlugin(false).createNewRetrofit(OUB.LIZ).create(API.class));

    public interface API {
        static {
            Covode.recordClassIndex(89206);
        }

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

        @JMA(LIZ = "/tiktok/v1/kids/hot/music/")
        0Gp<OV5> getHotMusicList(@PUw(LIZ = "cursor") int i, @PUw(LIZ = "count") int i2, @PUw(LIZ = "not_duplicate") boolean z);

        @JMA(LIZ = "/tiktok/v1/kids/music/collection/")
        0Gp<2vM> getMusicSheet(@PUw(LIZ = "cursor") int i, @PUw(LIZ = "count") int i2);

        @JMA(LIZ = "/aweme/v1/music/recommend/by/video/")
        0Gp<OV5> getRecommenMusicListFromAI(@PUw(LIZ = "cursor") int i, @PUw(LIZ = "count") int i2, @PUw(LIZ = "from") String str, @PUw(LIZ = "zip_uri") String str2, @PUw(LIZ = "music_ailab_ab") String str3, @PUw(LIZ = "creation_id") String str4, @PUw(LIZ = "micro_app_id") String str5, @PUw(LIZ = "video_duration") long j);

        @JMA(LIZ = "/aweme/v1/sticker/music")
        0Gp<OV5> getStickerMusic(@PUw(LIZ = "sticker") String str);

        @JMA(LIZ = "/tiktok/v1/kids/music/collection/feed/")
        0Gp<OVB> musicCollectionFeed(@PUw(LIZ = "cursor") Integer num, @PUw(LIZ = "count") Integer num2);

        @JMA(LIZ = "/tiktok/v1/kids/music/list/")
        0Gp<OV5> musicList(@PUw(LIZ = "mc_id") String str, @PUw(LIZ = "cursor") int i, @PUw(LIZ = "count") int i2);

        @JMA(LIZ = "/tiktok/v1/kids/music/pick/")
        0Gp<C5416OUp> musicPick(@PUw(LIZ = "radio_cursor") Integer num, @PUw(LIZ = "extra_music_ids") String str, @PUw(LIZ = "is_commerce_music") Boolean bool);

        @JMA(LIZ = "/aweme/v1/music/detail/")
        JLr<C5312OQp> queryMusic(@PUw(LIZ = "music_id") String str, @PUw(LIZ = "click_reason") int i);

        @JMA(LIZ = "/tiktok/v1/kids/music/list/")
        0Gp<OV5> secondLevelMusicList(@PUw(LIZ = "mc_id") String str, @PUw(LIZ = "cursor") int i, @PUw(LIZ = "count") int i2, @PUw(LIZ = "level") int i3);

        @JMA(LIZ = "/tiktok/v1/kids/user/music/collect/")
        0Gp<CollectedMusicList> userCollectedMusicList(@PUw(LIZ = "cursor") int i, @PUw(LIZ = "count") int i2, @PUw(LIZ = "scene") String str);
    }

    static {
        Covode.recordClassIndex(89205);
    }

    public static 0Gp<CollectedMusicList> LIZ(int i) {
        return LIZ.userCollectedMusicList(i, 20, "");
    }

    public static 0Gp<2vM> LIZIZ(int i) {
        return LIZ.getMusicSheet(i, 20);
    }

    public static C5312OQp LIZ(String str) {
        API api = LIZ;
        if (str != null) {
            str = str.trim();
        }
        return (C5312OQp) api.queryMusic(str, 0).get();
    }

    public static 0Gp<C5416OUp> LIZ(Integer num, String str) {
        return LIZ.musicPick(num, str, false);
    }

    public static 0Gp<OV5> LIZIZ(String str, int i, int i2, int i3) {
        return LIZ.secondLevelMusicList(str, i, i2, i3);
    }

    public static 0Gp<OV5> LIZ(String str, int i, int i2, int i3) {
        if (i3 == 0) {
            return LIZ.musicList(str, i, i2);
        }
        return LIZIZ(str, i, i2, i3);
    }
}
