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

import X.2GO;
import X.2HZ;
import X.3Mp;
import X.3Q4;
import X.3UU;
import X.3VC;
import X.4Fc;
import X.4kD;
import X.4tr;
import X.4uH;
import X.6iy;
import X.7AW;
import X.8gF;
import X.BGN;
import X.C0937Ia0;
import X.C0938Ia1;
import X.C1141IdI;
import X.C1172Idn;
import X.C1236Iep;
import X.C1347Igc;
import X.C1424Ihr;
import X.C1425Ihs;
import X.C1468IiZ;
import X.C1523IjS;
import X.C1537Ijg;
import X.C1789Ink;
import X.C1830IoP;
import X.C1833IoS;
import X.C1841Ioa;
import X.C1852Iol;
import X.C4175Jl8;
import X.C4190JlN;
import X.EdK;
import X.IA0;
import X.IBA;
import X.Lel;
import X.LsD;
import X.M12;
import X.Qeg;
import X.Rc9;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.bytedance.apm.agent.v2.instrumentation.ActivityAgent;
import com.bytedance.covode.number.Covode;
import com.bytedance.sysoptimizer.EnterTransitionCrashOptimizer;
import com.ss.android.ugc.aweme.im.sdk.relations.ui.activity.RelationSelectActivity;
import com.ss.android.ugc.aweme.im.service.model.IMUser;
import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import kotlin.h.b.n;
import org.greenrobot.eventbus.ThreadMode;

public final class FriendChatDetailActivity extends C1833IoS implements 2HZ, 2GO {
    public static final C1468IiZ LJIIIIZZ = new C1468IiZ((byte) 0);
    public IMUser LJI;
    public C1852Iol LJII;
    public RelativeLayout LJIIIZ;
    public EdK LJIIJ;
    public ImageView LJIIJJI;
    public TextView LJIIL;
    public TextView LJIILIIL;
    public Qeg LJIILJJIL;
    public Qeg LJIILL;
    public RelativeLayout LJIILLIIL;
    public ViewGroup LJIIZILJ;
    public boolean LJIJ;
    public boolean LJIJI;
    public HashMap LJIJJ;

    static {
        Covode.recordClassIndex(85397);
    }

    public final void _$_clearFindViewByIdCache() {
        HashMap hashMap = this.LJIJJ;
        if (hashMap != null) {
            hashMap.clear();
        }
    }

    public final View _$_findCachedViewById(int i) {
        if (this.LJIJJ == null) {
            this.LJIJJ = new HashMap();
        }
        View view = (View) this.LJIJJ.get(Integer.valueOf(i));
        if (view != null) {
            return view;
        }
        View findViewById = findViewById(i);
        this.LJIJJ.put(Integer.valueOf(i), findViewById);
        return findViewById;
    }

    public final Map<Integer, Object> getSubscriberEventTypes() {
        HashMap hashMap = new HashMap();
        hashMap.put(422, new Rc9(FriendChatDetailActivity.class, "onBlockUserSuccessEvent", C1523IjS.class, ThreadMode.MAIN, 0, false));
        return hashMap;
    }

    /* JADX WARNING: type inference failed for: r0v0, types: [com.ss.android.ugc.aweme.im.sdk.chatdetail.ui.activity.FriendChatDetailActivity, X.IoS, android.app.Activity] */
    public final void onDestroy() {
        8gF.LJ(this);
        super.onDestroy();
    }

    /* JADX WARNING: type inference failed for: r0v0, types: [com.ss.android.ugc.aweme.im.sdk.chatdetail.ui.activity.FriendChatDetailActivity, X.SNU, android.app.Activity] */
    public final void onPause() {
        8gF.LIZJ(this);
        FriendChatDetailActivity.super.onPause();
    }

    /* JADX WARNING: type inference failed for: r0v0, types: [com.ss.android.ugc.aweme.im.sdk.chatdetail.ui.activity.FriendChatDetailActivity, X.SNU, android.app.Activity] */
    public final void onStart() {
        8gF.LIZ(this);
        FriendChatDetailActivity.super.onStart();
    }

    public final void onWindowFocusChanged(boolean z) {
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.im.sdk.chatdetail.ui.activity.FriendChatDetailActivity", "onWindowFocusChanged", true);
        FriendChatDetailActivity.super.onWindowFocusChanged(z);
    }

    /* JADX WARNING: type inference failed for: r1v0, types: [com.ss.android.ugc.aweme.im.sdk.chatdetail.ui.activity.FriendChatDetailActivity, X.SNU, android.app.Activity] */
    public final void onStop() {
        8gF.LIZLLL(this);
        FriendChatDetailActivity.super.onStop();
        if (EnterTransitionCrashOptimizer.getContext() != null) {
            try {
                getWindow().getDecorView().getViewTreeObserver().dispatchOnPreDraw();
            } catch (Throwable unused) {
            }
        }
        try {
            getWindow().getDecorView().getViewTreeObserver().dispatchOnPreDraw();
        } catch (Throwable unused2) {
        }
    }

    public final void LIZLLL() {
        Serializable serializable;
        super.LIZLLL();
        Bundle LIZ = LIZ(getIntent());
        if (LIZ != null) {
            serializable = LIZ.getSerializable("simple_uesr");
        } else {
            serializable = null;
        }
        boolean z = true;
        if (LIZ == null || !(serializable instanceof IMUser)) {
            StringBuilder sb = new StringBuilder("initParams, containsExtra: ");
            if (LIZ == null) {
                z = false;
            }
            sb.append(z);
            sb.append(", containsUser: ");
            sb.append(serializable instanceof IMUser);
            3Q4.LIZLLL("FriendChatDetailActivity", sb.toString());
            finish();
            return;
        }
        IMUser iMUser = (IMUser) serializable;
        this.LJI = iMUser;
        if (iMUser == null) {
            n.LIZ("");
        }
        String uid = iMUser.getUid();
        if (!(uid == null || uid.length() == 0)) {
            try {
                this.LJFF = C0937Ia0.LIZ.LIZ(C0937Ia0.LIZ.LIZ(Long.parseLong(uid)));
            } catch (Exception unused) {
            }
        }
        this.LJIJ = LIZ.getBoolean("is_stranger", false);
        this.LJIJI = LIZ.getBoolean("is_author_supporter", false);
    }

    /* JADX WARNING: type inference failed for: r6v0, types: [com.ss.android.ugc.aweme.im.sdk.chatdetail.ui.activity.FriendChatDetailActivity, X.SNU, android.app.Activity] */
    public final void onResume() {
        8gF.LIZIZ(this);
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.im.sdk.chatdetail.ui.activity.FriendChatDetailActivity", "onResume", true);
        FriendChatDetailActivity.super.onResume();
        if (this.LJI != null) {
            IMUser iMUser = this.LJI;
            if (iMUser == null) {
                n.LIZ("");
            }
            if (!IMUser.isInvalidUser(iMUser.getUid())) {
                IMUser iMUser2 = this.LJI;
                if (iMUser2 == null) {
                    n.LIZ("");
                }
                String uid = iMUser2.getUid();
                IMUser iMUser3 = this.LJI;
                if (iMUser3 == null) {
                    n.LIZ("");
                }
                IBA.LIZ(uid, iMUser3.getSecUid(), false, (IA0) new C1830IoP(this));
            }
        }
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.im.sdk.chatdetail.ui.activity.FriendChatDetailActivity", "onResume", false);
    }

    /* JADX WARNING: type inference failed for: r1v2, types: [android.content.Context] */
    /* JADX WARNING: Multi-variable type inference failed */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final void LJFF() {
        /*
            r8 = this;
            super.LJFF()
            r0 = r8
            com.ss.android.ugc.aweme.im.service.model.IMUser r0 = r0.LJI
            if (r0 != 0) goto L_0x0029
            java.lang.StringBuilder r1 = new java.lang.StringBuilder
            java.lang.String r0 = "initEvents, mUser is not initialized, isFinishing: "
            r1.<init>(r0)
            boolean r0 = r8.isFinishing()
            r1.append(r0)
            java.lang.String r1 = r1.toString()
            java.lang.String r0 = "FriendChatDetailActivity"
            X.3Q4.LIZLLL(r0, r1)
            boolean r0 = r8.isFinishing()
            if (r0 != 0) goto L_0x0028
            r8.finish()
        L_0x0028:
            return
        L_0x0029:
            android.widget.RelativeLayout r0 = r8.LJIIIZ
            java.lang.String r7 = ""
            if (r0 != 0) goto L_0x0032
            kotlin.h.b.n.LIZ(r7)
        L_0x0032:
            r1 = r8
            r0.setOnClickListener(r1)
            X.EdK r0 = r8.LJIIJ
            if (r0 != 0) goto L_0x003d
            kotlin.h.b.n.LIZ(r7)
        L_0x003d:
            r0.setOnClickListener(r1)
            X.Qeg r0 = r8.LJIILJJIL
            if (r0 != 0) goto L_0x0047
            kotlin.h.b.n.LIZ(r7)
        L_0x0047:
            r0.setOnClickListener(r1)
            X.Qeg r0 = r8.LJIILL
            if (r0 != 0) goto L_0x0051
            kotlin.h.b.n.LIZ(r7)
        L_0x0051:
            r0.setOnClickListener(r1)
            android.view.ViewGroup r0 = r8.LJIIZILJ
            if (r0 != 0) goto L_0x005b
            kotlin.h.b.n.LIZ(r7)
        L_0x005b:
            r0.setOnClickListener(r1)
            X.Inm r2 = new X.Inm
            r2.<init>()
            r6 = 2
            android.view.View[] r1 = new android.view.View[r6]
            android.widget.RelativeLayout r0 = r8.LJIIIZ
            if (r0 != 0) goto L_0x006d
            kotlin.h.b.n.LIZ(r7)
        L_0x006d:
            r5 = 0
            r1[r5] = r0
            X.EdK r0 = r8.LJIIJ
            if (r0 != 0) goto L_0x0077
            kotlin.h.b.n.LIZ(r7)
        L_0x0077:
            r4 = 1
            r1[r4] = r0
            r2.LIZ(r1)
            r1 = r8
            r0 = 2131099762(0x7f060072, float:1.7811886E38)
            int r3 = X.070.LIZJ(r1, r0)
            r0 = 2131099657(0x7f060009, float:1.7811673E38)
            int r2 = X.070.LIZJ(r1, r0)
            android.view.View[] r1 = new android.view.View[r6]
            X.Qeg r0 = r8.LJIILJJIL
            if (r0 != 0) goto L_0x0095
            kotlin.h.b.n.LIZ(r7)
        L_0x0095:
            r1[r5] = r0
            X.Qeg r0 = r8.LJIILL
            if (r0 != 0) goto L_0x009e
            kotlin.h.b.n.LIZ(r7)
        L_0x009e:
            r1[r4] = r0
            X.C1805Io0.LIZ(r3, r2, r1)
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.im.sdk.chatdetail.ui.activity.FriendChatDetailActivity.LJFF():void");
    }

    public final void LJ() {
        super.LJ();
        if (this.LJI == null) {
            3Q4.LIZLLL("FriendChatDetailActivity", "initViews, mUser is not initialized, isFinishing: " + isFinishing());
            if (!isFinishing()) {
                finish();
                return;
            }
            return;
        }
        View findViewById = findViewById(2131362542);
        n.LIZIZ(findViewById, "");
        this.LJIIIZ = (RelativeLayout) findViewById;
        EdK findViewById2 = findViewById(2131362533);
        n.LIZIZ(findViewById2, "");
        this.LJIIJ = findViewById2;
        View findViewById3 = findViewById(2131372717);
        n.LIZIZ(findViewById3, "");
        this.LJIIJJI = (ImageView) findViewById3;
        View findViewById4 = findViewById(2131367890);
        n.LIZIZ(findViewById4, "");
        this.LJIIL = (TextView) findViewById4;
        View findViewById5 = findViewById(2131364052);
        n.LIZIZ(findViewById5, "");
        this.LJIILIIL = (TextView) findViewById5;
        Qeg findViewById6 = findViewById(2131369500);
        n.LIZIZ(findViewById6, "");
        this.LJIILL = findViewById6;
        View findViewById7 = findViewById(2131366825);
        n.LIZIZ(findViewById7, "");
        this.LJIIZILJ = (ViewGroup) findViewById7;
        View findViewById8 = findViewById(2131366888);
        View findViewById9 = findViewById(2131369495);
        View findViewById10 = findViewById(2131362745);
        View findViewById11 = findViewById(2131366949);
        View findViewById12 = findViewById(2131366923);
        View findViewById13 = findViewById(2131367709);
        int i = 8;
        if (C1141IdI.LIZ()) {
            View findViewById14 = findViewById(2131362747);
            n.LIZIZ(findViewById14, "");
            ((ViewGroup) findViewById14).setVisibility(8);
            View findViewById15 = findViewById(2131362748);
            n.LIZIZ(findViewById15, "");
            RelativeLayout relativeLayout = (RelativeLayout) findViewById15;
            this.LJIILLIIL = relativeLayout;
            if (relativeLayout == null) {
                n.LIZ("");
            }
            4Fc findViewById16 = relativeLayout.findViewById(2131362746);
            n.LIZIZ(findViewById16, "");
            LIZ(findViewById16);
            LIZ().setInterceptToggleListener(new C1789Ink(this));
        } else {
            View findViewById17 = findViewById(2131362747);
            n.LIZIZ(findViewById17, "");
            this.LJIILLIIL = (RelativeLayout) findViewById17;
            View findViewById18 = findViewById(2131362748);
            n.LIZIZ(findViewById18, "");
            ((ViewGroup) findViewById18).setVisibility(8);
        }
        RelativeLayout relativeLayout2 = this.LJIILLIIL;
        if (relativeLayout2 == null) {
            n.LIZ("");
        }
        Qeg findViewById19 = relativeLayout2.findViewById(2131362751);
        n.LIZIZ(findViewById19, "");
        this.LJIILJJIL = findViewById19;
        if (this.LJIJ) {
            n.LIZIZ(findViewById8, "");
            findViewById8.setVisibility(8);
            n.LIZIZ(findViewById11, "");
            findViewById11.setVisibility(8);
        }
        if (this.LJIJI) {
            n.LIZIZ(findViewById12, "");
            findViewById12.setVisibility(8);
            RelativeLayout relativeLayout3 = this.LJIILLIIL;
            if (relativeLayout3 == null) {
                n.LIZ("");
            }
            relativeLayout3.setVisibility(8);
            n.LIZIZ(findViewById13, "");
            findViewById13.setVisibility(8);
            TextView textView = this.LJIILIIL;
            if (textView == null) {
                n.LIZ("");
            }
            textView.setVisibility(8);
            EdK edK = this.LJIIJ;
            if (edK == null) {
                n.LIZ("");
            }
            edK.setEnabled(false);
            RelativeLayout relativeLayout4 = this.LJIIIZ;
            if (relativeLayout4 == null) {
                n.LIZ("");
            }
            relativeLayout4.setEnabled(false);
        }
        if (4kD.LIZ.LIZ()) {
            n.LIZIZ(findViewById8, "");
            findViewById8.setVisibility(8);
        }
        if (C1236Iep.LJFF() || C1141IdI.LIZ()) {
            Qeg qeg = this.LJIILL;
            if (qeg == null) {
                n.LIZ("");
            }
            qeg.setTextColorRes(2130968645);
            n.LIZIZ(findViewById9, "");
            findViewById9.setVisibility(8);
            Qeg qeg2 = this.LJIILJJIL;
            if (qeg2 == null) {
                n.LIZ("");
            }
            qeg2.setTextColorRes(2130968645);
            n.LIZIZ(findViewById10, "");
            findViewById10.setVisibility(8);
        }
        IMUser iMUser = this.LJI;
        if (iMUser == null) {
            n.LIZ("");
        }
        LIZIZ(iMUser);
        IMUser iMUser2 = this.LJI;
        if (iMUser2 == null) {
            n.LIZ("");
        }
        if (TextUtils.equals(iMUser2.getUid(), 3Mp.LIZIZ())) {
            RelativeLayout relativeLayout5 = this.LJIILLIIL;
            if (relativeLayout5 == null) {
                n.LIZ("");
            }
            relativeLayout5.setVisibility(8);
        }
        IMUser iMUser3 = this.LJI;
        if (iMUser3 == null) {
            n.LIZ("");
        }
        boolean isFriend = IMUser.isFriend(iMUser3.getFollowStatus());
        boolean LIZ = BGN.LIZ.LIZ();
        StringBuilder sb = new StringBuilder("Group chat support:");
        sb.append(LIZ);
        sb.append(",  IMUser is friend: ");
        sb.append(isFriend);
        sb.append(", isSelf: ");
        IMUser iMUser4 = this.LJI;
        if (iMUser4 == null) {
            n.LIZ("");
        }
        sb.append(IMUser.isSelf(iMUser4.getUid()));
        sb.append(' ');
        3Q4.LIZIZ("FriendChatDetailActivity", sb.toString());
        ViewGroup viewGroup = this.LJIIZILJ;
        if (viewGroup == null) {
            n.LIZ("");
        }
        if (LIZ) {
            3Q4.LIZIZ("FriendChatDetailActivity", "IMUser is friend ".concat(String.valueOf(isFriend)));
            if (isFriend) {
                i = 0;
            } else if (isFriend) {
                throw new 7AW();
            }
        } else if (LIZ) {
            throw new 7AW();
        }
        viewGroup.setVisibility(i);
    }

    public static Bundle LIZ(Intent intent) {
        try {
            return intent.getExtras();
        } catch (Exception unused) {
            return null;
        }
    }

    /* JADX WARNING: type inference failed for: r0v0, types: [android.app.Activity] */
    /* JADX WARNING: Multi-variable type inference failed */
    @X.C0741ISm(LIZ = org.greenrobot.eventbus.ThreadMode.MAIN)
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final void onBlockUserSuccessEvent(X.C1523IjS r3) {
        /*
            r2 = this;
            X.M12.LIZ(r3)
            X.3af r1 = new X.3af
            r0 = r2
            r1.<init>(r0)
            r0 = 2131825805(0x7f11148d, float:1.9284477E38)
            r1.LJ(r0)
            X.3af.LIZ(r1)
            X.Iol r0 = r2.LJII
            if (r0 == 0) goto L_0x0019
            r0.LIZ()
        L_0x0019:
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.im.sdk.chatdetail.ui.activity.FriendChatDetailActivity.onBlockUserSuccessEvent(X.IjS):void");
    }

    /* JADX WARNING: type inference failed for: r3v0, types: [com.ss.android.ugc.aweme.im.sdk.chatdetail.ui.activity.FriendChatDetailActivity, X.IoS, X.SNU, android.app.Activity] */
    public final void onCreate(Bundle bundle) {
        8gF.LIZ(this, bundle);
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.im.sdk.chatdetail.ui.activity.FriendChatDetailActivity", "onCreate", true);
        activityConfiguration(C1841Ioa.LIZ);
        super.onCreate(bundle);
        ActivityAgent.onTrace("com.ss.android.ugc.aweme.im.sdk.chatdetail.ui.activity.FriendChatDetailActivity", "onCreate", false);
    }

    public final void LIZ(IMUser iMUser) {
        this.LJI = iMUser;
        if (!C1141IdI.LIZ()) {
            if (iMUser.isBlock()) {
                Qeg qeg = this.LJIILJJIL;
                if (qeg == null) {
                    n.LIZ("");
                }
                qeg.setText(2131826018);
            } else {
                Qeg qeg2 = this.LJIILJJIL;
                if (qeg2 == null) {
                    n.LIZ("");
                }
                qeg2.setText(2131825802);
            }
        }
        LIZ().setChecked(iMUser.isBlock());
        IMUser iMUser2 = this.LJI;
        if (iMUser2 == null) {
            n.LIZ("");
        }
        LIZIZ(iMUser2);
    }

    /* JADX WARNING: type inference failed for: r4v0, types: [android.content.Context] */
    /* JADX WARNING: Multi-variable type inference failed */
    /* JADX WARNING: Removed duplicated region for block: B:12:0x003e  */
    /* JADX WARNING: Removed duplicated region for block: B:15:0x0051  */
    /* JADX WARNING: Removed duplicated region for block: B:18:0x005b  */
    /* JADX WARNING: Removed duplicated region for block: B:21:0x0069  */
    /* JADX WARNING: Removed duplicated region for block: B:24:0x0077  */
    /* JADX WARNING: Removed duplicated region for block: B:33:? A[RETURN, SYNTHETIC] */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    private final void LIZIZ(com.ss.android.ugc.aweme.im.service.model.IMUser r10) {
        /*
            r9 = this;
            com.ss.android.ugc.aweme.base.model.UrlModel r0 = r10.getAvatarThumb()
            java.lang.String r2 = ""
            if (r0 == 0) goto L_0x0084
            com.ss.android.ugc.aweme.base.model.UrlModel r0 = r10.getAvatarThumb()
            kotlin.h.b.n.LIZIZ(r0, r2)
            java.util.List r0 = r0.getUrlList()
            if (r0 == 0) goto L_0x0084
            com.ss.android.ugc.aweme.base.model.UrlModel r0 = r10.getAvatarThumb()
            kotlin.h.b.n.LIZIZ(r0, r2)
            java.util.List r0 = r0.getUrlList()
            int r0 = r0.size()
            if (r0 <= 0) goto L_0x0084
            X.EdK r3 = r9.LJIIJ
            if (r3 != 0) goto L_0x002d
            kotlin.h.b.n.LIZ(r2)
        L_0x002d:
            com.ss.android.ugc.aweme.base.model.UrlModel r4 = r10.getAvatarThumb()
            r6 = 0
            r7 = 0
            r8 = 120(0x78, float:1.68E-43)
            java.lang.String r5 = "FriendChatDetailActivity"
            X.C2548Izz.LIZ((X.OD6) r3, (com.ss.android.ugc.aweme.base.model.UrlModel) r4, (java.lang.String) r5, (X.J84) r6, (X.QCT) r7, (int) r8)
        L_0x003a:
            X.EdK r0 = r9.LJIIJ
            if (r0 != 0) goto L_0x0041
            kotlin.h.b.n.LIZ(r2)
        L_0x0041:
            X.T44.LIZ(r0, r10)
            r4 = r9
            java.lang.String r3 = r10.getCustomVerify()
            java.lang.String r1 = r10.getEnterpriseVerifyReason()
            android.widget.TextView r0 = r9.LJIIL
            if (r0 != 0) goto L_0x0054
            kotlin.h.b.n.LIZ(r2)
        L_0x0054:
            X.BTA.LIZ(r4, r3, r1, r0)
            android.widget.TextView r1 = r9.LJIIL
            if (r1 != 0) goto L_0x005e
            kotlin.h.b.n.LIZ(r2)
        L_0x005e:
            java.lang.String r0 = r10.getDisplayId()
            r9.LIZ(r1, r0)
            android.widget.TextView r1 = r9.LJIILIIL
            if (r1 != 0) goto L_0x006c
            kotlin.h.b.n.LIZ(r2)
        L_0x006c:
            java.lang.String r0 = r10.getDisplayName()
            r9.LIZ(r1, r0)
            boolean r0 = r9.LJIJI
            if (r0 == 0) goto L_0x0083
            android.widget.TextView r1 = r9.LJIILIIL
            if (r1 != 0) goto L_0x007e
            kotlin.h.b.n.LIZ(r2)
        L_0x007e:
            r0 = 8
            r1.setVisibility(r0)
        L_0x0083:
            return
        L_0x0084:
            X.EdK r1 = r9.LJIIJ
            if (r1 != 0) goto L_0x008b
            kotlin.h.b.n.LIZ(r2)
        L_0x008b:
            r0 = 2131232517(0x7f080705, float:1.8081145E38)
            X.OCa.LIZ(r1, r0)
            goto L_0x003a
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.im.sdk.chatdetail.ui.activity.FriendChatDetailActivity.LIZIZ(com.ss.android.ugc.aweme.im.service.model.IMUser):void");
    }

    /* JADX WARNING: type inference failed for: r1v1, types: [com.ss.android.ugc.aweme.im.sdk.chatdetail.ui.activity.FriendChatDetailActivity, X.IoS, android.app.Activity] */
    public final void onClick(View view) {
        String LIZIZ;
        String str;
        Long l;
        int i;
        C4190JlN LIZJ;
        ? r1 = this;
        View view2 = view;
        M12.LIZ(view2);
        super.onClick(view2);
        int id = view2.getId();
        String str2 = "";
        if (id == 2131362542 || id == 2131362533) {
            if (!r1.LJIJI || C1347Igc.LIZLLL()) {
                C0938Ia1 ia1 = C0938Ia1.LIZIZ;
                IMUser iMUser = r1.LJI;
                if (iMUser == null) {
                    n.LIZ(str2);
                }
                ia1.LIZIZ(iMUser.getUid());
                C1172Idn idn = C1172Idn.LIZ;
                IMUser iMUser2 = r1.LJI;
                if (iMUser2 == null) {
                    n.LIZ(str2);
                }
                idn.LIZ(iMUser2.getUid());
            }
        } else if (id == 2131362751) {
            C1852Iol iol = r1.LJII;
            if (iol != null) {
                iol.LIZ();
            }
        } else if (id == 2131369500) {
            C0937Ia0 ia0 = r1.LJFF;
            if (ia0 != null) {
                str = ia0.LIZIZ();
            } else {
                str = null;
            }
            C0937Ia0 ia02 = r1.LJFF;
            if (ia02 == null || (LIZJ = ia02.LIZJ()) == null) {
                l = null;
            } else {
                l = Long.valueOf(LIZJ.getConversationShortId());
            }
            IMUser iMUser3 = r1.LJI;
            if (iMUser3 == null) {
                n.LIZ(str2);
            }
            String uid = iMUser3.getUid();
            if (uid != null && uid.length() != 0 && str != null && str.length() != 0 && l != null && l.longValue() > 0) {
                if (r1.LJIJ) {
                    i = 1;
                } else {
                    IMUser iMUser4 = r1.LJI;
                    if (iMUser4 == null) {
                        n.LIZ(str2);
                    }
                    if (iMUser4.getCommerceUserLevel() > 0) {
                        i = 2;
                    } else {
                        i = 0;
                    }
                }
                String valueOf = String.valueOf(l.longValue());
                IMUser iMUser5 = r1.LJI;
                if (iMUser5 == null) {
                    n.LIZ(str2);
                }
                String uid2 = iMUser5.getUid();
                n.LIZIZ(uid2, str2);
                IMUser iMUser6 = r1.LJI;
                if (iMUser6 == null) {
                    n.LIZ(str2);
                }
                String contactName = iMUser6.getContactName();
                C1424Ihr ihr = C1424Ihr.LIZ;
                IMUser iMUser7 = r1.LJI;
                if (iMUser7 == null) {
                    n.LIZ(str2);
                }
                String LIZ = ihr.LIZ(iMUser7);
                IMUser iMUser8 = r1.LJI;
                if (iMUser8 == null) {
                    n.LIZ(str2);
                }
                C1424Ihr.LIZ.LIZ(new C1425Ihs(valueOf, uid2, str, LIZ, Boolean.valueOf(iMUser8.isBlock()), (C4175Jl8) null, "im", i, contactName, 96), (Activity) r1, "1");
                IMUser iMUser9 = r1.LJI;
                if (iMUser9 == null) {
                    n.LIZ(str2);
                }
                3UU.LIZ(iMUser9.getUid(), "click_share_button", (String) null, (LsD) null, 12);
            }
        } else if (id == 2131366825) {
            C1537Ijg ijg = RelationSelectActivity.LIZ;
            Bundle bundle = new Bundle();
            IMUser iMUser10 = r1.LJI;
            if (iMUser10 == null) {
                n.LIZ(str2);
            }
            List LIZ2 = 6iy.LIZ(iMUser10);
            Lel lel = Lel.INSTANCE;
            4uH r2 = 4uH.CREATE_GROUP;
            C0937Ia0 ia03 = r1.LJFF;
            if (!(ia03 == null || (LIZIZ = ia03.LIZIZ()) == null)) {
                str2 = LIZIZ;
            }
            bundle.putSerializable("member_select_config", new 4tr(LIZ2, lel, r2, str2));
            ijg.LIZ((Activity) r1, bundle, 12345);
            3VC r12 = 3VC.LJ;
            r12.LIZ("private_chat");
            r12.LIZ();
        }
    }

    private final void LIZ(TextView textView, String str) {
        if (!TextUtils.isEmpty(str)) {
            textView.setVisibility(0);
            textView.setText(str);
            return;
        }
        textView.setVisibility(4);
    }
}
