小红书.apk(点击下载) / g.java


package z71;

import android.os.Bundle;
import android.view.MotionEvent;
import android.view.ViewGroup;
import co1.l0;
import com.meizu.cloud.pushsdk.notification.model.AdvanceSetting;
import com.xingin.android.redutils.base.XhsActivity;
import com.xingin.entities.x;
import com.xingin.matrix.detail.feed.R$id;
import com.xingin.matrix.followfeed.entities.NoteFeed;
import dw2.r;
import dw2.y;
import g61.i;
import h61.a;
import java.util.Objects;
import kotlin.Metadata;
import kotlin.Triple;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.FunctionReferenceImpl;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Lambda;
import t41.j;
import zh1.l;
import zh1.q;

@Metadata(bv = {}, d1 = {"\u0000²\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\t\u0018\u00002\u0014\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u0000\u0012\u0004\u0012\u00020\u00030\u0001B\u0007¢\u0006\u0004\bp\u0010qJ(\u0010\f\u001a\u00020\u000b2\f\u0010\u0006\u001a\b\u0012\u0004\u0012\u00020\u00050\u00042\u0006\u0010\b\u001a\u00020\u00072\b\u0010\n\u001a\u0004\u0018\u00010\tH\u0002J\b\u0010\r\u001a\u00020\u000bH\u0002J\u0018\u0010\u000f\u001a\u00020\u000b2\u0006\u0010\u000e\u001a\u00020\u00072\u0006\u0010\u0006\u001a\u00020\u0005H\u0002J\u0018\u0010\u0010\u001a\u00020\u000b2\u0006\u0010\u000e\u001a\u00020\u00072\u0006\u0010\u0006\u001a\u00020\u0005H\u0002J \u0010\u0013\u001a\u00020\u000b2\u0006\u0010\u000e\u001a\u00020\u00072\u0006\u0010\u0006\u001a\u00020\u00052\u0006\u0010\u0012\u001a\u00020\u0011H\u0002J \u0010\u0016\u001a\u00020\u000b2\u0006\u0010\u000e\u001a\u00020\u00072\u0006\u0010\u0006\u001a\u00020\u00052\u0006\u0010\u0015\u001a\u00020\u0014H\u0002J\b\u0010\u0017\u001a\u00020\u000bH\u0002J\b\u0010\u0018\u001a\u00020\u000bH\u0002J\u0012\u0010\u001b\u001a\u00020\u000b2\b\u0010\u001a\u001a\u0004\u0018\u00010\u0019H\u0014RB\u0010\u001e\u001a\"\u0012\u001e\u0012\u001c\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00050\u0004\u0012\u0004\u0012\u00020\u0007\u0012\u0006\u0012\u0004\u0018\u00010\t0\u001d0\u001c8\u0006@\u0006X‡.¢\u0006\u0012\n\u0004\b\u001e\u0010\u001f\u001a\u0004\b \u0010!\"\u0004\b\"\u0010#R(\u0010&\u001a\b\u0012\u0004\u0012\u00020%0$8\u0006@\u0006X‡.¢\u0006\u0012\n\u0004\b&\u0010'\u001a\u0004\b(\u0010)\"\u0004\b*\u0010+R\"\u0010-\u001a\u00020,8\u0006@\u0006X‡.¢\u0006\u0012\n\u0004\b-\u0010.\u001a\u0004\b/\u00100\"\u0004\b1\u00102R\"\u00104\u001a\u0002038\u0006@\u0006X‡.¢\u0006\u0012\n\u0004\b4\u00105\u001a\u0004\b6\u00107\"\u0004\b8\u00109R\"\u0010;\u001a\u00020:8\u0006@\u0006X‡.¢\u0006\u0012\n\u0004\b;\u0010<\u001a\u0004\b=\u0010>\"\u0004\b?\u0010@R\"\u0010B\u001a\u00020A8\u0006@\u0006X‡.¢\u0006\u0012\n\u0004\bB\u0010C\u001a\u0004\bD\u0010E\"\u0004\bF\u0010GR\"\u0010I\u001a\u00020H8\u0006@\u0006X‡.¢\u0006\u0012\n\u0004\bI\u0010J\u001a\u0004\bK\u0010L\"\u0004\bM\u0010NR\"\u0010P\u001a\u00020O8\u0006@\u0006X‡.¢\u0006\u0012\n\u0004\bP\u0010Q\u001a\u0004\bR\u0010S\"\u0004\bT\u0010UR\"\u0010W\u001a\u00020V8\u0006@\u0006X‡.¢\u0006\u0012\n\u0004\bW\u0010X\u001a\u0004\bY\u0010Z\"\u0004\b[\u0010\\R(\u0010_\u001a\b\u0012\u0004\u0012\u00020^0]8\u0006@\u0006X‡.¢\u0006\u0012\n\u0004\b_\u0010`\u001a\u0004\ba\u0010b\"\u0004\bc\u0010dR(\u0010f\u001a\b\u0012\u0004\u0012\u00020e0$8\u0006@\u0006X‡.¢\u0006\u0012\n\u0004\bf\u0010'\u001a\u0004\bg\u0010)\"\u0004\bh\u0010+R\"\u0010j\u001a\u00020i8\u0006@\u0006X‡.¢\u0006\u0012\n\u0004\bj\u0010k\u001a\u0004\bl\u0010m\"\u0004\bn\u0010o¨\u0006r"}, d2 = {"Lz71/g;", "Ltu0/b;", "Lz71/k;", "Lz71/i;", "Lkotlin/Function0;", "", "position", "Lcom/xingin/matrix/followfeed/entities/NoteFeed;", "data", "", "payloads", "", "o1", "k1", "note", "p1", "r1", "Landroid/view/MotionEvent;", "event", "q1", "", "isDouble", "m1", "l1", "t1", "Landroid/os/Bundle;", "savedInstanceState", "onAttach", "Ldw2/r;", "Lkotlin/Triple;", "updateDateObservable", "Ldw2/r;", "getUpdateDateObservable", "()Ldw2/r;", "setUpdateDateObservable", "(Ldw2/r;)V", "Ldx2/g;", "Ll81/a;", "clickEventsObservable", "Ldx2/g;", "Z0", "()Ldx2/g;", "setClickEventsObservable", "(Ldx2/g;)V", "Lrx1/a;", "relatedDataImpl", "Lrx1/a;", "h1", "()Lrx1/a;", "setRelatedDataImpl", "(Lrx1/a;)V", "Lk61/b;", "pageIntentImpl", "Lk61/b;", "f1", "()Lk61/b;", "setPageIntentImpl", "(Lk61/b;)V", "Lob1/b;", "dataHelper", "Lob1/b;", "a1", "()Lob1/b;", "setDataHelper", "(Lob1/b;)V", "Lg61/i;", "guideManager", "Lg61/i;", "b1", "()Lg61/i;", "setGuideManager", "(Lg61/i;)V", "Lcom/xingin/android/redutils/base/XhsActivity;", "activity", "Lcom/xingin/android/redutils/base/XhsActivity;", "getActivity", "()Lcom/xingin/android/redutils/base/XhsActivity;", "setActivity", "(Lcom/xingin/android/redutils/base/XhsActivity;)V", "Loa1/d;", "screenOrientationListener", "Loa1/d;", "i1", "()Loa1/d;", "setScreenOrientationListener", "(Loa1/d;)V", "Lib1/d;", "timelyRecInterfaceParamHelper", "Lib1/d;", "j1", "()Lib1/d;", "setTimelyRecInterfaceParamHelper", "(Lib1/d;)V", "Ldw2/y;", "Lqx1/g;", "pageEventsObserver", "Ldw2/y;", "e1", "()Ldw2/y;", "setPageEventsObserver", "(Ldw2/y;)V", "Ll71/c;", "mEngageSubject", "c1", "setMEngageSubject", "Lwi1/g;", "noteActionReportInterface", "Lwi1/g;", "d1", "()Lwi1/g;", "setNoteActionReportInterface", "(Lwi1/g;)V", "<init>", "()V", "matrix_detail_feed_library_release"}, k = 1, mv = {1, 6, 0})
/* compiled from: DetailFeedLikeBtnController.kt */
public final class g extends tu0.b<k, g, i> {

    /* renamed from: a  reason: collision with root package name */
    public Function0<Integer> f160900a = h.f160930a;

    /* renamed from: b  reason: collision with root package name */
    public NoteFeed f160901b = new NoteFeed(null, null, null, null, null, null, 0, null, null, null, null, null, false, null, null, null, null, null, false, false, 0, null, 0, 0, 0, 0, false, false, null, null, 0, null, null, null, null, false, null, false, null, null, 0.0f, null, null, null, null, false, false, 0, null, null, false, null, false, null, null, null, null, null, null, 0, null, null, null, null, null, null, false, 0, null, false, null, false, null, null, null, null, null, false, false, 0, null, null, null, null, null, null, null, null, null, null, null, null, false, false, null, -1, -1, Integer.MAX_VALUE, null);

    /* renamed from: c  reason: collision with root package name */
    public r<Triple<Function0<Integer>, NoteFeed, Object>> f160902c;

    /* renamed from: d  reason: collision with root package name */
    public dx2.g<l81.a> f160903d;

    /* renamed from: e  reason: collision with root package name */
    public rx1.a f160904e;

    /* renamed from: f  reason: collision with root package name */
    public k61.b f160905f;

    /* renamed from: g  reason: collision with root package name */
    public ob1.b f160906g;

    /* renamed from: h  reason: collision with root package name */
    public i f160907h;

    /* renamed from: i  reason: collision with root package name */
    public XhsActivity f160908i;

    /* renamed from: j  reason: collision with root package name */
    public oa1.d f160909j;

    /* renamed from: k  reason: collision with root package name */
    public ib1.d f160910k;

    /* renamed from: l  reason: collision with root package name */
    public y<qx1.g> f160911l;

    /* renamed from: m  reason: collision with root package name */
    public dx2.g<l71.c> f160912m;

    /* renamed from: n  reason: collision with root package name */
    public wi1.g f160913n;

    @Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 6, 0}, xi = 48)
    /* compiled from: DetailFeedLikeBtnController.kt */
    public static final class a extends Lambda implements Function0<Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ NoteFeed f160914a;

        /* renamed from: b  reason: collision with root package name */
        public final /* synthetic */ g f160915b;

        /* renamed from: c  reason: collision with root package name */
        public final /* synthetic */ int f160916c;

        /* renamed from: d  reason: collision with root package name */
        public final /* synthetic */ boolean f160917d;

        @Metadata(bv = {}, d1 = {"\u0000\u000e\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0001\u001a\u00020\u0000H\n¢\u0006\u0004\b\u0003\u0010\u0004"}, d2 = {"Lcom/xingin/entities/x;", AdvanceSetting.NETWORK_TYPE, "", "a", "(Lcom/xingin/entities/x;)V"}, k = 3, mv = {1, 6, 0})
        /* renamed from: z71.g$a$a  reason: collision with other inner class name */
        /* compiled from: DetailFeedLikeBtnController.kt */
        public static final class C2614a extends Lambda implements Function1<x, Unit> {

            /* renamed from: a  reason: collision with root package name */
            public final /* synthetic */ NoteFeed f160918a;

            /* renamed from: b  reason: collision with root package name */
            public final /* synthetic */ g f160919b;

            /* renamed from: c  reason: collision with root package name */
            public final /* synthetic */ int f160920c;

            /* renamed from: d  reason: collision with root package name */
            public final /* synthetic */ boolean f160921d;

            /* JADX INFO: super call moved to the top of the method (can break code semantics) */
            public C2614a(NoteFeed noteFeed, g gVar, int i10, boolean z14) {
                super(1);
                this.f160918a = noteFeed;
                this.f160919b = gVar;
                this.f160920c = i10;
                this.f160921d = z14;
            }

            public final void a(x xVar) {
                Intrinsics.checkNotNullParameter(xVar, AdvanceSetting.NETWORK_TYPE);
                if (z41.e.f160472a.b(this.f160918a)) {
                    mb1.i.f105119a.E(this.f160919b.a1(), this.f160918a, this.f160920c, true, this.f160921d, this.f160919b.b1().a());
                } else {
                    l.f162075a.R(this.f160918a, this.f160919b.a1(), new l0(true, false, false), this.f160919b.b1().a(), ((Number) this.f160919b.f160900a.invoke()).intValue(), new q(this.f160919b.f1().u(), this.f160919b.f1().m()));
                }
                ej2.a.f72257b.a(new om1.b(this.f160919b.f1().l(), this.f160919b.f1().x(), true));
                this.f160919b.d1().d(this.f160918a.getId(), wi1.c.LIKE);
            }

            /* Return type fixed from 'java.lang.Object' to match base method */
            /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
            @Override // kotlin.jvm.functions.Function1
            public /* bridge */ /* synthetic */ Unit invoke(x xVar) {
                a(xVar);
                return Unit.INSTANCE;
            }
        }

        @Metadata(d1 = {"\u0000\u000e\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u0003\n\u0000\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\n¢\u0006\u0002\b\u0004"}, d2 = {"<anonymous>", "", AdvanceSetting.NETWORK_TYPE, "", "invoke"}, k = 3, mv = {1, 6, 0}, xi = 48)
        /* compiled from: DetailFeedLikeBtnController.kt */
        public static final class b extends Lambda implements Function1<Throwable, Unit> {

            /* renamed from: a  reason: collision with root package name */
            public final /* synthetic */ g f160922a;

            /* JADX INFO: super call moved to the top of the method (can break code semantics) */
            public b(g gVar) {
                super(1);
                this.f160922a = gVar;
            }

            /* Return type fixed from 'java.lang.Object' to match base method */
            /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
            @Override // kotlin.jvm.functions.Function1
            public /* bridge */ /* synthetic */ Unit invoke(Throwable th3) {
                invoke(th3);
                return Unit.INSTANCE;
            }

            public final void invoke(Throwable th3) {
                Intrinsics.checkNotNullParameter(th3, AdvanceSetting.NETWORK_TYPE);
                this.f160922a.l1();
                z41.l.e(th3);
            }
        }

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public a(NoteFeed noteFeed, g gVar, int i10, boolean z14) {
            super(0);
            this.f160914a = noteFeed;
            this.f160915b = gVar;
            this.f160916c = i10;
            this.f160917d = z14;
        }

        @Override // kotlin.jvm.functions.Function0
        public final void invoke() {
            boolean z14;
            if (!this.f160914a.getLiked()) {
                this.f160915b.f160901b.setLiked(true);
                NoteFeed noteFeed = this.f160915b.f160901b;
                noteFeed.setLikedCount(noteFeed.getLikedCount() + 1);
                ((k) this.f160915b.getPresenter()).e(this.f160915b.f160901b, true);
                ib1.d j14 = this.f160915b.j1();
                String id3 = this.f160914a.getId();
                y<qx1.g> e14 = this.f160915b.e1();
                int intValue = ((Number) this.f160915b.f160900a.invoke()).intValue();
                boolean areEqual = Intrinsics.areEqual(ib1.e.b(), id3);
                Integer a14 = ib1.e.a(a.c.TYPE_UI_BUSINESS_LIKE);
                if (a14 != null) {
                    j14.l(id3, a14.intValue());
                    Unit unit = Unit.INSTANCE;
                    z41.l.b("TimelyRecInterfaceParamHelper", " canRequestInstantRecommend:" + unit);
                }
                Integer a15 = ib1.e.a(a.c.TYPE_UI_BUSINESS_LIKE);
                if ((a15 != null && a15.intValue() == 0) || ((a15 != null && a15.intValue() == 1) || ((a15 != null && a15.intValue() == 2) || ((a15 != null && a15.intValue() == 3) || ((a15 != null && a15.intValue() == 4) || (a15 != null && a15.intValue() == 7)))))) {
                    z14 = true;
                } else {
                    z14 = false;
                }
                if (!areEqual && z14) {
                    ib1.e.c(id3);
                    e14.a(new qx1.g(qx1.f.ENGAGE_INSTANT_RECOMMEND_V3, null, Integer.valueOf(intValue), null, 10, null));
                }
                if (z41.e.f160472a.b(this.f160914a)) {
                    mb1.i.f105119a.D(this.f160915b.a1(), this.f160914a, this.f160916c, true, this.f160917d, this.f160915b.b1().a());
                } else {
                    l lVar = l.f162075a;
                    NoteFeed noteFeed2 = this.f160914a;
                    ob1.b a16 = this.f160915b.a1();
                    boolean z15 = this.f160917d;
                    l.U(lVar, noteFeed2, a16, new l0(true, z15, z15), false, ((Number) this.f160915b.f160900a.invoke()).intValue(), new q(this.f160915b.f1().u(), this.f160915b.f1().m()), 8, null);
                }
                r<x> f14 = new iy1.i().f(this.f160914a.getId());
                g gVar = this.f160915b;
                bj2.h.f(f14, gVar, new C2614a(this.f160914a, gVar, this.f160916c, this.f160917d), new b(this.f160915b));
            }
        }
    }

    @Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 6, 0}, xi = 48)
    /* compiled from: DetailFeedLikeBtnController.kt */
    public static final class b extends Lambda implements Function0<Unit> {

        /* renamed from: a  reason: collision with root package name */
        public static final b f160923a = new b();

        public b() {
            super(0);
        }

        @Override // kotlin.jvm.functions.Function0
        public final void invoke() {
        }
    }

    @Metadata(d1 = {"\u0000\u001e\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\b\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\u0010\u0000\u001a\u00020\u00012 \u0010\u0002\u001a\u001c\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00050\u0004\u0012\u0004\u0012\u00020\u0006\u0012\u0006\u0012\u0004\u0018\u00010\u00070\u0003H\n¢\u0006\u0002\b\b"}, d2 = {"<anonymous>", "", AdvanceSetting.NETWORK_TYPE, "Lkotlin/Triple;", "Lkotlin/Function0;", "", "Lcom/xingin/matrix/followfeed/entities/NoteFeed;", "", "invoke"}, k = 3, mv = {1, 6, 0}, xi = 48)
    /* compiled from: DetailFeedLikeBtnController.kt */
    public static final class c extends Lambda implements Function1<Triple<? extends Function0<? extends Integer>, ? extends NoteFeed, ? extends Object>, Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ g f160924a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public c(g gVar) {
            super(1);
            this.f160924a = gVar;
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
        @Override // kotlin.jvm.functions.Function1
        public /* bridge */ /* synthetic */ Unit invoke(Triple<? extends Function0<? extends Integer>, ? extends NoteFeed, ? extends Object> triple) {
            invoke((Triple<? extends Function0<Integer>, NoteFeed, ? extends Object>) triple);
            return Unit.INSTANCE;
        }

        public final void invoke(Triple<? extends Function0<Integer>, NoteFeed, ? extends Object> triple) {
            Intrinsics.checkNotNullParameter(triple, AdvanceSetting.NETWORK_TYPE);
            this.f160924a.o1((Function0) triple.getFirst(), triple.getSecond(), triple.getThird());
        }
    }

    @Metadata(bv = {}, d1 = {"\u0000\u0010\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0004\u001a\u00020\u00032\u000e\u0010\u0002\u001a\n \u0001*\u0004\u0018\u00010\u00000\u0000H\n¢\u0006\u0004\b\u0004\u0010\u0005"}, d2 = {"Ll81/a;", "kotlin.jvm.PlatformType", AdvanceSetting.NETWORK_TYPE, "", "a", "(Ll81/a;)V"}, k = 3, mv = {1, 6, 0})
    /* compiled from: DetailFeedLikeBtnController.kt */
    public static final class d extends Lambda implements Function1<l81.a, Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ g f160925a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public d(g gVar) {
            super(1);
            this.f160925a = gVar;
        }

        public final void a(l81.a aVar) {
            g gVar = this.f160925a;
            NoteFeed noteFeed = gVar.f160901b;
            int intValue = ((Number) this.f160925a.f160900a.invoke()).intValue();
            Object value = aVar.getValue();
            Objects.requireNonNull(value, "null cannot be cast to non-null type android.view.MotionEvent");
            gVar.q1(noteFeed, intValue, (MotionEvent) value);
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
        @Override // kotlin.jvm.functions.Function1
        public /* bridge */ /* synthetic */ Unit invoke(l81.a aVar) {
            a(aVar);
            return Unit.INSTANCE;
        }
    }

    @Metadata(k = 3, mv = {1, 6, 0}, xi = 48)
    /* compiled from: DetailFeedLikeBtnController.kt */
    public /* synthetic */ class e extends FunctionReferenceImpl implements Function0<Unit> {
        public e(Object obj) {
            super(0, obj, g.class, "likeClick", "likeClick()V", 0);
        }

        @Override // kotlin.jvm.functions.Function0
        public final void invoke() {
            ((g) this.receiver).k1();
        }
    }

    @Metadata(bv = {}, d1 = {"\u0000\u000e\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0001\u001a\u00020\u0000H\n¢\u0006\u0004\b\u0003\u0010\u0004"}, d2 = {"Lcom/xingin/entities/x;", AdvanceSetting.NETWORK_TYPE, "", "a", "(Lcom/xingin/entities/x;)V"}, k = 3, mv = {1, 6, 0})
    /* compiled from: DetailFeedLikeBtnController.kt */
    public static final class f extends Lambda implements Function1<x, Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ NoteFeed f160926a;

        /* renamed from: b  reason: collision with root package name */
        public final /* synthetic */ g f160927b;

        /* renamed from: c  reason: collision with root package name */
        public final /* synthetic */ int f160928c;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public f(NoteFeed noteFeed, g gVar, int i10) {
            super(1);
            this.f160926a = noteFeed;
            this.f160927b = gVar;
            this.f160928c = i10;
        }

        public final void a(x xVar) {
            Intrinsics.checkNotNullParameter(xVar, AdvanceSetting.NETWORK_TYPE);
            if (z41.e.f160472a.b(this.f160926a)) {
                mb1.i.f105119a.E(this.f160927b.a1(), this.f160926a, this.f160928c, false, false, this.f160927b.b1().a());
            } else {
                l.S(l.f162075a, this.f160926a, this.f160927b.a1(), new l0(false, false, false), false, ((Number) this.f160927b.f160900a.invoke()).intValue(), new q(this.f160927b.f1().u(), this.f160927b.f1().m()), 8, null);
            }
            ej2.a.f72257b.a(new om1.b(this.f160927b.f1().l(), this.f160927b.f1().x(), false));
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
        @Override // kotlin.jvm.functions.Function1
        public /* bridge */ /* synthetic */ Unit invoke(x xVar) {
            a(xVar);
            return Unit.INSTANCE;
        }
    }

    @Metadata(d1 = {"\u0000\u000e\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u0003\n\u0000\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\n¢\u0006\u0002\b\u0004"}, d2 = {"<anonymous>", "", AdvanceSetting.NETWORK_TYPE, "", "invoke"}, k = 3, mv = {1, 6, 0}, xi = 48)
    /* renamed from: z71.g$g  reason: collision with other inner class name */
    /* compiled from: DetailFeedLikeBtnController.kt */
    public static final class C2615g extends Lambda implements Function1<Throwable, Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ g f160929a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public C2615g(g gVar) {
            super(1);
            this.f160929a = gVar;
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
        @Override // kotlin.jvm.functions.Function1
        public /* bridge */ /* synthetic */ Unit invoke(Throwable th3) {
            invoke(th3);
            return Unit.INSTANCE;
        }

        public final void invoke(Throwable th3) {
            Intrinsics.checkNotNullParameter(th3, AdvanceSetting.NETWORK_TYPE);
            this.f160929a.t1();
            z41.l.e(th3);
        }
    }

    @Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0004\b\u0002\u0010\u0003"}, d2 = {"<anonymous>", "", "invoke", "()Ljava/lang/Integer;"}, k = 3, mv = {1, 6, 0}, xi = 48)
    /* compiled from: DetailFeedLikeBtnController.kt */
    public static final class h extends Lambda implements Function0<Integer> {

        /* renamed from: a  reason: collision with root package name */
        public static final h f160930a = new h();

        public h() {
            super(0);
        }

        @Override // kotlin.jvm.functions.Function0
        public final Integer invoke() {
            return -1;
        }
    }

    public static final boolean n1(l81.a aVar) {
        Intrinsics.checkNotNullParameter(aVar, AdvanceSetting.NETWORK_TYPE);
        return aVar == l81.a.MULTI_CLICK;
    }

    public final dx2.g<l81.a> Z0() {
        dx2.g<l81.a> gVar = this.f160903d;
        if (gVar != null) {
            return gVar;
        }
        Intrinsics.throwUninitializedPropertyAccessException("clickEventsObservable");
        return null;
    }

    public final ob1.b a1() {
        ob1.b bVar = this.f160906g;
        if (bVar != null) {
            return bVar;
        }
        Intrinsics.throwUninitializedPropertyAccessException("dataHelper");
        return null;
    }

    public final i b1() {
        i iVar = this.f160907h;
        if (iVar != null) {
            return iVar;
        }
        Intrinsics.throwUninitializedPropertyAccessException("guideManager");
        return null;
    }

    public final dx2.g<l71.c> c1() {
        dx2.g<l71.c> gVar = this.f160912m;
        if (gVar != null) {
            return gVar;
        }
        Intrinsics.throwUninitializedPropertyAccessException("mEngageSubject");
        return null;
    }

    public final wi1.g d1() {
        wi1.g gVar = this.f160913n;
        if (gVar != null) {
            return gVar;
        }
        Intrinsics.throwUninitializedPropertyAccessException("noteActionReportInterface");
        return null;
    }

    public final y<qx1.g> e1() {
        y<qx1.g> yVar = this.f160911l;
        if (yVar != null) {
            return yVar;
        }
        Intrinsics.throwUninitializedPropertyAccessException("pageEventsObserver");
        return null;
    }

    public final k61.b f1() {
        k61.b bVar = this.f160905f;
        if (bVar != null) {
            return bVar;
        }
        Intrinsics.throwUninitializedPropertyAccessException("pageIntentImpl");
        return null;
    }

    public final XhsActivity getActivity() {
        XhsActivity xhsActivity = this.f160908i;
        if (xhsActivity != null) {
            return xhsActivity;
        }
        Intrinsics.throwUninitializedPropertyAccessException("activity");
        return null;
    }

    public final r<Triple<Function0<Integer>, NoteFeed, Object>> getUpdateDateObservable() {
        r<Triple<Function0<Integer>, NoteFeed, Object>> rVar = this.f160902c;
        if (rVar != null) {
            return rVar;
        }
        Intrinsics.throwUninitializedPropertyAccessException("updateDateObservable");
        return null;
    }

    public final rx1.a h1() {
        rx1.a aVar = this.f160904e;
        if (aVar != null) {
            return aVar;
        }
        Intrinsics.throwUninitializedPropertyAccessException("relatedDataImpl");
        return null;
    }

    public final oa1.d i1() {
        oa1.d dVar = this.f160909j;
        if (dVar != null) {
            return dVar;
        }
        Intrinsics.throwUninitializedPropertyAccessException("screenOrientationListener");
        return null;
    }

    public final ib1.d j1() {
        ib1.d dVar = this.f160910k;
        if (dVar != null) {
            return dVar;
        }
        Intrinsics.throwUninitializedPropertyAccessException("timelyRecInterfaceParamHelper");
        return null;
    }

    public final void k1() {
        if (this.f160901b.getLiked()) {
            r1(this.f160901b, this.f160900a.invoke().intValue());
        } else {
            p1(this.f160901b, this.f160900a.invoke().intValue());
        }
        c1().a(new l71.d(this.f160901b.getId()));
        qb1.r.f121073a.g(this.f160901b.getId(), f1());
    }

    public final void l1() {
        this.f160901b.setLiked(false);
        NoteFeed noteFeed = this.f160901b;
        noteFeed.setLikedCount(noteFeed.getLikedCount() - 1);
        ((k) getPresenter()).e(this.f160901b, false);
    }

    public final void m1(NoteFeed noteFeed, int i10, boolean z14) {
        b51.b.c(getActivity(), 1, new a(noteFeed, this, i10, z14), b.f160923a);
    }

    public final void o1(Function0<Integer> function0, NoteFeed noteFeed, Object obj) {
        boolean z14;
        this.f160901b = noteFeed;
        this.f160900a = function0;
        boolean z15 = false;
        if (obj == null || obj == l61.a.WITHOUT_VIDEO) {
            z14 = true;
        } else {
            z14 = false;
        }
        if (z14 || obj == l61.a.ORIENTATION_PORTRAIT_V2) {
            z15 = true;
        }
        if (z15) {
            i iVar = (i) getLinker();
            if (iVar != null) {
                iVar.a();
            }
            ((k) getPresenter()).d(noteFeed);
        }
    }

    @Override // tu0.b
    public void onAttach(Bundle bundle) {
        super.onAttach(bundle);
        bj2.h.d(getUpdateDateObservable(), this, new c(this));
        r<l81.a> u04 = Z0().u0(f.f160899a);
        Intrinsics.checkNotNullExpressionValue(u04, "clickEventsObservable.fi…= ClickType.MULTI_CLICK }");
        bj2.h.d(u04, this, new d(this));
        bj2.h.e(((k) getPresenter()).h(), this, new e(this));
    }

    public final void p1(NoteFeed noteFeed, int i10) {
        m1(noteFeed, i10, false);
        h1().l(noteFeed.getId(), a.c.TYPE_UI_BUSINESS_LIKE);
    }

    public final void q1(NoteFeed noteFeed, int i10, MotionEvent motionEvent) {
        int i14;
        XhsActivity activity = getActivity();
        if (f1().u() && j.f132418a.P0()) {
            i14 = R$id.e4y;
        } else if (f1().p()) {
            i14 = R$id.dfo;
        } else {
            i14 = R$id.main_content;
        }
        ViewGroup viewGroup = (ViewGroup) activity.findViewById(i14);
        if (viewGroup != null) {
            m mVar = m.f160935a;
            float x14 = motionEvent.getX();
            float y14 = motionEvent.getY();
            boolean d14 = i1().d();
            XhsActivity activity2 = getActivity();
            if (f1().p()) {
                viewGroup = (ViewGroup) getActivity().getWindow().getDecorView();
            }
            mVar.b(x14, y14, d14, activity2, viewGroup, noteFeed.getLikeLottie());
        }
        g61.h.f81068a.i();
        m1(noteFeed, i10, true);
        h1().l(noteFeed.getId(), a.c.TYPE_UI_BUSINESS_DOUBLE_LIKE);
        qb1.r.f121073a.g(noteFeed.getId(), f1());
    }

    public final void r1(NoteFeed noteFeed, int i10) {
        this.f160901b.setLiked(false);
        NoteFeed noteFeed2 = this.f160901b;
        noteFeed2.setLikedCount(noteFeed2.getLikedCount() - 1);
        ((k) getPresenter()).e(this.f160901b, true);
        if (z41.e.f160472a.b(noteFeed)) {
            mb1.i.f105119a.D(a1(), noteFeed, i10, false, false, b1().a());
        } else {
            l.f162075a.T(noteFeed, a1(), new l0(false, false, false), b1().a(), this.f160900a.invoke().intValue(), new q(f1().u(), f1().m()));
        }
        bj2.h.f(new iy1.i().d(noteFeed.getId()), this, new f(noteFeed, this, i10), new C2615g(this));
    }

    public final void t1() {
        this.f160901b.setLiked(true);
        NoteFeed noteFeed = this.f160901b;
        noteFeed.setLikedCount(noteFeed.getLikedCount() + 1);
        ((k) getPresenter()).e(this.f160901b, false);
    }
}