package com.ss.android.ugc.aweme.ecommerce.mall.preload;

import X.0HH;
import X.7iw;
import X.9h6;
import X.BiQ;
import X.C0316P6z;
import X.C0342P7z;
import X.LsC;
import X.M12;
import android.os.Bundle;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.app.api.Api;
import com.ss.android.ugc.aweme.ecommerce.mall.bean.MallMainRecommendResponse;
import com.ss.android.ugc.aweme.ecommerce.mall.repository.api.MallApiWithPreload;
import java.util.concurrent.Future;

public final class MallMainRecommendPreload implements C0342P7z<MallApiWithPreload, Future<MallMainRecommendResponse>> {
    public static final C0316P6z Companion = new C0316P6z((byte) 0);

    static {
        Covode.recordClassIndex(70430);
    }

    public final boolean enable(Bundle bundle) {
        return true;
    }

    public final boolean handleException(Exception exc) {
        M12.LIZ(exc);
        0HH.LIZ(exc);
        return true;
    }

    public final 9h6 getPreloadStrategy(Bundle bundle) {
        return new 9h6(30000, Api.LIZLLL, true);
    }

    public final Future<MallMainRecommendResponse> preload(Bundle bundle, LsC<? super Class<MallApiWithPreload>, ? extends MallApiWithPreload> lsC) {
        boolean z;
        M12.LIZ(lsC);
        7iw.LIZ.LIZ(3, "MallMainRecommendPreload preload");
        if (bundle != null) {
            z = bundle.getBoolean("is_prefetch");
        } else {
            z = true;
        }
        return ((MallApiWithPreload) lsC.invoke(MallApiWithPreload.class)).getMallMainRecommendPreload("https://oec-api.tiktokv.com/api/v1/shop/recommend/feed/preload", 10, "ttmall_homepage", true, 0, true, z, BiQ.LIZ.LIZ());
    }
}
