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

import X.0Gi;
import X.0Gp;
import X.Q39;
import com.bytedance.covode.number.Covode;
import kotlin.h.b.n;

public final class AlgorithmModelManager$fetchResourcesWithModelNames$3<TTaskResult, TContinuationResult> implements 0Gi<TResult, TContinuationResult> {
    public final /* synthetic */ FetchResourcesListener $listener;

    static {
        Covode.recordClassIndex(125189);
    }

    public AlgorithmModelManager$fetchResourcesWithModelNames$3(FetchResourcesListener fetchResourcesListener) {
        this.$listener = fetchResourcesListener;
    }

    public final Void then(0Gp<Void> r3) {
        n.LIZ(r3, Q39.LIZJ);
        if (r3.LIZJ()) {
            FetchResourcesListener fetchResourcesListener = this.$listener;
            if (fetchResourcesListener == null) {
                return null;
            }
            fetchResourcesListener.onFailed(r3.LJ());
            return null;
        }
        FetchResourcesListener fetchResourcesListener2 = this.$listener;
        if (fetchResourcesListener2 == null) {
            return null;
        }
        fetchResourcesListener2.onSuccess();
        return null;
    }
}
