package com.ss.android.ugc.aweme.ecommerce.combinepayment.ordersubmit.view;

import X.0HH;
import X.CB6;
import X.CB7;
import X.CWH;
import X.KQj;
import X.Kek;
import X.KfG;
import X.KfK;
import X.KfT;
import X.Kh8;
import X.Kh9;
import X.M12;
import X.OQM;
import android.content.Context;
import android.net.Uri;
import android.os.Bundle;
import android.util.SparseArray;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageView;
import com.bytedance.covode.number.Covode;
import com.bytedance.frameworks.apm.trace.MethodCollector;
import com.bytedance.hybrid.spark.SparkContext;
import com.ss.android.ugc.aweme.bullet.api.IBulletService;
import com.ss.android.ugc.aweme.bullet.impl.BulletService;
import com.ss.android.ugc.aweme.ecommerce.common.view.CommerceBottomSheetDialogFragment;
import kotlin.h.b.n;

public final class OSPHybridBottomSheetDialogFragment extends CommerceBottomSheetDialogFragment {
    public final String LIZ;
    public final String LIZIZ;
    public SparseArray LIZJ;

    static {
        Covode.recordClassIndex(69027);
    }

    public final View LIZ(int i) {
        if (this.LIZJ == null) {
            this.LIZJ = new SparseArray();
        }
        View view = (View) this.LIZJ.get(i);
        if (view != null) {
            return view;
        }
        View view2 = getView();
        if (view2 == null) {
            return null;
        }
        View findViewById = view2.findViewById(i);
        this.LIZJ.put(i, findViewById);
        return findViewById;
    }

    public final void LIZJ() {
        SparseArray sparseArray = this.LIZJ;
        if (sparseArray != null) {
            sparseArray.clear();
        }
    }

    /* JADX WARNING: type inference failed for: r0v0, types: [com.ss.android.ugc.aweme.ecommerce.common.view.CommerceBottomSheetDialogFragment, com.ss.android.ugc.aweme.ecommerce.common.view.ECBaseBottomSheetDialogFragment, com.ss.android.ugc.aweme.ecommerce.combinepayment.ordersubmit.view.OSPHybridBottomSheetDialogFragment] */
    public final /* synthetic */ void onDestroyView() {
        OSPHybridBottomSheetDialogFragment.super.onDestroyView();
        LIZJ();
    }

    /* JADX INFO: super call moved to the top of the method (can break code semantics) */
    public OSPHybridBottomSheetDialogFragment(String str, String str2) {
        super((byte) 0);
        M12.LIZ(str, str2);
        this.LIZ = str;
        this.LIZIZ = str2;
    }

    /* JADX WARNING: type inference failed for: r7v0, types: [com.ss.android.ugc.aweme.ecommerce.common.view.ECBaseBottomSheetDialogFragment, androidx.fragment.app.Fragment, com.ss.android.ugc.aweme.ecommerce.combinepayment.ordersubmit.view.OSPHybridBottomSheetDialogFragment] */
    public final void onViewCreated(View view, Bundle bundle) {
        MethodCollector.i(3095);
        M12.LIZ(view);
        OSPHybridBottomSheetDialogFragment.super.onViewCreated(view, bundle);
        OQM LIZ2 = LIZ(2131371262);
        ImageView startBtn = LIZ2.getStartBtn();
        n.LIZIZ(startBtn, "");
        startBtn.setVisibility(8);
        LIZ2.setTitle(this.LIZ);
        LIZ2.setOnTitleBarClickListener(new CB6(this));
        if (CWH.LIZIZ.LIZ().LIZ) {
            Uri LIZ3 = CB7.LIZ(KQj.LIZ(this.LIZIZ), "aweme");
            LIZ(2131370506);
            Kh9 kh9 = Kh8.LJIIJJI;
            Context requireContext = requireContext();
            n.LIZIZ(requireContext, "");
            SparkContext sparkContext = new SparkContext();
            String uri = LIZ3.toString();
            n.LIZIZ(uri, "");
            sparkContext.LIZ(uri);
            Kek LIZIZ2 = kh9.LIZ(requireContext, sparkContext).LIZIZ();
            LIZIZ2.setLayoutParams(new FrameLayout.LayoutParams(-1, -1));
            ((FrameLayout) LIZ(2131370506)).addView(LIZIZ2);
            LIZIZ2.LIZ();
            MethodCollector.o(3095);
            return;
        }
        KfG LIZ4 = LIZ(2131363078);
        LIZ4.LIZ(BulletService.LIZJ().LIZ());
        IBulletService LIZJ2 = BulletService.LIZJ();
        Context requireContext2 = requireContext();
        n.LIZIZ(requireContext2, "");
        KfT.LIZ(LIZ4, LIZJ2.LIZ(requireContext2));
        KfT.LIZ(LIZ4, KQj.LIZ(this.LIZIZ), (Bundle) null, (KfK) null, 6);
        MethodCollector.o(3095);
    }

    public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        M12.LIZ(layoutInflater);
        if (CWH.LIZIZ.LIZ().LIZ) {
            return 0HH.LIZ(layoutInflater, 2131559092, viewGroup, false);
        }
        return 0HH.LIZ(layoutInflater, 2131559091, viewGroup, false);
    }
}
