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

import X.2b0;
import X.8qg;
import X.8qk;
import X.9EH;
import X.AnonymousClass9w1;
import X.IUt;
import X.JLr;
import X.JLw;
import X.JM9;
import X.PUt;
import X.PV0;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.app.api.Api;
import com.ss.android.ugc.aweme.music.model.MusicAwemeList;
import com.ss.android.ugc.aweme.music.model.OriginalMusicList;
import com.ss.android.ugc.aweme.music.model.PinnedMusicList;
import java.util.Map;

public final class MusicAwemeApi {
    public static final MusicService LIZ = ((MusicService) 2b0.LIZ(Api.LIZLLL, MusicService.class));
    public static final String LIZIZ = (Api.LIZLLL + "/aweme/v1/music/aweme/");
    public static final String LIZJ = (Api.LIZLLL + "/aweme/v1/music/fresh/aweme/");

    public interface MusicService {
        static {
            Covode.recordClassIndex(93477);
        }

        @8qk
        @JM9(LIZ = "/aweme/v1/music/create/")
        JLw<String> createMusic(@PV0 Map<String, String> map);

        @IUt(LIZ = "/aweme/v1/original/music/list/")
        JLr<OriginalMusicList> fetchOriginalMusicList(@PUt(LIZ = "user_id") String str, @PUt(LIZ = "sec_user_id") String str2, @PUt(LIZ = "cursor") int i, @PUt(LIZ = "count") int i2);

        @IUt(LIZ = "/tiktok/user/pinned_pgc_music/list/v1/")
        JLr<PinnedMusicList> getPinnedMusicList(@PUt(LIZ = "sec_user_id") String str);

        @IUt
        JLr<MusicAwemeList> queryMusicAwemeList(@8qg String str, @PUt(LIZ = "music_id") String str2, @PUt(LIZ = "cursor") long j, @PUt(LIZ = "count") int i, @PUt(LIZ = "type") int i2, @PUt(LIZ = "video_cover_shrink") String str3);

        @IUt(LIZ = "/tiktok/user/pgc_music/query/v1/")
        JLr<OriginalMusicList> searchMusicList(@PUt(LIZ = "sec_user_id") String str, @PUt(LIZ = "keyword") String str2, @PUt(LIZ = "cursor") int i, @PUt(LIZ = "count") int i2);
    }

    static {
        Covode.recordClassIndex(93476);
    }

    public static String LIZ() {
        int i;
        if (9EH.LJJIFFI.LIZ().getResources().getDisplayMetrics().density > 320.0f) {
            i = 201;
        } else {
            i = 200;
        }
        int[] LIZ2 = AnonymousClass9w1.LIZ(i);
        if (LIZ2 == null || LIZ2.length < 2) {
            return null;
        }
        return LIZ2[0] + "_" + LIZ2[1];
    }

    public static OriginalMusicList LIZ(String str, String str2, int i, int i2) {
        return (OriginalMusicList) LIZ.fetchOriginalMusicList(str, str2, i, i2).get();
    }
}
