package com.ss.android.ugc.effectmanager.effect.model.template;

import X.2HN;
import X.9HM;
import X.M12;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.effectmanager.effect.model.ProviderEffect;
import com.ss.ugc.effectplatform.model.ProviderEffectModel;
import java.util.ArrayList;
import java.util.List;

public class ProviderEffectModelTemplate extends ProviderEffectModel {
    public boolean hasMore;
    public final transient ProviderEffectModel kProviderEffect;
    public String searchTips;
    public List<ProviderEffect> stickerList;

    static {
        Covode.recordClassIndex(125441);
    }

    public ProviderEffectModelTemplate() {
        this((ProviderEffectModel) null, 1, (2HN) null);
    }

    public ProviderEffectModel getKProviderEffect() {
        return this.kProviderEffect;
    }

    public boolean hasMore() {
        return getHasMore();
    }

    public boolean getHasMore() {
        ProviderEffectModel kProviderEffect2 = getKProviderEffect();
        if (kProviderEffect2 != null) {
            return kProviderEffect2.getHas_more();
        }
        return super.getHas_more();
    }

    public String getSearchTips() {
        String search_tips;
        ProviderEffectModel kProviderEffect2 = getKProviderEffect();
        if (kProviderEffect2 == null || (search_tips = kProviderEffect2.getSearch_tips()) == null) {
            return super.getSearch_tips();
        }
        return search_tips;
    }

    public List<ProviderEffect> getStickerList() {
        List<com.ss.ugc.effectplatform.model.ProviderEffect> list;
        ProviderEffectModel kProviderEffect2 = getKProviderEffect();
        if (kProviderEffect2 == null || (list = kProviderEffect2.getSticker_list()) == null) {
            list = super.getSticker_list();
        }
        if (!(!list.isEmpty())) {
            return new ArrayList();
        }
        if (list.get(0) instanceof ProviderEffect) {
            return list;
        }
        ArrayList arrayList = new ArrayList(9HM.LIZ(list, 10));
        for (com.ss.ugc.effectplatform.model.ProviderEffect providerEffect : list) {
            arrayList.add(new ProviderEffect(providerEffect));
        }
        List<ProviderEffect> list2 = arrayList;
        if (kProviderEffect2 != null) {
            kProviderEffect2.setSticker_list(list2);
        }
        super.setSticker_list(list2);
        return list2;
    }

    public void setHasMore(boolean z) {
        this.hasMore = z;
        ProviderEffectModel kProviderEffect2 = getKProviderEffect();
        if (kProviderEffect2 != null) {
            kProviderEffect2.setHas_more(z);
        }
        super.setHas_more(z);
    }

    public void setSearchTips(String str) {
        this.searchTips = str;
        ProviderEffectModel kProviderEffect2 = getKProviderEffect();
        if (kProviderEffect2 != null) {
            kProviderEffect2.setSearch_tips(str);
        }
        super.setSearch_tips(str);
    }

    public ProviderEffectModelTemplate(ProviderEffectModel providerEffectModel) {
        super((String) null, 0, false, (List) null, (String) null, (String) null, (String) null, (Integer) null, (Integer) null, (List) null, (String) null, 2047, (2HN) null);
        this.kProviderEffect = providerEffectModel;
        this.stickerList = new ArrayList();
    }

    public void setStickerList(List<ProviderEffect> list) {
        M12.LIZ(list);
        this.stickerList = list;
        ProviderEffectModel kProviderEffect2 = getKProviderEffect();
        if (kProviderEffect2 != null) {
            kProviderEffect2.setSticker_list(list);
        }
        super.setSticker_list(list);
    }

    /* JADX INFO: this call moved to the top of the method (can break code semantics) */
    public /* synthetic */ ProviderEffectModelTemplate(ProviderEffectModel providerEffectModel, int i, 2HN r4) {
        this((i & 1) != 0 ? null : providerEffectModel);
    }
}
