package com.ss.android.ugc.aweme.shoutouts.review;

import X.C4672Lnj;
import X.C4899LrO;
import X.C4914Lrd;
import X.M12;
import android.content.Context;
import android.view.ViewGroup;
import com.bytedance.covode.number.Covode;
import com.bytedance.frameworks.apm.trace.MethodCollector;
import com.bytedance.router.SmartRoute;
import com.bytedance.router.SmartRouter;
import com.ss.android.ugc.aweme.shoutouts.api.IShoutoutsReviewService;
import kotlin.h.b.n;

public final class ShoutoutsReviewService implements IShoutoutsReviewService {
    static {
        Covode.recordClassIndex(114289);
    }

    public static IShoutoutsReviewService LIZ() {
        MethodCollector.i(6977);
        IShoutoutsReviewService iShoutoutsReviewService = (IShoutoutsReviewService) C4672Lnj.LIZ(IShoutoutsReviewService.class, false);
        if (iShoutoutsReviewService != null) {
            MethodCollector.o(6977);
            return iShoutoutsReviewService;
        }
        Object LIZIZ = C4672Lnj.LIZIZ(IShoutoutsReviewService.class, false);
        if (LIZIZ != null) {
            IShoutoutsReviewService iShoutoutsReviewService2 = (IShoutoutsReviewService) LIZIZ;
            MethodCollector.o(6977);
            return iShoutoutsReviewService2;
        }
        if (C4672Lnj.bw == null) {
            synchronized (IShoutoutsReviewService.class) {
                try {
                    if (C4672Lnj.bw == null) {
                        C4672Lnj.bw = new ShoutoutsReviewService();
                    }
                } catch (Throwable th) {
                    MethodCollector.o(6977);
                    throw th;
                }
            }
        }
        ShoutoutsReviewService shoutoutsReviewService = (ShoutoutsReviewService) C4672Lnj.bw;
        MethodCollector.o(6977);
        return shoutoutsReviewService;
    }

    public final void LIZ(Context context, String str, Integer num, Float f, String str2) {
        M12.LIZ((Object) context);
        SmartRoute buildRoute = SmartRouter.buildRoute(context, "//shoutouts/detail");
        if (str != null) {
            buildRoute.withParam("description", str);
        }
        if (num != null) {
            buildRoute.withParam("coin", String.valueOf(num.intValue()));
        }
        if (f != null) {
            buildRoute.withParam("standardMoney", String.valueOf(f.floatValue()));
        }
        if (str2 != null) {
            buildRoute.withParam("currencyCharacter", str2);
        }
        buildRoute.withParam("enter_from", "tools_preview");
        buildRoute.open();
    }

    public final void LIZ(ViewGroup viewGroup, int i, float f, String str, String str2, C4914Lrd lrd) {
        MethodCollector.i(6781);
        String str3 = str;
        M12.LIZ((Object) viewGroup, (Object) str3);
        Context context = viewGroup.getContext();
        n.LIZIZ(context, "");
        C4899LrO lrO = new C4899LrO(context, (byte) 0);
        viewGroup.addView(lrO, new ViewGroup.LayoutParams(-1, -1));
        lrO.setDescription(str2);
        lrO.LIZ(i, (int) f, str3, 0.0f, 0, true, false);
        lrO.LIZ();
        lrO.setBottomSheetCallback(lrd);
        MethodCollector.o(6781);
    }
}
