package com.ss.android.ugc.effectmanager.knadapt;

import X.9HM;
import X.M12;
import X.OC4;
import X.Q60;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.effectmanager.effect.listener.IFetchEffectListListener;
import com.ss.ugc.effectplatform.model.Effect;
import java.util.ArrayList;
import java.util.List;

public final class ListenerAdaptExtKt$toKNListener$3 implements OC4<List<? extends Effect>> {
    public final /* synthetic */ IFetchEffectListListener $oldListener;

    static {
        Covode.recordClassIndex(125562);
    }

    public ListenerAdaptExtKt$toKNListener$3(IFetchEffectListListener iFetchEffectListListener) {
        this.$oldListener = iFetchEffectListListener;
    }

    public final void onSuccess(List<? extends Effect> list) {
        M12.LIZ(list);
        IFetchEffectListListener iFetchEffectListListener = this.$oldListener;
        ArrayList arrayList = new ArrayList(9HM.LIZ(list, 10));
        for (Effect effect : list) {
            arrayList.add(new com.ss.android.ugc.effectmanager.effect.model.Effect(effect));
        }
        iFetchEffectListListener.onSuccess(arrayList);
    }

    public final void onFail(List<? extends Effect> list, Q60 q60) {
        M12.LIZ(q60);
        this.$oldListener.onFail(ListenerAdaptExtKt.toOldExceptionResult(q60));
    }
}
