package com.ss.android.ugc.aweme.social.widget.card.rec.cell;

import X.7he;
import X.AnS;
import X.BT2;
import X.BTG;
import X.C3075JKg;
import X.C3077JKi;
import X.C3080JKl;
import X.C3084JKp;
import X.C3085JKq;
import X.CE9;
import X.Crj;
import X.DaP;
import X.E3n;
import X.EdN;
import X.M12;
import X.Qeg;
import android.view.View;
import android.view.ViewGroup;
import com.bytedance.covode.number.Covode;
import com.bytedance.ies.powerlist.PowerCell;
import com.ss.android.ugc.aweme.profile.model.User;
import com.ss.android.ugc.aweme.social.widget.card.rec.vm.SelectedCardVM;
import java.util.Set;
import kotlin.h.b.n;

public final class RecUserSelectCell extends PowerCell<C3080JKl> {
    public CE9 LIZ;
    public EdN LIZIZ;
    public Qeg LJIIIZ;
    public Qeg LJIIJ;
    public BT2 LJIIJJI;
    public final Crj LJIIL = 7he.LIZ(new C3084JKp(this));

    static {
        Covode.recordClassIndex(114802);
    }

    public final SelectedCardVM LIZ() {
        return (SelectedCardVM) this.LJIIL.getValue();
    }

    public final int bB_() {
        return 2131561361;
    }

    public final void bE_() {
        RecUserSelectCell.super.bE_();
        SelectedCardVM LIZ2 = LIZ();
        C3080JKl jKl = this.LIZLLL;
        if (jKl == null) {
            n.LIZIZ();
        }
        C3080JKl jKl2 = jKl;
        M12.LIZ(jKl2);
        String uid = jKl2.LIZ.getUid();
        if (!LIZ2.LJIILJJIL.contains(uid)) {
            Set<String> set = LIZ2.LJIILJJIL;
            n.LIZIZ(uid, "");
            set.add(uid);
            AnS.LIZ.LIZ(jKl2.LIZ, LIZ2.LIZ, LIZ2.LIZIZ, E3n.SHOW, LIZ2.LIZJ);
        }
    }

    public static final /* synthetic */ CE9 LIZ(RecUserSelectCell recUserSelectCell) {
        CE9 ce9 = recUserSelectCell.LIZ;
        if (ce9 == null) {
            n.LIZ("");
        }
        return ce9;
    }

    public final View LIZ(ViewGroup viewGroup) {
        M12.LIZ(viewGroup);
        View LIZ2 = RecUserSelectCell.super.LIZ(viewGroup);
        EdN findViewById = LIZ2.findViewById(2131362514);
        n.LIZIZ(findViewById, "");
        this.LIZIZ = findViewById;
        Qeg findViewById2 = LIZ2.findViewById(2131368008);
        n.LIZIZ(findViewById2, "");
        this.LJIIIZ = findViewById2;
        Qeg findViewById3 = LIZ2.findViewById(2131369307);
        n.LIZIZ(findViewById3, "");
        this.LJIIJ = findViewById3;
        BT2 findViewById4 = LIZ2.findViewById(2131367858);
        n.LIZIZ(findViewById4, "");
        this.LJIIJJI = findViewById4;
        CE9 findViewById5 = LIZ2.findViewById(2131370026);
        n.LIZIZ(findViewById5, "");
        this.LIZ = findViewById5;
        return LIZ2;
    }

    public final /* synthetic */ void LIZ(DaP daP) {
        C3080JKl jKl = (C3080JKl) daP;
        M12.LIZ(jKl);
        RecUserSelectCell.super.LIZ(jKl);
        User user = jKl.LIZ;
        Qeg qeg = this.LJIIIZ;
        if (qeg == null) {
            n.LIZ("");
        }
        BTG.LIZ(user, qeg);
        EdN edN = this.LIZIZ;
        if (edN == null) {
            n.LIZ("");
        }
        BTG.LIZ(user, edN);
        Qeg qeg2 = this.LJIIJ;
        if (qeg2 == null) {
            n.LIZ("");
        }
        BT2 bt2 = this.LJIIJJI;
        if (bt2 == null) {
            n.LIZ("");
        }
        BTG.LIZ(user, qeg2, bt2);
        CE9 ce9 = this.LIZ;
        if (ce9 == null) {
            n.LIZ("");
        }
        ce9.setChecked(jKl.LIZIZ);
        EdN edN2 = this.LIZIZ;
        if (edN2 == null) {
            n.LIZ("");
        }
        edN2.setOnClickListener(new C3075JKg(this, jKl, user));
        this.itemView.setOnClickListener(new C3085JKq(this));
        CE9 ce92 = this.LIZ;
        if (ce92 == null) {
            n.LIZ("");
        }
        ce92.setOnCheckedChangeListener(new C3077JKi(this, jKl));
    }
}
