package com.ss.android.ugc.aweme.compliance.business.share;

import X.Lnj;
import X.OuZ;
import com.bytedance.covode.number.Covode;
import com.bytedance.frameworks.apm.trace.MethodCollector;
import com.ss.android.ugc.aweme.compliance.api.services.share.IShareWarningInfoService;
import com.ss.android.ugc.aweme.feed.model.Aweme;
import com.ss.android.ugc.aweme.feed.model.ShareWarnInfo;

public final class ShareWarningInfoServiceImpl implements IShareWarningInfoService {
    static {
        Covode.recordClassIndex(61163);
    }

    public static IShareWarningInfoService LIZ() {
        MethodCollector.i(2644);
        IShareWarningInfoService iShareWarningInfoService = (IShareWarningInfoService) Lnj.LIZ(IShareWarningInfoService.class, false);
        if (iShareWarningInfoService != null) {
            MethodCollector.o(2644);
            return iShareWarningInfoService;
        }
        Object LIZIZ = Lnj.LIZIZ(IShareWarningInfoService.class, false);
        if (LIZIZ != null) {
            IShareWarningInfoService iShareWarningInfoService2 = (IShareWarningInfoService) LIZIZ;
            MethodCollector.o(2644);
            return iShareWarningInfoService2;
        }
        if (Lnj.LLIIJI == null) {
            synchronized (IShareWarningInfoService.class) {
                try {
                    if (Lnj.LLIIJI == null) {
                        Lnj.LLIIJI = new ShareWarningInfoServiceImpl();
                    }
                } catch (Throwable th) {
                    MethodCollector.o(2644);
                    throw th;
                }
            }
        }
        ShareWarningInfoServiceImpl shareWarningInfoServiceImpl = (ShareWarningInfoServiceImpl) Lnj.LLIIJI;
        MethodCollector.o(2644);
        return shareWarningInfoServiceImpl;
    }

    public final void LIZ(Aweme aweme) {
        OuZ uploadMiscInfoStruct;
        ShareWarnInfo shareWarnInfo;
        if (aweme != null && (uploadMiscInfoStruct = aweme.getUploadMiscInfoStruct()) != null && (shareWarnInfo = uploadMiscInfoStruct.samShareWarnInfo) != null) {
            shareWarnInfo.setHasShown(false);
        }
    }

    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r0v11, resolved type: android.text.Spannable[]} */
    /* JADX WARNING: Code restructure failed: missing block: B:12:0x00ba, code lost:
        if (r1 == null) goto L_0x00bc;
     */
    /* JADX WARNING: Multi-variable type inference failed */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final boolean LIZ(android.content.Context r10, com.ss.android.ugc.aweme.feed.model.Aweme r11, X.Ls2<X.C03012Pr> r12) {
        /*
            r9 = this;
            X.M12.LIZ(r10)
            X.M12.LIZ(r10)
            r6 = 0
            if (r11 == 0) goto L_0x00d4
            X.OuZ r0 = r11.getUploadMiscInfoStruct()
            com.ss.android.ugc.aweme.feed.model.ShareWarnInfo r8 = r0.samShareWarnInfo
            if (r8 == 0) goto L_0x00d4
            boolean r0 = r8.getHasShown()
            if (r0 != 0) goto L_0x00d4
            r3 = 1
            r8.setHasShown(r3)
            X.3j6 r4 = new X.3j6
            r4.<init>()
            X.3rj r0 = X.C40633rj.LIZ
            X.3ZQ r0 = X.C18812xd.LIZ((X.LsC<? super X.AnonymousClass3ZQ, X.C03012Pr>) r0)
            X.QNA r0 = r0.LIZ(r10)
            r4.LIZJ = r0
            r0 = 3
            r4.LJFF = r0
            java.lang.String r0 = r8.getTitle()
            r4.LIZ((java.lang.CharSequence) r0)
            r0 = 2
            X.3jC[] r7 = new X.C35343jC[r0]
            X.3C7 r1 = new X.3C7
            r1.<init>()
            java.lang.String r0 = r8.getLearnMoreText()
            r1.LIZ((java.lang.String) r0)
            r1.LIZJ(r6)
            r1.LIZIZ = r6
            r0 = 43
            r1.LIZIZ(r0)
            X.3ri r0 = new X.3ri
            r0.<init>(r8, r10, r8)
            r1.LIZLLL = r0
            java.lang.CharSequence r5 = r1.LIZ((android.content.Context) r10)
            X.3rp r2 = X.C40673rn.LIZ
            java.lang.String r1 = r8.getSubTitle1()
            android.text.Spannable[] r0 = new android.text.Spannable[r3]
            r0[r6] = r5
            android.text.Spanned r2 = r2.LIZ(r1, r0)
            X.3jC r1 = new X.3jC
            r0 = 2131755406(0x7f10018e, float:1.914169E38)
            r1.<init>(r0, r2, r6)
            r7[r6] = r1
            X.3jC r2 = new X.3jC
            r1 = 2131755389(0x7f10017d, float:1.9141656E38)
            java.lang.String r0 = r8.getSubTitle2()
            r2.<init>(r1, r0, r6)
            r7[r3] = r2
            r4.LIZ((X.C35343jC[]) r7)
            r4.LJIILL = r3
            r0 = 2131826515(0x7f111753, float:1.9285917E38)
            java.lang.String r1 = r10.getString(r0)
            java.lang.String r2 = ""
            kotlin.h.b.n.LIZIZ(r1, r2)
            X.3rm r0 = X.C40663rm.LIZ
            r4.LIZ(r1, r0)
            r0 = 2131826517(0x7f111755, float:1.928592E38)
            java.lang.String r1 = r10.getString(r0)
            kotlin.h.b.n.LIZIZ(r1, r2)
            X.3rl r0 = new X.3rl
            r0.<init>(r12)
            r4.LIZIZ(r1, r0)
            r4.LJIIZILJ = r3
            X.3YB r0 = r4.LIZ()
            com.bytedance.tux.sheet.sheet.TuxSheet r2 = r0.LIZ
        L_0x00b0:
            r1 = 0
            if (r10 == 0) goto L_0x00bc
            boolean r0 = r10 instanceof X.1hK
            if (r0 == 0) goto L_0x00c9
            r1 = r10
            X.1hK r1 = (X.1hK) r1
            if (r1 != 0) goto L_0x00bf
        L_0x00bc:
            kotlin.h.b.n.LIZIZ()
        L_0x00bf:
            X.0AA r1 = r1.getSupportFragmentManager()
            java.lang.String r0 = "SamShareWarningDialog"
            r2.show(r1, r0)
            return r3
        L_0x00c9:
            boolean r0 = r10 instanceof android.content.ContextWrapper
            if (r0 == 0) goto L_0x00bc
            android.content.ContextWrapper r10 = (android.content.ContextWrapper) r10
            android.content.Context r10 = r10.getBaseContext()
            goto L_0x00b0
        L_0x00d4:
            return r6
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.compliance.business.share.ShareWarningInfoServiceImpl.LIZ(android.content.Context, com.ss.android.ugc.aweme.feed.model.Aweme, X.Ls2):boolean");
    }
}
