PhotoRoom v4.8.2版本的 MD5 值为:c40a01bb3380c0f75c0cb6ac6760f295

以下内容为反编译后的 HelpCenterActivity.java 源代码,内容仅作参考


package com.photoroom.features.help_center.ui;

import android.app.ActivityOptions;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import android.util.Pair;
import android.view.View;
import android.view.Window;
import android.widget.ProgressBar;
import androidx.activity.ComponentActivity;
import androidx.appcompat.app.d;
import androidx.appcompat.widget.AppCompatTextView;
import androidx.cardview.widget.CardView;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.lifecycle.g1;
import androidx.lifecycle.k0;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import bu.j1;
import com.appboy.Constants;
import com.photoroom.features.help_center.data.model.HelpVideo;
import com.photoroom.features.help_center.ui.HelpCenterActivity;
import com.photoroom.features.help_center.ui.a;
import com.photoroom.shared.ui.AlertActivity;
import com.revenuecat.purchases.strings.Emojis;
import com.shakebugs.shake.internal.domain.models.SystemEvent;
import g1.n;
import hy.l;
import hy.p;
import hy.q;
import io.intercom.android.sdk.Intercom;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import kotlin.Metadata;
import kotlin.jvm.internal.o0;
import kotlin.jvm.internal.t;
import kotlin.jvm.internal.t0;
import kotlin.jvm.internal.v;
import lu.u0;
import px.b0;
import px.f1;
import px.r;
import px.x;
import px.z;
import vm.b1;
@n
@t0
@Metadata(d1 = {"\u0000t\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0006\b\u0007\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b9\u0010:J\b\u0010\u0003\u001a\u00020\u0002H\u0002J\b\u0010\u0004\u001a\u00020\u0002H\u0002J\b\u0010\u0005\u001a\u00020\u0002H\u0002J\b\u0010\u0006\u001a\u00020\u0002H\u0002J\b\u0010\u0007\u001a\u00020\u0002H\u0002J\b\u0010\b\u001a\u00020\u0002H\u0002J\b\u0010\t\u001a\u00020\u0002H\u0002J\u0014\u0010\r\u001a\u00020\u00022\n\u0010\f\u001a\u00060\nj\u0002`\u000bH\u0002J\u0016\u0010\u0011\u001a\u00020\u00022\f\u0010\u0010\u001a\b\u0012\u0004\u0012\u00020\u000f0\u000eH\u0002J\u0014\u0010\u0013\u001a\u00020\u00022\n\u0010\u0012\u001a\u00060\nj\u0002`\u000bH\u0002J*\u0010\u001b\u001a\u00020\u00022\u0006\u0010\u0014\u001a\u00020\u000f2\u0006\u0010\u0016\u001a\u00020\u00152\u0006\u0010\u0018\u001a\u00020\u00172\b\u0010\u001a\u001a\u0004\u0018\u00010\u0019H\u0002J\b\u0010\u001c\u001a\u00020\u0002H\u0002J\u0012\u0010\u001f\u001a\u00020\u00022\b\u0010\u001e\u001a\u0004\u0018\u00010\u001dH\u0014J\b\u0010 \u001a\u00020\u0002H\u0016R\u0016\u0010$\u001a\u00020!8\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b\"\u0010#R\u001b\u0010*\u001a\u00020%8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b&\u0010'\u001a\u0004\b(\u0010)R\u0018\u0010.\u001a\u0004\u0018\u00010+8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b,\u0010-R&\u00104\u001a\u0012\u0012\u0004\u0012\u0002000/j\b\u0012\u0004\u0012\u000200`18\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b2\u00103R\u0018\u00108\u001a\u0004\u0018\u0001058\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b6\u00107¨\u0006;"}, d2 = {"Lcom/photoroom/features/help_center/ui/HelpCenterActivity;", "Landroidx/appcompat/app/e;", "Lpx/f1;", "K0", "J0", "T0", "V0", "displayLoading", "E0", "G0", "Ljava/lang/Exception;", "Lkotlin/Exception;", "exception", "F0", "", "Lcom/photoroom/features/help_center/data/model/HelpVideo;", "videoList", "H0", "error", "D0", "helpVideo", "Landroid/net/Uri;", Constants.APPBOY_PUSH_DEEP_LINK_KEY, "Landroidx/cardview/widget/CardView;", "cardView", "Landroid/graphics/Bitmap;", "videoPreviewBitmap", "U0", "A0", "Landroid/os/Bundle;", "savedInstanceState", SystemEvent.STATE_APP_LAUNCHED, "onEnterAnimationComplete", "Lvm/b1;", "c", "Lvm/b1;", "binding", "Lcom/photoroom/features/help_center/ui/a;", Constants.APPBOY_PUSH_NOTIFICATION_SOUND_DEFAULT_VALUE, "Lpx/x;", "I0", "()Lcom/photoroom/features/help_center/ui/a;", "viewModel", "Lcu/c;", "e", "Lcu/c;", "coreAdapter", "Ljava/util/ArrayList;", "Ldu/a;", "Lkotlin/collections/ArrayList;", "f", "Ljava/util/ArrayList;", "cells", "Lap/a;", "g", "Lap/a;", "selectedCell", "<init>", "()V", "app_release"}, k = 1, mv = {1, 9, 0})
public final class HelpCenterActivity extends androidx.appcompat.app.e {
    private b1 f35062c;
    private final x f35063d;
    private cu.c f35064e;
    private ArrayList f35065f;
    private ap.a f35066g;

    public class a {
        public static final int[] f35067a;

        static {
            int[] iArr = new int[au.f.values().length];
            try {
                iArr[au.f.f12382c.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            try {
                iArr[au.f.f12381b.ordinal()] = 2;
            } catch (NoSuchFieldError unused2) {
            }
            f35067a = iArr;
        }
    }

    public static final class b extends v implements q {
        final ap.a f35069h;
        final HelpVideo f35070i;

        b(ap.a aVar, HelpVideo helpVideo) {
            super(3);
            this.f35069h = aVar;
            this.f35070i = helpVideo;
        }

        public final void a(Uri videoUri, CardView cardView, Bitmap bitmap) {
            t.i(videoUri, "videoUri");
            t.i(cardView, "cardView");
            HelpCenterActivity.this.f35066g = this.f35069h;
            HelpCenterActivity.this.U0(this.f35070i, videoUri, cardView, bitmap);
        }

        @Override
        public Object invoke(Object obj, Object obj2, Object obj3) {
            a((Uri) obj, (CardView) obj2, (Bitmap) obj3);
            return f1.f64673a;
        }
    }

    public static final class c extends v implements p {
        c() {
            super(2);
        }

        public final void a(androidx.core.graphics.b insets, int i11) {
            List e11;
            List e12;
            t.i(insets, "insets");
            b1 b1Var = HelpCenterActivity.this.f35062c;
            b1 b1Var2 = null;
            if (b1Var == null) {
                t.A("binding");
                b1Var = null;
            }
            ConstraintLayout root = b1Var.getRoot();
            b1 b1Var3 = HelpCenterActivity.this.f35062c;
            if (b1Var3 == null) {
                t.A("binding");
                b1Var3 = null;
            }
            e11 = kotlin.collections.t.e(b1Var3.f76576s);
            b1 b1Var4 = HelpCenterActivity.this.f35062c;
            if (b1Var4 == null) {
                t.A("binding");
            } else {
                b1Var2 = b1Var4;
            }
            e12 = kotlin.collections.t.e(b1Var2.f76574q);
            j1.c(insets, root, e11, e12);
        }

        @Override
        public Object invoke(Object obj, Object obj2) {
            a((androidx.core.graphics.b) obj, ((Number) obj2).intValue());
            return f1.f64673a;
        }
    }

    public static final class d extends v implements l {
        d() {
            super(1);
        }

        public final void a(gm.b bVar) {
            if (bVar != null) {
                HelpCenterActivity helpCenterActivity = HelpCenterActivity.this;
                if (bVar instanceof a.c) {
                    helpCenterActivity.displayLoading();
                } else if (bVar instanceof a.b) {
                    helpCenterActivity.H0(((a.b) bVar).a());
                } else if (bVar instanceof a.C0526a) {
                    helpCenterActivity.D0(((a.C0526a) bVar).a());
                } else if (bVar instanceof a.e) {
                    helpCenterActivity.E0();
                } else if (bVar instanceof a.f) {
                    helpCenterActivity.G0();
                } else if (bVar instanceof a.d) {
                    helpCenterActivity.F0(((a.d) bVar).a());
                }
            }
        }

        @Override
        public Object invoke(Object obj) {
            a((gm.b) obj);
            return f1.f64673a;
        }
    }

    public static final class e implements k0, kotlin.jvm.internal.n {
        private final l f35073b;

        e(l function) {
            t.i(function, "function");
            this.f35073b = function;
        }

        @Override
        public final void a(Object obj) {
            this.f35073b.invoke(obj);
        }

        @Override
        public final r b() {
            return this.f35073b;
        }

        public final boolean equals(Object obj) {
            if ((obj instanceof k0) && (obj instanceof kotlin.jvm.internal.n)) {
                return t.d(b(), ((kotlin.jvm.internal.n) obj).b());
            }
            return false;
        }

        public final int hashCode() {
            return b().hashCode();
        }
    }

    public static final class f extends v implements hy.a {
        final ComponentActivity f35074g;
        final s40.a f35075h;
        final hy.a f35076i;
        final hy.a f35077j;

        public f(ComponentActivity componentActivity, s40.a aVar, hy.a aVar2, hy.a aVar3) {
            super(0);
            this.f35074g = componentActivity;
            this.f35075h = aVar;
            this.f35076i = aVar2;
            this.f35077j = aVar3;
        }

        @Override
        public final androidx.lifecycle.b1 invoke() {
            m4.a defaultViewModelCreationExtras;
            androidx.lifecycle.b1 a11;
            ComponentActivity componentActivity = this.f35074g;
            s40.a aVar = this.f35075h;
            hy.a aVar2 = this.f35076i;
            hy.a aVar3 = this.f35077j;
            g1 viewModelStore = componentActivity.getViewModelStore();
            if (aVar2 == null || (defaultViewModelCreationExtras = (m4.a) aVar2.invoke()) == null) {
                defaultViewModelCreationExtras = componentActivity.getDefaultViewModelCreationExtras();
                t.h(defaultViewModelCreationExtras, "this.defaultViewModelCreationExtras");
            }
            m4.a aVar4 = defaultViewModelCreationExtras;
            u40.a a12 = x30.a.a(componentActivity);
            kotlin.reflect.d b11 = o0.b(com.photoroom.features.help_center.ui.a.class);
            t.h(viewModelStore, "viewModelStore");
            a11 = c40.a.a(b11, viewModelStore, (r16 & 4) != 0 ? null : null, aVar4, (r16 & 16) != 0 ? null : aVar, a12, (r16 & 64) != 0 ? null : aVar3);
            return a11;
        }
    }

    public HelpCenterActivity() {
        x b11;
        b11 = z.b(b0.f64658d, new f(this, null, null, null));
        this.f35063d = b11;
        this.f35065f = new ArrayList();
    }

    private final void A0() {
        new d.a(this).setMessage(em.l.A4).setPositiveButton(em.l.f42637o3, new DialogInterface.OnClickListener() {
            @Override
            public final void onClick(DialogInterface dialogInterface, int i11) {
                HelpCenterActivity.B0(dialogInterface, i11);
            }
        }).setNegativeButton(em.l.Z3, new DialogInterface.OnClickListener() {
            @Override
            public final void onClick(DialogInterface dialogInterface, int i11) {
                HelpCenterActivity.C0(HelpCenterActivity.this, dialogInterface, i11);
            }
        }).show();
    }

    public static final void B0(DialogInterface dialogInterface, int i11) {
        Intercom.present$default(Intercom.Companion.client(), null, 1, null);
        w7.f.a().P();
    }

    public static final void C0(HelpCenterActivity this$0, DialogInterface dialogInterface, int i11) {
        t.i(this$0, "this$0");
        this$0.I0().b3();
    }

    public final void D0(Exception exc) {
        b1 b1Var = this.f35062c;
        b1 b1Var2 = null;
        if (b1Var == null) {
            t.A("binding");
            b1Var = null;
        }
        ProgressBar helpCenterProgressBar = b1Var.f76568k;
        t.h(helpCenterProgressBar, "helpCenterProgressBar");
        u0.A(helpCenterProgressBar, (r19 & 1) != 0 ? 0.0f : 0.0f, (r19 & 2) != 0 ? 0L : 0L, (r19 & 4) != 0 ? 250L : 0L, (r19 & 8) != 0, (r19 & 16) != 0 ? false : false, (r19 & 32) != 0 ? new h4.b() : null, (r19 & 64) != 0 ? null : null);
        b1 b1Var3 = this.f35062c;
        if (b1Var3 == null) {
            t.A("binding");
            b1Var3 = null;
        }
        b1Var3.f76562e.setText(lu.t.a(exc));
        b1 b1Var4 = this.f35062c;
        if (b1Var4 == null) {
            t.A("binding");
            b1Var4 = null;
        }
        b1Var4.f76561d.setText(lu.t.b(exc, this));
        b1 b1Var5 = this.f35062c;
        if (b1Var5 == null) {
            t.A("binding");
            b1Var5 = null;
        }
        AppCompatTextView helpCenterErrorTitle = b1Var5.f76562e;
        t.h(helpCenterErrorTitle, "helpCenterErrorTitle");
        u0.M(helpCenterErrorTitle, null, 0.0f, 0L, 0L, null, null, 63, null);
        b1 b1Var6 = this.f35062c;
        if (b1Var6 == null) {
            t.A("binding");
        } else {
            b1Var2 = b1Var6;
        }
        AppCompatTextView helpCenterErrorMessage = b1Var2.f76561d;
        t.h(helpCenterErrorMessage, "helpCenterErrorMessage");
        u0.M(helpCenterErrorMessage, null, 0.0f, 0L, 0L, null, null, 63, null);
    }

    public final void E0() {
        AlertActivity.a aVar = AlertActivity.f36333f;
        String string = getString(em.l.f42788y4);
        t.h(string, "getString(...)");
        AlertActivity.a.g(aVar, this, string, null, 4, null);
    }

    public final void F0(Exception exc) {
        AlertActivity.f36333f.d(this, exc, AlertActivity.b.f36340d);
    }

    public final void G0() {
        AlertActivity.a aVar = AlertActivity.f36333f;
        String string = getString(em.l.f42803z4);
        t.h(string, "getString(...)");
        aVar.b(this, (r12 & 2) != 0 ? "" : "", (r12 & 4) == 0 ? string : "", (r12 & 8) != 0 ? null : null, (r12 & 16) != 0 ? false : true, (r12 & 32) != 0 ? AlertActivity.b.f36339c : AlertActivity.b.f36340d);
        V0();
    }

    public final void H0(List list) {
        b1 b1Var = this.f35062c;
        if (b1Var == null) {
            t.A("binding");
            b1Var = null;
        }
        ProgressBar helpCenterProgressBar = b1Var.f76568k;
        t.h(helpCenterProgressBar, "helpCenterProgressBar");
        u0.A(helpCenterProgressBar, (r19 & 1) != 0 ? 0.0f : 0.0f, (r19 & 2) != 0 ? 0L : 0L, (r19 & 4) != 0 ? 250L : 0L, (r19 & 8) != 0, (r19 & 16) != 0 ? false : false, (r19 & 32) != 0 ? new h4.b() : null, (r19 & 64) != 0 ? null : null);
        b1 b1Var2 = this.f35062c;
        if (b1Var2 == null) {
            t.A("binding");
            b1Var2 = null;
        }
        AppCompatTextView helpCenterErrorTitle = b1Var2.f76562e;
        t.h(helpCenterErrorTitle, "helpCenterErrorTitle");
        u0.A(helpCenterErrorTitle, (r19 & 1) != 0 ? 0.0f : 0.0f, (r19 & 2) != 0 ? 0L : 0L, (r19 & 4) != 0 ? 250L : 0L, (r19 & 8) != 0, (r19 & 16) != 0 ? false : false, (r19 & 32) != 0 ? new h4.b() : null, (r19 & 64) != 0 ? null : null);
        b1 b1Var3 = this.f35062c;
        if (b1Var3 == null) {
            t.A("binding");
            b1Var3 = null;
        }
        AppCompatTextView helpCenterErrorMessage = b1Var3.f76561d;
        t.h(helpCenterErrorMessage, "helpCenterErrorMessage");
        u0.A(helpCenterErrorMessage, (r19 & 1) != 0 ? 0.0f : 0.0f, (r19 & 2) != 0 ? 0L : 0L, (r19 & 4) != 0 ? 250L : 0L, (r19 & 8) != 0, (r19 & 16) != 0 ? false : false, (r19 & 32) != 0 ? new h4.b() : null, (r19 & 64) != 0 ? null : null);
        this.f35065f.clear();
        Iterator it = list.iterator();
        while (it.hasNext()) {
            HelpVideo helpVideo = (HelpVideo) it.next();
            ap.a aVar = new ap.a(helpVideo, false, null, 6, null);
            aVar.v(new b(aVar, helpVideo));
            aVar.t(true);
            this.f35065f.add(aVar);
        }
        cu.c cVar = this.f35064e;
        if (cVar != null) {
            cu.c.t(cVar, this.f35065f, false, 2, null);
        }
    }

    private final com.photoroom.features.help_center.ui.a I0() {
        return (com.photoroom.features.help_center.ui.a) this.f35063d.getValue();
    }

    private final void J0() {
        I0().a3();
    }

    private final void K0() {
        b1 b1Var = this.f35062c;
        b1 b1Var2 = null;
        if (b1Var == null) {
            t.A("binding");
            b1Var = null;
        }
        ConstraintLayout root = b1Var.getRoot();
        t.h(root, "getRoot(...)");
        Window window = getWindow();
        t.h(window, "getWindow(...)");
        j1.f(root, window, new c());
        b1 b1Var3 = this.f35062c;
        if (b1Var3 == null) {
            t.A("binding");
            b1Var3 = null;
        }
        b1Var3.f76577t.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                HelpCenterActivity.L0(HelpCenterActivity.this, view);
            }
        });
        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this, 0, false);
        this.f35064e = new cu.c(this, new ArrayList());
        b1 b1Var4 = this.f35062c;
        if (b1Var4 == null) {
            t.A("binding");
            b1Var4 = null;
        }
        RecyclerView recyclerView = b1Var4.f76570m;
        recyclerView.setHasFixedSize(true);
        recyclerView.setLayoutManager(linearLayoutManager);
        recyclerView.setAdapter(this.f35064e);
        b1 b1Var5 = this.f35062c;
        if (b1Var5 == null) {
            t.A("binding");
            b1Var5 = null;
        }
        b1Var5.f76564g.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                HelpCenterActivity.M0(HelpCenterActivity.this, view);
            }
        });
        b1 b1Var6 = this.f35062c;
        if (b1Var6 == null) {
            t.A("binding");
            b1Var6 = null;
        }
        b1Var6.f76559b.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                HelpCenterActivity.N0(HelpCenterActivity.this, view);
            }
        });
        b1 b1Var7 = this.f35062c;
        if (b1Var7 == null) {
            t.A("binding");
            b1Var7 = null;
        }
        b1Var7.f76569l.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                HelpCenterActivity.O0(HelpCenterActivity.this, view);
            }
        });
        b1 b1Var8 = this.f35062c;
        if (b1Var8 == null) {
            t.A("binding");
            b1Var8 = null;
        }
        b1Var8.f76566i.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                HelpCenterActivity.P0(HelpCenterActivity.this, view);
            }
        });
        b1 b1Var9 = this.f35062c;
        if (b1Var9 == null) {
            t.A("binding");
            b1Var9 = null;
        }
        b1Var9.f76571n.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                HelpCenterActivity.Q0(HelpCenterActivity.this, view);
            }
        });
        b1 b1Var10 = this.f35062c;
        if (b1Var10 == null) {
            t.A("binding");
            b1Var10 = null;
        }
        b1Var10.f76567j.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                HelpCenterActivity.R0(HelpCenterActivity.this, view);
            }
        });
        b1 b1Var11 = this.f35062c;
        if (b1Var11 == null) {
            t.A("binding");
        } else {
            b1Var2 = b1Var11;
        }
        b1Var2.f76560c.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                HelpCenterActivity.S0(HelpCenterActivity.this, view);
            }
        });
        V0();
    }

    public static final void L0(HelpCenterActivity this$0, View view) {
        t.i(this$0, "this$0");
        this$0.finish();
    }

    public static final void M0(HelpCenterActivity this$0, View view) {
        t.i(this$0, "this$0");
        this$0.startActivity(new Intent(this$0, PhotoRoomGuidesActivity.class));
    }

    public static final void N0(HelpCenterActivity this$0, View view) {
        t.i(this$0, "this$0");
        this$0.startActivity(new Intent("android.intent.action.VIEW", Uri.parse("https://www.facebook.com/groups/photoroomcommunity")));
        w7.f.a().O();
    }

    public static final void O0(HelpCenterActivity this$0, View view) {
        t.i(this$0, "this$0");
        Intent intent = new Intent();
        intent.setAction("android.intent.action.SEND");
        intent.setType("text/plain");
        intent.putExtra("android.intent.extra.TEXT", this$0.getString(em.l.f42755w1));
        this$0.startActivity(Intent.createChooser(intent, this$0.getString(em.l.f42770x1)));
        w7.f.a().Q();
    }

    public static final void P0(HelpCenterActivity this$0, View view) {
        t.i(this$0, "this$0");
        gu.a.f46685a.b(this$0, "https://help.photoroom.com/");
    }

    public static final void Q0(HelpCenterActivity this$0, View view) {
        t.i(this$0, "this$0");
        gu.a.f46685a.b(this$0, "https://webview.canny.io?boardToken=7f350ab5-5f7c-0cd4-c00f-f36f1ce92021&ssoToken=");
        w7.f.a().R();
    }

    public static final void R0(HelpCenterActivity this$0, View view) {
        t.i(this$0, "this$0");
        if (this$0.I0().X2() && !this$0.I0().Y2()) {
            this$0.A0();
            return;
        }
        Intercom.present$default(Intercom.Companion.client(), null, 1, null);
        w7.f.a().P();
    }

    public static final void S0(HelpCenterActivity this$0, View view) {
        t.i(this$0, "this$0");
        int i11 = a.f35067a[((au.a) au.d.f12341b.o().getValue()).f().ordinal()];
        if (i11 == 1) {
            String format = String.format("https://play.google.com/store/account/subscriptions?package=%s", Arrays.copyOf(new Object[]{this$0.getPackageName()}, 1));
            t.h(format, "format(this, *args)");
            this$0.startActivity(new Intent("android.intent.action.VIEW", Uri.parse(format)));
        } else if (i11 != 2) {
        } else {
            AlertActivity.a aVar = AlertActivity.f36333f;
            String string = this$0.getString(em.l.Kc);
            t.h(string, "getString(...)");
            aVar.b(this$0, (r12 & 2) != 0 ? "" : Emojis.INFO, (r12 & 4) == 0 ? string : "", (r12 & 8) != 0 ? null : null, (r12 & 16) != 0 ? false : false, (r12 & 32) != 0 ? AlertActivity.b.f36339c : null);
        }
    }

    private final void T0() {
        I0().Z2().observe(this, new e(new d()));
    }

    public final void U0(HelpVideo helpVideo, Uri uri, CardView cardView, Bitmap bitmap) {
        startActivity(VideoPlayerActivity.f35093i.a(this, helpVideo.getLocalizedTitle(), uri.toString(), bitmap), ActivityOptions.makeSceneTransitionAnimation(this, Pair.create(cardView, "videoCardView")).toBundle());
    }

    private final void V0() {
        au.d dVar = au.d.f12341b;
        int i11 = ((au.a) dVar.o().getValue()).i() ? em.l.f42740v1 : em.l.f42725u1;
        b1 b1Var = this.f35062c;
        b1 b1Var2 = null;
        if (b1Var == null) {
            t.A("binding");
            b1Var = null;
        }
        b1Var.f76560c.setText(i11);
        b1 b1Var3 = this.f35062c;
        if (b1Var3 == null) {
            t.A("binding");
            b1Var3 = null;
        }
        AppCompatTextView helpCenterCancelSubscription = b1Var3.f76560c;
        t.h(helpCenterCancelSubscription, "helpCenterCancelSubscription");
        helpCenterCancelSubscription.setVisibility(dVar.A() ? 0 : 8);
        if (!I0().X2()) {
            b1 b1Var4 = this.f35062c;
            if (b1Var4 == null) {
                t.A("binding");
                b1Var4 = null;
            }
            AppCompatTextView helpCenterRequestRefund = b1Var4.f76572o;
            t.h(helpCenterRequestRefund, "helpCenterRequestRefund");
            helpCenterRequestRefund.setVisibility(8);
            b1 b1Var5 = this.f35062c;
            if (b1Var5 == null) {
                t.A("binding");
            } else {
                b1Var2 = b1Var5;
            }
            View helpCenterRequestRefundSeparator = b1Var2.f76573p;
            t.h(helpCenterRequestRefundSeparator, "helpCenterRequestRefundSeparator");
            helpCenterRequestRefundSeparator.setVisibility(8);
            return;
        }
        b1 b1Var6 = this.f35062c;
        if (b1Var6 == null) {
            t.A("binding");
            b1Var6 = null;
        }
        AppCompatTextView helpCenterRequestRefund2 = b1Var6.f76572o;
        t.h(helpCenterRequestRefund2, "helpCenterRequestRefund");
        helpCenterRequestRefund2.setVisibility(0);
        b1 b1Var7 = this.f35062c;
        if (b1Var7 == null) {
            t.A("binding");
            b1Var7 = null;
        }
        View helpCenterRequestRefundSeparator2 = b1Var7.f76573p;
        t.h(helpCenterRequestRefundSeparator2, "helpCenterRequestRefundSeparator");
        helpCenterRequestRefundSeparator2.setVisibility(0);
        b1 b1Var8 = this.f35062c;
        if (b1Var8 == null) {
            t.A("binding");
        } else {
            b1Var2 = b1Var8;
        }
        b1Var2.f76572o.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                HelpCenterActivity.W0(HelpCenterActivity.this, view);
            }
        });
    }

    public static final void W0(HelpCenterActivity this$0, View view) {
        t.i(this$0, "this$0");
        this$0.I0().b3();
    }

    public final void displayLoading() {
        b1 b1Var = this.f35062c;
        if (b1Var == null) {
            t.A("binding");
            b1Var = null;
        }
        ProgressBar helpCenterProgressBar = b1Var.f76568k;
        t.h(helpCenterProgressBar, "helpCenterProgressBar");
        u0.M(helpCenterProgressBar, null, 0.0f, 300L, 0L, null, null, 59, null);
    }

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        b1 c11 = b1.c(getLayoutInflater());
        t.h(c11, "inflate(...)");
        this.f35062c = c11;
        if (c11 == null) {
            t.A("binding");
            c11 = null;
        }
        setContentView(c11.getRoot());
        K0();
        T0();
        J0();
        w7.f.a().S();
    }

    @Override
    public void onEnterAnimationComplete() {
        hy.a r11;
        super.onEnterAnimationComplete();
        ap.a aVar = this.f35066g;
        if (aVar != null && (r11 = aVar.r()) != null) {
            r11.invoke();
        }
        this.f35066g = null;
    }
}