package com.ss.android.ugc.aweme.sticker.view.internal.main;

import X.0CB;
import X.0CH;
import X.0GZ;
import X.0HH;
import X.2Pr;
import X.6Is;
import X.6Tu;
import X.C2200N4x;
import X.C2292N8l;
import X.C2294N8n;
import X.C2300N8t;
import X.C2327N9u;
import X.C6228Okp;
import X.Crj;
import X.LsC;
import X.M12;
import X.N9W;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import androidx.fragment.app.Fragment;
import com.bytedance.covode.number.Covode;
import com.bytedance.frameworks.apm.trace.MethodCollector;
import kotlin.h.b.n;

public class StickerViewImpl extends AbstractStickerView implements 6Is {
    public final Crj LJIL;

    static {
        Covode.recordClassIndex(116544);
    }

    private C2300N8t<C2327N9u, Fragment> LJIILJJIL() {
        return (C2300N8t) this.LJIL.getValue();
    }

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

    public final void LIZ(ViewGroup viewGroup) {
        MethodCollector.i(2820);
        M12.LIZ(viewGroup);
        super.LIZ(viewGroup);
        FrameLayout frameLayout = (FrameLayout) viewGroup.findViewById(2131368285);
        View LIZ = 0HH.LIZ(LayoutInflater.from(viewGroup.getContext()), 2131560511, frameLayout, false);
        if (LIZ != null) {
            frameLayout.addView((ViewGroup) LIZ);
            MethodCollector.o(2820);
            return;
        }
        NullPointerException nullPointerException = new NullPointerException("null cannot be cast to non-null type android.view.ViewGroup");
        MethodCollector.o(2820);
        throw nullPointerException;
    }

    public final C2292N8l LIZIZ(ViewGroup viewGroup) {
        M12.LIZ(viewGroup);
        C2200N4x n4x = this.LJIJJLI.LJIIJ;
        0GZ findViewById = viewGroup.findViewById(2131372997);
        n.LIZIZ(findViewById, "");
        findViewById.setOffscreenPageLimit(3);
        ViewGroup.LayoutParams layoutParams = findViewById.getLayoutParams();
        if (this.LJIJJLI.LJ > 0) {
            Context context = findViewById.getContext();
            n.LIZIZ(context, "");
            layoutParams.height = (int) 6Tu.LIZ(context, (float) this.LJIJJLI.LJ);
            findViewById.setLayoutParams(layoutParams);
        }
        LsC<? super 0GZ, 2Pr> lsC = n4x.LIZIZ;
        if (lsC != null) {
            lsC.invoke(findViewById);
        }
        N9W n9w = new N9W(findViewById, LIZ(), this.LIZ, this.LJIJ, this.LJIJI, LJIILJJIL());
        LIZIZ().setSupportCustomIndicator(false);
        LsC<? super C6228Okp, 2Pr> lsC2 = this.LJIJJLI.LJIIJ.LIZJ;
        if (lsC2 != null) {
            lsC2.invoke(LIZIZ());
        }
        return new C2294N8n(LIZIZ(), this.LJIILL, this.LJIIZILJ, this.LJIJJLI, n9w, this.LJIJ, LIZ(), LJIILJJIL());
    }

    /* JADX WARNING: Illegal instructions before constructor call */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public StickerViewImpl(X.1hK r14, android.view.ViewGroup r15, X.0CH r16, X.N7O r17, X.N7H r18, X.N9L r19, X.N8V r20, X.0AA r21, X.C2287N8g r22, X.C2300N8t<X.C2327N9u, androidx.fragment.app.Fragment> r23, X.2tJ r24, boolean r25, X.N5G r26) {
        /*
            r13 = this;
            r6 = r19
            r5 = r18
            r4 = r17
            r3 = r16
            r1 = r14
            r2 = r15
            r7 = r20
            r12 = r26
            r8 = r24
            r1 = r1
            r2 = r2
            r3 = r3
            r4 = r4
            r5 = r5
            r6 = r6
            r7 = r7
            r8 = r8
            r9 = r12
            X.M12.LIZ(r1, r2, r3, r4, r5, r6, r7, r8, r9)
            r0 = r13
            r11 = r25
            r10 = r22
            r9 = r21
            r0.<init>(r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12)
            X.N8T r0 = new X.N8T
            r1 = r23
            r0.<init>(r1)
            X.Crj r1 = X.7he.LIZ(r0)
            r0 = r13
            r0.LJIL = r1
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.sticker.view.internal.main.StickerViewImpl.<init>(X.1hK, android.view.ViewGroup, X.0CH, X.N7O, X.N7H, X.N9L, X.N8V, X.0AA, X.N8g, X.N8t, X.2tJ, boolean, X.N5G):void");
    }
}
