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

import X.2Pr;
import X.C2863Q6y;
import X.LsC;
import X.M12;
import X.OC4;
import X.Q60;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.effectmanager.effect.listener.IFetchEffectChannelListener;
import com.ss.ugc.effectplatform.model.EffectChannelResponse;

public final class ListenerAdaptExtKt$toKNListener$2 implements OC4<EffectChannelResponse> {
    public final /* synthetic */ IFetchEffectChannelListener $oldListener;
    public final /* synthetic */ C2863Q6y $taskManager;

    static {
        Covode.recordClassIndex(125559);
    }

    public final void onSuccess(EffectChannelResponse effectChannelResponse) {
        M12.LIZ(effectChannelResponse);
        if (DataPreProcess.enable) {
            ListenerAdaptExtKt.preProcess(effectChannelResponse, this.$taskManager, (LsC<? super com.ss.android.ugc.effectmanager.effect.model.EffectChannelResponse, 2Pr>) new ListenerAdaptExtKt$toKNListener$2$onSuccess$1(this));
        } else {
            this.$oldListener.onSuccess(new com.ss.android.ugc.effectmanager.effect.model.EffectChannelResponse(effectChannelResponse));
        }
    }

    public ListenerAdaptExtKt$toKNListener$2(C2863Q6y q6y, IFetchEffectChannelListener iFetchEffectChannelListener) {
        this.$taskManager = q6y;
        this.$oldListener = iFetchEffectChannelListener;
    }

    public final void onFail(EffectChannelResponse effectChannelResponse, Q60 q60) {
        M12.LIZ(q60);
        this.$oldListener.onFail(ListenerAdaptExtKt.toOldExceptionResult(q60));
    }
}
