package com.ss.android.ugc.aweme.im.sdk.chatdetail.ui.fragment;

import X.0HH;
import X.2Pr;
import X.7he;
import X.C2643J3q;
import X.Crj;
import X.FVh;
import X.LsC;
import X.M12;
import android.app.Activity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.bytedance.covode.number.Covode;
import com.bytedance.ies.foundation.fragment.BaseFragment;
import com.ss.android.ugc.aweme.im.sdk.chatdetail.ui.epoxy.ChooseAdminController;
import com.ss.android.ugc.aweme.im.service.model.IMUser;
import java.util.HashMap;
import java.util.List;
import kotlin.h.b.n;

public final class ChooseAdminDialog extends BaseFragment {
    public IMUser LJ;
    public final List<IMUser> LJFF;
    public final LsC<IMUser, 2Pr> LJI;
    public final Crj LJII = 7he.LIZ(new C2643J3q(this));
    public final Activity LJIIIIZZ;
    public HashMap LJIIIZ;

    static {
        Covode.recordClassIndex(85478);
    }

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

    public final ChooseAdminController LIZ() {
        return (ChooseAdminController) this.LJII.getValue();
    }

    public final void LJI() {
        HashMap hashMap = this.LJIIIZ;
        if (hashMap != null) {
            hashMap.clear();
        }
    }

    public final /* synthetic */ void onDestroyView() {
        ChooseAdminDialog.super.onDestroyView();
        LJI();
    }

    public final void onViewCreated(View view, Bundle bundle) {
        M12.LIZ(view);
        ChooseAdminDialog.super.onViewCreated(view, bundle);
        LIZ(2131363289).setOnClickListener(new FVh(this));
        LIZ(2131363292).setController(LIZ());
        RecyclerView LIZ = LIZ(2131363292);
        n.LIZIZ(LIZ, "");
        LIZ.setLayoutManager(new LinearLayoutManager(1, false));
        LIZ().setData(this.LJFF, this.LJ);
    }

    public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        M12.LIZ(layoutInflater);
        return 0HH.LIZ(layoutInflater, 2131559886, viewGroup, false);
    }

    public ChooseAdminDialog(Activity activity, List<? extends IMUser> list, LsC<? super IMUser, 2Pr> lsC) {
        M12.LIZ(activity, list, lsC);
        this.LJIIIIZZ = activity;
        this.LJFF = list;
        this.LJI = lsC;
    }
}
