package com.ss.android.ugc.aweme.ecommerce.review.viewholder;

import X.0CB;
import X.0CH;
import X.6Is;
import X.C5393Byv;
import X.C6430CaY;
import X.C6456Cay;
import X.C6457Caz;
import X.Crj;
import X.JIn;
import X.M12;
import X.QJt;
import X.QKL;
import X.QKp;
import X.TYl;
import X.TYm;
import X.TYo;
import X.TYt;
import X.TYu;
import android.view.GestureDetector;
import android.view.View;
import com.bytedance.covode.number.Covode;
import com.bytedance.jedi.ext.adapter.JediSimpleViewHolder;
import com.ss.android.ugc.aweme.ecommerce.review.gallery.ReviewGalleryViewModel;
import com.ss.android.ugc.aweme.ecommerce.service.vo.Image;
import kotlin.h.b.n;

public final class ReviewGalleryViewHolder extends JediSimpleViewHolder<C6430CaY> implements 6Is {
    public final float LJFF = 0.5625f;
    public final Crj LJI;
    public final Crj LJIIIZ;
    public final Crj LJIIJ;

    static {
        Covode.recordClassIndex(72265);
    }

    public final int LJIIL() {
        return ((Number) this.LJI.getValue()).intValue();
    }

    public final ReviewGalleryViewModel LJIILIIL() {
        return (ReviewGalleryViewModel) this.LJIIJ.getValue();
    }

    public final void onStateChanged(0CH r1, 0CB r2) {
        super.onStateChanged(r1, r2);
    }

    public final void LJIIIZ() {
        View view = this.itemView;
        n.LIZIZ(view, "");
        TYl findViewById = view.findViewById(2131365871);
        findViewById.setOnDoubleTapListener((GestureDetector.OnDoubleTapListener) null);
        findViewById.setOnPhotoTouchListener((TYt) null);
        findViewById.setOnViewTapListener((TYu) null);
        findViewById.LIZ = null;
        ReviewGalleryViewHolder.super.LJIIIZ();
    }

    public final void LJ() {
        ReviewGalleryViewHolder.super.LJ();
        LJIILIIL();
        View view = this.itemView;
        n.LIZIZ(view, "");
        TYl findViewById = view.findViewById(2131365871);
        QKL qkl = new QKL(findViewById.getResources());
        qkl.LIZ(QKp.LIZLLL);
        qkl.LIZ(2131231724);
        qkl.LJI = QKp.LIZLLL;
        findViewById.setHierarchy(qkl.LIZ());
        findViewById.getLayoutParams().width = LJIIL();
        findViewById.getLayoutParams().height = ((Number) this.LJIIIZ.getValue()).intValue();
        findViewById.setOnDoubleTapListener(new TYo(findViewById));
        findViewById.setOnPhotoTouchListener(new C6456Cay(this));
        findViewById.setOnViewTapListener(new C6457Caz(this));
    }

    /* JADX WARNING: Illegal instructions before constructor call */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public ReviewGalleryViewHolder(android.view.ViewGroup r4) {
        /*
            r3 = this;
            X.M12.LIZ(r4)
            android.content.Context r0 = r4.getContext()
            android.view.LayoutInflater r2 = android.view.LayoutInflater.from(r0)
            r1 = 2131559051(0x7f0d028b, float:1.8743435E38)
            r0 = 0
            android.view.View r1 = X.0HH.LIZ(r2, r1, r4, r0)
            java.lang.String r0 = ""
            kotlin.h.b.n.LIZIZ(r1, r0)
            r3.<init>(r1)
            r0 = 1058013184(0x3f100000, float:0.5625)
            r3.LJFF = r0
            X.BI9 r0 = new X.BI9
            r0.<init>(r4)
            X.Crj r0 = X.7he.LIZ(r0)
            r3.LJI = r0
            X.Cb0 r0 = new X.Cb0
            r0.<init>(r3)
            X.Crj r0 = X.7he.LIZ(r0)
            r3.LJIIIZ = r0
            java.lang.Class<com.ss.android.ugc.aweme.ecommerce.review.gallery.ReviewGalleryViewModel> r1 = com.ss.android.ugc.aweme.ecommerce.review.gallery.ReviewGalleryViewModel.class
            X.KEN r0 = X.KEM.LIZ
            X.D1G r1 = r0.LIZ(r1)
            X.BI8 r0 = new X.BI8
            r0.<init>(r3, r1, r1)
            X.Crj r0 = X.7he.LIZ(r0)
            r3.LJIIJ = r0
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.ecommerce.review.viewholder.ReviewGalleryViewHolder.<init>(android.view.ViewGroup):void");
    }

    public final /* synthetic */ void LIZ(Object obj) {
        String str;
        C6430CaY caY = (C6430CaY) obj;
        M12.LIZ(caY);
        View view = this.itemView;
        n.LIZIZ(view, "");
        TYl findViewById = view.findViewById(2131365871);
        Object tag = findViewById.getTag();
        Image image = caY.LIZ;
        String str2 = null;
        if (image != null) {
            str = image.getUri();
        } else {
            str = null;
        }
        if (!n.LIZ(tag, str)) {
            Image image2 = caY.LIZ;
            if (image2 != null) {
                str2 = image2.getUri();
            }
            findViewById.setTag(str2);
            QJt LIZ = C5393Byv.LIZIZ.LIZ((Object) caY.LIZ);
            LIZ.LJIJJLI = JIn.FIT_CENTER;
            LIZ.LJJIIZ = findViewById;
            LIZ.LIZ(new TYm(findViewById));
        }
    }
}
