Money Lover v8.14.0.6版本的 MD5 值为:48b9d922212c7ccfd438cdcc183ff396
以下内容为反编译后的 c.java 源代码,内容仅作参考
package za;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.o0;
import androidx.lifecycle.q0;
import androidx.lifecycle.r0;
import androidx.recyclerview.widget.RecyclerView;
import com.bookmark.money.R;
import com.zoostudio.moneylover.MoneyApplication;
import com.zoostudio.moneylover.globalcate.budget.detail.ui.ActivityAddBudget;
import com.zoostudio.moneylover.globalcate.budget.detail.ui.ActivityDetailBudgetGlobal;
import com.zoostudio.moneylover.main.MainActivity;
import com.zoostudio.moneylover.ui.activity.ActivityPremiumStore;
import com.zoostudio.moneylover.ui.view.ListEmptyView;
import com.zoostudio.moneylover.utils.m0;
import h3.h6;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import kotlin.jvm.internal.h0;
import kotlin.jvm.internal.k0;
import u0.a;
import za.c;
public final class c extends n7.d implements xa.a {
public static final a f39739k1 = new a(null);
private final kn.g B;
private final kn.g C;
private AlertDialog H;
private Dialog K0;
private MainActivity L;
private final o M;
private final n Q;
private final m R;
private final p T;
private final l Y;
private final k Z;
private h6 f39740c;
private final kn.g f39741d;
private final kn.g f39742e;
private com.zoostudio.moneylover.adapter.item.a f39743f;
private final kn.g f39744g;
private final kn.g f39745i;
public va.a f39746j;
private final kn.g f39747k0;
private final kn.g f39748o;
private final kn.g f39749p;
private final kn.g f39750q;
public static final class a {
private a() {
}
public a(kotlin.jvm.internal.j jVar) {
this();
}
}
public static final class a0 extends kotlin.jvm.internal.t implements wn.a<Fragment> {
final Fragment f39751a;
public a0(Fragment fragment) {
super(0);
this.f39751a = fragment;
}
@Override
public final Fragment invoke() {
return this.f39751a;
}
}
static final class b extends kotlin.jvm.internal.t implements wn.a<Long> {
public static final b f39752a = new b();
b() {
super(0);
}
@Override
public final Long invoke() {
return Long.valueOf(zi.f.a().F());
}
}
public static final class b0 extends kotlin.jvm.internal.t implements wn.a<r0> {
final wn.a f39753a;
public b0(wn.a aVar) {
super(0);
this.f39753a = aVar;
}
@Override
public final r0 invoke() {
return (r0) this.f39753a.invoke();
}
}
public static final class C0706c extends kotlin.jvm.internal.t implements wn.l<Boolean, kn.v> {
final String f39755b;
C0706c(String str) {
super(1);
this.f39755b = str;
}
public final void a(boolean z10) {
bb.a a02 = c.this.a0();
Context requireContext = c.this.requireContext();
kotlin.jvm.internal.r.g(requireContext, "requireContext(...)");
a02.y(requireContext);
h6 h6Var = null;
if (z10) {
h6 h6Var2 = c.this.f39740c;
if (h6Var2 == null) {
kotlin.jvm.internal.r.z("binding");
h6Var2 = null;
}
RecyclerView rvBudget = h6Var2.f20321g;
kotlin.jvm.internal.r.g(rvBudget, "rvBudget");
el.d.k(rvBudget);
h6 h6Var3 = c.this.f39740c;
if (h6Var3 == null) {
kotlin.jvm.internal.r.z("binding");
h6Var3 = null;
}
LinearLayout emptyViewBackground = h6Var3.f20318d;
kotlin.jvm.internal.r.g(emptyViewBackground, "emptyViewBackground");
el.d.d(emptyViewBackground);
h6 h6Var4 = c.this.f39740c;
if (h6Var4 == null) {
kotlin.jvm.internal.r.z("binding");
h6Var4 = null;
}
ListEmptyView emptyViewFinish = h6Var4.f20319e;
kotlin.jvm.internal.r.g(emptyViewFinish, "emptyViewFinish");
el.d.d(emptyViewFinish);
h6 h6Var5 = c.this.f39740c;
if (h6Var5 == null) {
kotlin.jvm.internal.r.z("binding");
} else {
h6Var = h6Var5;
}
h6Var.f20321g.setAdapter(c.this.Y());
c.this.o0(this.f39755b);
return;
}
h6 h6Var6 = c.this.f39740c;
if (h6Var6 == null) {
kotlin.jvm.internal.r.z("binding");
h6Var6 = null;
}
RecyclerView rvBudget2 = h6Var6.f20321g;
kotlin.jvm.internal.r.g(rvBudget2, "rvBudget");
el.d.d(rvBudget2);
c.this.Y().k(new ArrayList());
if (c.this.n0()) {
h6 h6Var7 = c.this.f39740c;
if (h6Var7 == null) {
kotlin.jvm.internal.r.z("binding");
} else {
h6Var = h6Var7;
}
LinearLayout emptyViewBackground2 = h6Var.f20318d;
kotlin.jvm.internal.r.g(emptyViewBackground2, "emptyViewBackground");
el.d.k(emptyViewBackground2);
return;
}
h6 h6Var8 = c.this.f39740c;
if (h6Var8 == null) {
kotlin.jvm.internal.r.z("binding");
} else {
h6Var = h6Var8;
}
ListEmptyView emptyViewFinish2 = h6Var.f20319e;
kotlin.jvm.internal.r.g(emptyViewFinish2, "emptyViewFinish");
el.d.k(emptyViewFinish2);
}
@Override
public kn.v invoke(Boolean bool) {
a(bool.booleanValue());
return kn.v.f26314a;
}
}
public static final class c0 extends kotlin.jvm.internal.t implements wn.a<q0> {
final kn.g f39756a;
public c0(kn.g gVar) {
super(0);
this.f39756a = gVar;
}
@Override
public final q0 invoke() {
r0 c10;
c10 = androidx.fragment.app.q0.c(this.f39756a);
return c10.getViewModelStore();
}
}
static final class d extends kotlin.jvm.internal.t implements wn.a<String[]> {
d() {
super(0);
}
@Override
public final String[] invoke() {
return c.this.getResources().getStringArray(R.array.date_format_values);
}
}
public static final class d0 extends kotlin.jvm.internal.t implements wn.a<u0.a> {
final wn.a f39758a;
final kn.g f39759b;
public d0(wn.a aVar, kn.g gVar) {
super(0);
this.f39758a = aVar;
this.f39759b = gVar;
}
@Override
public final u0.a invoke() {
r0 c10;
androidx.lifecycle.h hVar;
u0.a aVar;
wn.a aVar2 = this.f39758a;
if (aVar2 == null || (aVar = (u0.a) aVar2.invoke()) == null) {
c10 = androidx.fragment.app.q0.c(this.f39759b);
if (c10 instanceof androidx.lifecycle.h) {
hVar = (androidx.lifecycle.h) c10;
} else {
hVar = null;
}
if (hVar != null) {
return hVar.getDefaultViewModelCreationExtras();
}
return a.C0605a.f34814b;
}
return aVar;
}
}
static final class e extends kotlin.jvm.internal.t implements wn.a<String> {
e() {
super(0);
}
@Override
public final String invoke() {
String string;
Bundle arguments = c.this.getArguments();
if (arguments == null || (string = arguments.getString("END_DATE")) == null) {
return null;
}
return string;
}
}
static final class e0 extends kotlin.jvm.internal.t implements wn.a<String> {
e0() {
super(0);
}
@Override
public final String invoke() {
String string;
Bundle arguments = c.this.getArguments();
if (arguments == null || (string = arguments.getString("START_DATE")) == null) {
return null;
}
return string;
}
}
public static final class f implements hd.a {
final hd.d f39763b;
f(hd.d dVar) {
this.f39763b = dVar;
}
@Override
public void a() {
c.this.i0();
this.f39763b.dismiss();
}
}
static final class f0 extends kotlin.jvm.internal.t implements wn.a<String> {
public static final f0 f39764a = new f0();
f0() {
super(0);
}
@Override
public final String invoke() {
return rt.c.c(new Date(System.currentTimeMillis()));
}
}
static final class g extends kotlin.jvm.internal.t implements wn.l<com.zoostudio.moneylover.adapter.item.a, kn.v> {
g() {
super(1);
}
public final void a(com.zoostudio.moneylover.adapter.item.a aVar) {
c cVar = c.this;
if (aVar == null) {
aVar = m0.q(cVar.requireContext());
}
cVar.s0(aVar);
c.W(c.this, null, 1, null);
}
@Override
public kn.v invoke(com.zoostudio.moneylover.adapter.item.a aVar) {
a(aVar);
return kn.v.f26314a;
}
}
static final class g0 extends kotlin.jvm.internal.t implements wn.a<Integer> {
g0() {
super(0);
}
@Override
public final Integer invoke() {
Bundle arguments = c.this.getArguments();
if (arguments != null) {
return Integer.valueOf(arguments.getInt("type_budget"));
}
return null;
}
}
static final class h extends kotlin.jvm.internal.t implements wn.a<Boolean> {
public static final h f39767a = new h();
h() {
super(0);
}
@Override
public final Boolean invoke() {
return Boolean.valueOf(zi.f.a().e2());
}
}
static final class i extends kotlin.jvm.internal.t implements wn.a<Boolean> {
i() {
super(0);
}
@Override
public final Boolean invoke() {
return Boolean.valueOf(kotlin.jvm.internal.r.c(c.this.requireArguments().getString("tab_budget"), c.this.getString(R.string.running)));
}
}
public static final class j extends kotlin.jvm.internal.t implements wn.l<ArrayList<Object>, kn.v> {
final String f39769a;
final c f39770b;
j(String str, c cVar) {
super(1);
this.f39769a = str;
this.f39770b = cVar;
}
public static final void c(c this$0, h0 index) {
kotlin.jvm.internal.r.h(this$0, "this$0");
kotlin.jvm.internal.r.h(index, "$index");
h6 h6Var = this$0.f39740c;
if (h6Var == null) {
kotlin.jvm.internal.r.z("binding");
h6Var = null;
}
h6Var.f20321g.scrollToPosition(index.f26367a);
}
public final void b(ArrayList<Object> items) {
kotlin.jvm.internal.r.h(items, "items");
final h0 h0Var = new h0();
Iterator<Object> it = items.iterator();
while (true) {
if (!it.hasNext()) {
break;
}
Object next = it.next();
if (next instanceof mc.b) {
mc.b bVar = (mc.b) next;
if ((!bVar.k().isEmpty()) && kotlin.jvm.internal.r.c(bVar.k().get(0).r(), this.f39769a)) {
h0Var.f26367a = items.indexOf(next);
break;
}
}
}
this.f39770b.Y().k(items);
h6 h6Var = this.f39770b.f39740c;
if (h6Var == null) {
kotlin.jvm.internal.r.z("binding");
h6Var = null;
}
RecyclerView recyclerView = h6Var.f20321g;
final c cVar = this.f39770b;
recyclerView.post(new Runnable() {
@Override
public final void run() {
c.j.c(c.this, h0Var);
}
});
}
@Override
public kn.v invoke(ArrayList<Object> arrayList) {
b(arrayList);
return kn.v.f26314a;
}
}
public static final class k extends BroadcastReceiver {
k() {
}
@Override
public void onReceive(Context context, Intent intent) {
c.W(c.this, null, 1, null);
}
}
public static final class l extends BroadcastReceiver {
l() {
}
@Override
public void onReceive(Context context, Intent intent) {
c.W(c.this, null, 1, null);
}
}
public static final class m extends BroadcastReceiver {
m() {
}
@Override
public void onReceive(Context context, Intent intent) {
c.W(c.this, null, 1, null);
}
}
public static final class n extends BroadcastReceiver {
n() {
}
@Override
public void onReceive(Context context, Intent intent) {
kotlin.jvm.internal.r.h(context, "context");
kotlin.jvm.internal.r.h(intent, "intent");
c.W(c.this, null, 1, null);
}
}
public static final class o extends BroadcastReceiver {
o() {
}
@Override
public void onReceive(Context context, Intent intent) {
kotlin.jvm.internal.r.h(context, "context");
kotlin.jvm.internal.r.h(intent, "intent");
MainActivity mainActivity = null;
if (c.this.h0() == null) {
c cVar = c.this;
MainActivity mainActivity2 = cVar.L;
if (mainActivity2 == null) {
kotlin.jvm.internal.r.z("mainActivity");
mainActivity2 = null;
}
cVar.s0(mainActivity2.X2().X().f());
}
String stringExtra = intent.getStringExtra("label_names");
com.zoostudio.moneylover.adapter.item.a aVar = (com.zoostudio.moneylover.adapter.item.a) intent.getSerializableExtra("wallet");
if (intent.getBooleanExtra("add_budget_successfully", false)) {
MainActivity mainActivity3 = c.this.L;
if (mainActivity3 == null) {
kotlin.jvm.internal.r.z("mainActivity");
} else {
mainActivity = mainActivity3;
}
FrameLayout container = mainActivity.W2().f21977j;
kotlin.jvm.internal.r.g(container, "container");
String string = c.this.getString(R.string.add_budget_success_toast, stringExtra);
kotlin.jvm.internal.r.g(string, "getString(...)");
gc.a.a(container, string, -180.0f);
} else if (intent.getBooleanExtra("delete_budget_successfully", false)) {
MainActivity mainActivity4 = c.this.L;
if (mainActivity4 == null) {
kotlin.jvm.internal.r.z("mainActivity");
} else {
mainActivity = mainActivity4;
}
FrameLayout container2 = mainActivity.W2().f21977j;
kotlin.jvm.internal.r.g(container2, "container");
String string2 = c.this.getString(R.string.delete_budget_success_toast, stringExtra);
kotlin.jvm.internal.r.g(string2, "getString(...)");
gc.a.a(container2, string2, -180.0f);
} else if (intent.getBooleanExtra("edit_budget_successfully", false)) {
MainActivity mainActivity5 = c.this.L;
if (mainActivity5 == null) {
kotlin.jvm.internal.r.z("mainActivity");
} else {
mainActivity = mainActivity5;
}
FrameLayout container3 = mainActivity.W2().f21977j;
kotlin.jvm.internal.r.g(container3, "container");
String string3 = c.this.getString(R.string.edit_budget_success_toast, stringExtra);
kotlin.jvm.internal.r.g(string3, "getString(...)");
gc.a.a(container3, string3, -180.0f);
}
c.this.s0(aVar);
c.this.U(stringExtra);
}
}
public static final class p extends BroadcastReceiver {
p() {
}
@Override
public void onReceive(Context context, Intent intent) {
bb.a a02 = c.this.a0();
Context requireContext = c.this.requireContext();
kotlin.jvm.internal.r.g(requireContext, "requireContext(...)");
MoneyApplication.a aVar = MoneyApplication.f11023j;
Context requireContext2 = c.this.requireContext();
kotlin.jvm.internal.r.g(requireContext2, "requireContext(...)");
String uuid = aVar.o(requireContext2).getUUID();
kotlin.jvm.internal.r.g(uuid, "getUUID(...)");
a02.n(requireContext, uuid);
c.W(c.this, null, 1, null);
}
}
public static final class q extends kotlin.jvm.internal.t implements wn.a<kn.v> {
q() {
super(0);
}
@Override
public kn.v invoke() {
invoke2();
return kn.v.f26314a;
}
public final void invoke2() {
c9.b.f7270d.a(true).show(c.this.getParentFragmentManager(), "");
AlertDialog c02 = c.this.c0();
if (c02 != null) {
c02.dismiss();
}
}
}
public static final class r extends kotlin.jvm.internal.t implements wn.a<kn.v> {
r() {
super(0);
}
@Override
public kn.v invoke() {
invoke2();
return kn.v.f26314a;
}
public final void invoke2() {
AlertDialog c02 = c.this.c0();
if (c02 != null) {
c02.dismiss();
}
}
}
public static final class s extends kotlin.jvm.internal.t implements wn.a<kn.v> {
s() {
super(0);
}
@Override
public kn.v invoke() {
invoke2();
return kn.v.f26314a;
}
public final void invoke2() {
c.this.startActivity(ActivityPremiumStore.Ak.b(c.this.getContext(), 1));
Dialog dialog = c.this.K0;
if (dialog != null) {
dialog.dismiss();
}
}
}
public static final class t extends kotlin.jvm.internal.t implements wn.a<kn.v> {
t() {
super(0);
}
@Override
public kn.v invoke() {
invoke2();
return kn.v.f26314a;
}
public final void invoke2() {
Dialog dialog = c.this.K0;
if (dialog != null) {
dialog.dismiss();
}
}
}
public static final class u extends kotlin.jvm.internal.t implements wn.a<o0.b> {
final Fragment f39781a;
final kn.g f39782b;
public u(Fragment fragment, kn.g gVar) {
super(0);
this.f39781a = fragment;
this.f39782b = gVar;
}
@Override
public final o0.b invoke() {
r0 c10;
androidx.lifecycle.h hVar;
o0.b defaultViewModelProviderFactory;
c10 = androidx.fragment.app.q0.c(this.f39782b);
if (c10 instanceof androidx.lifecycle.h) {
hVar = (androidx.lifecycle.h) c10;
} else {
hVar = null;
}
if (hVar == null || (defaultViewModelProviderFactory = hVar.getDefaultViewModelProviderFactory()) == null) {
o0.b defaultViewModelProviderFactory2 = this.f39781a.getDefaultViewModelProviderFactory();
kotlin.jvm.internal.r.g(defaultViewModelProviderFactory2, "defaultViewModelProviderFactory");
return defaultViewModelProviderFactory2;
}
return defaultViewModelProviderFactory;
}
}
public static final class v extends kotlin.jvm.internal.t implements wn.a<Fragment> {
final Fragment f39783a;
public v(Fragment fragment) {
super(0);
this.f39783a = fragment;
}
@Override
public final Fragment invoke() {
return this.f39783a;
}
}
public static final class w extends kotlin.jvm.internal.t implements wn.a<r0> {
final wn.a f39784a;
public w(wn.a aVar) {
super(0);
this.f39784a = aVar;
}
@Override
public final r0 invoke() {
return (r0) this.f39784a.invoke();
}
}
public static final class x extends kotlin.jvm.internal.t implements wn.a<q0> {
final kn.g f39785a;
public x(kn.g gVar) {
super(0);
this.f39785a = gVar;
}
@Override
public final q0 invoke() {
r0 c10;
c10 = androidx.fragment.app.q0.c(this.f39785a);
return c10.getViewModelStore();
}
}
public static final class y extends kotlin.jvm.internal.t implements wn.a<u0.a> {
final wn.a f39786a;
final kn.g f39787b;
public y(wn.a aVar, kn.g gVar) {
super(0);
this.f39786a = aVar;
this.f39787b = gVar;
}
@Override
public final u0.a invoke() {
r0 c10;
androidx.lifecycle.h hVar;
u0.a aVar;
wn.a aVar2 = this.f39786a;
if (aVar2 == null || (aVar = (u0.a) aVar2.invoke()) == null) {
c10 = androidx.fragment.app.q0.c(this.f39787b);
if (c10 instanceof androidx.lifecycle.h) {
hVar = (androidx.lifecycle.h) c10;
} else {
hVar = null;
}
if (hVar != null) {
return hVar.getDefaultViewModelCreationExtras();
}
return a.C0605a.f34814b;
}
return aVar;
}
}
public static final class z extends kotlin.jvm.internal.t implements wn.a<o0.b> {
final Fragment f39788a;
final kn.g f39789b;
public z(Fragment fragment, kn.g gVar) {
super(0);
this.f39788a = fragment;
this.f39789b = gVar;
}
@Override
public final o0.b invoke() {
r0 c10;
androidx.lifecycle.h hVar;
o0.b defaultViewModelProviderFactory;
c10 = androidx.fragment.app.q0.c(this.f39789b);
if (c10 instanceof androidx.lifecycle.h) {
hVar = (androidx.lifecycle.h) c10;
} else {
hVar = null;
}
if (hVar == null || (defaultViewModelProviderFactory = hVar.getDefaultViewModelProviderFactory()) == null) {
o0.b defaultViewModelProviderFactory2 = this.f39788a.getDefaultViewModelProviderFactory();
kotlin.jvm.internal.r.g(defaultViewModelProviderFactory2, "defaultViewModelProviderFactory");
return defaultViewModelProviderFactory2;
}
return defaultViewModelProviderFactory;
}
}
public c() {
kn.g a10;
kn.g a11;
kn.g b10;
kn.g b11;
kn.g b12;
kn.g b13;
kn.g b14;
kn.g b15;
kn.g b16;
kn.g b17;
v vVar = new v(this);
kn.k kVar = kn.k.f26293c;
a10 = kn.i.a(kVar, new w(vVar));
this.f39741d = androidx.fragment.app.q0.b(this, k0.b(bb.a.class), new x(a10), new y(null, a10), new z(this, a10));
a11 = kn.i.a(kVar, new b0(new a0(this)));
this.f39742e = androidx.fragment.app.q0.b(this, k0.b(ib.a.class), new c0(a11), new d0(null, a11), new u(this, a11));
b10 = kn.i.b(h.f39767a);
this.f39744g = b10;
b11 = kn.i.b(new d());
this.f39745i = b11;
b12 = kn.i.b(new i());
this.f39748o = b12;
b13 = kn.i.b(f0.f39764a);
this.f39749p = b13;
b14 = kn.i.b(new e0());
this.f39750q = b14;
b15 = kn.i.b(new e());
this.B = b15;
b16 = kn.i.b(new g0());
this.C = b16;
this.M = new o();
this.Q = new n();
this.R = new m();
this.T = new p();
this.Y = new l();
this.Z = new k();
b17 = kn.i.b(b.f39752a);
this.f39747k0 = b17;
}
public final void U(String str) {
long j10;
bb.a a02 = a0();
Context requireContext = requireContext();
kotlin.jvm.internal.r.g(requireContext, "requireContext(...)");
com.zoostudio.moneylover.adapter.item.a aVar = this.f39743f;
if (aVar != null) {
j10 = aVar.getId();
} else {
j10 = 0;
}
a02.o(requireContext, j10, f0(), e0(), d0(), g0(), n0(), new C0706c(str));
}
static void W(c cVar, String str, int i10, Object obj) {
if ((i10 & 1) != 0) {
str = null;
}
cVar.U(str);
}
private final long X() {
return ((Number) this.f39747k0.getValue()).longValue();
}
private final ib.a Z() {
return (ib.a) this.f39742e.getValue();
}
public final bb.a a0() {
return (bb.a) this.f39741d.getValue();
}
private final String[] b0() {
Object value = this.f39745i.getValue();
kotlin.jvm.internal.r.g(value, "getValue(...)");
return (String[]) value;
}
private final String d0() {
return (String) this.B.getValue();
}
private final String e0() {
return (String) this.f39750q.getValue();
}
private final Integer g0() {
return (Integer) this.C.getValue();
}
public final void i0() {
if (!a0().m()) {
u0();
return;
}
jd.b bVar = jd.b.f25352a;
com.zoostudio.moneylover.adapter.item.a aVar = this.f39743f;
kotlin.jvm.internal.r.e(aVar);
if (bVar.b(aVar)) {
MainActivity mainActivity = this.L;
if (mainActivity == null) {
kotlin.jvm.internal.r.z("mainActivity");
mainActivity = null;
}
jd.b.c(mainActivity);
return;
}
if (this.f39743f != null) {
bb.a a02 = a0();
com.zoostudio.moneylover.adapter.item.a aVar2 = this.f39743f;
kotlin.jvm.internal.r.e(aVar2);
if (a02.z(aVar2)) {
p0();
return;
}
}
t0();
}
private final void j0() {
String str;
Context context = getContext();
if (context != null) {
if (rt.e.a(context, "vi")) {
str = "https://note.moneylover.vn/huong-dan-su-dung-chi-tiet-ngan-sach-o-money-lover-ban-8-0/";
} else {
str = "https://note.moneylover.me/how-to-use-budgets-in-money-lover-app/";
}
I(new Intent("android.intent.action.VIEW", Uri.parse(str)));
}
}
public static final void k0(c this$0, View view) {
kotlin.jvm.internal.r.h(this$0, "this$0");
this$0.j0();
}
public static final void l0(c this$0, View view) {
kotlin.jvm.internal.r.h(this$0, "this$0");
this$0.i0();
}
public final boolean n0() {
return ((Boolean) this.f39748o.getValue()).booleanValue();
}
private final void p0() {
com.zoostudio.moneylover.adapter.item.a aVar = this.f39743f;
if (aVar != null) {
jd.b bVar = jd.b.f25352a;
kotlin.jvm.internal.r.e(aVar);
if (bVar.b(aVar)) {
MainActivity mainActivity = this.L;
if (mainActivity == null) {
kotlin.jvm.internal.r.z("mainActivity");
mainActivity = null;
}
jd.b.c(mainActivity);
return;
}
}
Context requireContext = requireContext();
kotlin.jvm.internal.r.g(requireContext, "requireContext(...)");
fc.a.d(requireContext, "create_budget_tap_create_button", "", "Add Budget");
Intent intent = new Intent(requireContext(), (Class<?>) ActivityAddBudget.class);
intent.putExtra("wallet", this.f39743f);
intent.putExtra("budget_type", g0());
intent.putExtra("START_DATE", e0());
intent.putExtra("END_DATE", d0());
startActivity(intent);
}
private final void q0() {
String str;
String str2;
com.zoostudio.moneylover.adapter.item.a aVar = this.f39743f;
if (aVar != null) {
str = qe.a.d(aVar);
} else {
str = "";
}
if (n0()) {
str2 = "Running";
} else {
str2 = "Finished";
}
HashMap<String, Object> a10 = fc.a.a();
a10.put("wallet_type", str);
a10.put("type", str2);
Context requireContext = requireContext();
kotlin.jvm.internal.r.g(requireContext, "requireContext(...)");
qe.a.k(requireContext, "budget_list_show_list", a10);
}
private final void t0() {
Context requireContext = requireContext();
kotlin.jvm.internal.r.g(requireContext, "requireContext(...)");
fc.a.d(requireContext, "create_budget_tap_create_button", "", "Can not create a budget popup");
Context requireContext2 = requireContext();
kotlin.jvm.internal.r.g(requireContext2, "requireContext(...)");
be.c n10 = new be.c(requireContext2).s().r(R.string.cannot_create_budget_title).k(R.string.cannot_create_budget_content).p(R.string.create_a_wallet_button, new q()).i(R.color.p_500).n(R.string.close, new r());
AlertDialog create = n10.setView(n10.e().getRoot()).create();
this.H = create;
if (create != null) {
create.show();
}
}
private final void u0() {
Context requireContext = requireContext();
kotlin.jvm.internal.r.g(requireContext, "requireContext(...)");
fc.a.d(requireContext, "create_budget_tap_create_button", "", "Premium Store");
Context requireContext2 = requireContext();
kotlin.jvm.internal.r.g(requireContext2, "requireContext(...)");
be.k g10 = new be.k(requireContext2).r().q(R.string.title_popup_lock_create_budget).i(R.drawable.ic_logo_premium).j(R.string.description_popup_lock_create_budget).o(R.string.upgrade_now, new s()).g(new t());
this.K0 = g10;
if (g10 != null) {
g10.show();
}
}
public final va.a Y() {
va.a aVar = this.f39746j;
if (aVar != null) {
return aVar;
}
kotlin.jvm.internal.r.z("adapter");
return null;
}
public final AlertDialog c0() {
return this.H;
}
public final String f0() {
Object value = this.f39749p.getValue();
kotlin.jvm.internal.r.g(value, "getValue(...)");
return (String) value;
}
@Override
public void h() {
i0();
}
public final com.zoostudio.moneylover.adapter.item.a h0() {
return this.f39743f;
}
public final boolean m0() {
return ((Boolean) this.f39744g.getValue()).booleanValue();
}
public final void o0(String str) {
com.zoostudio.moneylover.adapter.item.a aVar = this.f39743f;
if (aVar != null) {
bb.a a02 = a0();
Context requireContext = requireContext();
String f02 = f0();
boolean m02 = m0();
String[] b02 = b0();
boolean n02 = n0();
String e02 = e0();
Integer g02 = g0();
String d02 = d0();
kotlin.jvm.internal.r.e(requireContext);
bb.a.x(a02, requireContext, aVar, f02, m02, b02, n02, e02, d02, g02, false, new j(str, this), 512, null);
}
}
@Override
public void onAttach(Context context) {
kotlin.jvm.internal.r.h(context, "context");
super.onAttach(context);
this.L = (MainActivity) context;
}
@Override
public void onDestroy() {
super.onDestroy();
il.b.b(this.M);
il.b.b(this.R);
il.b.b(this.T);
il.b.b(this.Q);
il.b.b(this.Y);
il.b.b(this.Z);
}
@Override
public void onStart() {
super.onStart();
q0();
}
@Override
public void p(mc.b budget) {
kotlin.jvm.internal.r.h(budget, "budget");
MainActivity mainActivity = this.L;
if (mainActivity == null) {
kotlin.jvm.internal.r.z("mainActivity");
mainActivity = null;
}
fc.a.d(mainActivity, "budget_list_tap_to_view_detail", "Budget management", "Budget detail");
Intent intent = new Intent(requireContext(), (Class<?>) ActivityDetailBudgetGlobal.class);
intent.putExtra(com.zoostudio.moneylover.adapter.item.u.CONTENT_KEY_BUDGET_ID, budget.d());
intent.putExtra("wallet", budget.j());
startActivity(intent);
}
public final void r0(va.a aVar) {
kotlin.jvm.internal.r.h(aVar, "<set-?>");
this.f39746j = aVar;
}
public final void s0(com.zoostudio.moneylover.adapter.item.a aVar) {
this.f39743f = aVar;
}
@Override
public void y(View view, Bundle bundle) {
kotlin.jvm.internal.r.h(view, "view");
super.y(view, bundle);
o oVar = this.M;
String jVar = com.zoostudio.moneylover.utils.j.BUDGET_GLOBAL.toString();
kotlin.jvm.internal.r.g(jVar, "toString(...)");
il.b.a(oVar, jVar);
il.b.a(this.Q, "com.zoostudio.intent.action.UPDATE_BUDGET_GLOBAL");
m mVar = this.R;
String jVar2 = com.zoostudio.moneylover.utils.j.TRANSACTION.toString();
kotlin.jvm.internal.r.g(jVar2, "toString(...)");
il.b.a(mVar, jVar2);
p pVar = this.T;
String jVar3 = com.zoostudio.moneylover.utils.j.WALLET.toString();
kotlin.jvm.internal.r.g(jVar3, "toString(...)");
il.b.a(pVar, jVar3);
l lVar = this.Y;
String jVar4 = com.zoostudio.moneylover.utils.j.LABEL.toString();
kotlin.jvm.internal.r.g(jVar4, "toString(...)");
il.b.a(lVar, jVar4);
k kVar = this.Z;
String jVar5 = com.zoostudio.moneylover.utils.j.CATEGORIES.toString();
kotlin.jvm.internal.r.g(jVar5, "toString(...)");
il.b.a(kVar, jVar5);
Context context = getContext();
if (context != null) {
bb.a a02 = a0();
String uuid = MoneyApplication.f11023j.o(context).getUUID();
kotlin.jvm.internal.r.g(uuid, "getUUID(...)");
a02.n(context, uuid);
}
Boolean o12 = zi.f.a().o1();
kotlin.jvm.internal.r.g(o12, "getShowSampleBudget(...)");
if (o12.booleanValue()) {
hd.d dVar = new hd.d();
dVar.z(new f(dVar));
dVar.show(getChildFragmentManager(), "");
zi.f.a().y5(Boolean.FALSE);
}
h6 h6Var = this.f39740c;
h6 h6Var2 = null;
if (h6Var == null) {
kotlin.jvm.internal.r.z("binding");
h6Var = null;
}
h6Var.f20320f.getBuilder().q(R.string.no_budget).m(R.string.budget_benefit).c();
h6 h6Var3 = this.f39740c;
if (h6Var3 == null) {
kotlin.jvm.internal.r.z("binding");
h6Var3 = null;
}
h6Var3.f20319e.getBuilder().q(R.string.no_data_to_display).c();
h6 h6Var4 = this.f39740c;
if (h6Var4 == null) {
kotlin.jvm.internal.r.z("binding");
h6Var4 = null;
}
h6Var4.f20316b.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
c.k0(c.this, view2);
}
});
Context requireContext = requireContext();
kotlin.jvm.internal.r.g(requireContext, "requireContext(...)");
h6 h6Var5 = this.f39740c;
if (h6Var5 == null) {
kotlin.jvm.internal.r.z("binding");
h6Var5 = null;
}
RecyclerView rvBudget = h6Var5.f20321g;
kotlin.jvm.internal.r.g(rvBudget, "rvBudget");
r0(new va.a(requireContext, rvBudget, this, n0()));
h6 h6Var6 = this.f39740c;
if (h6Var6 == null) {
kotlin.jvm.internal.r.z("binding");
h6Var6 = null;
}
h6Var6.f20321g.setAdapter(Y());
if (X() == 0) {
this.f39743f = m0.q(requireContext());
W(this, null, 1, null);
} else {
ib.a Z = Z();
Context requireContext2 = requireContext();
kotlin.jvm.internal.r.g(requireContext2, "requireContext(...)");
Z.h(requireContext2, X(), new g());
}
bb.a a03 = a0();
Context requireContext3 = requireContext();
kotlin.jvm.internal.r.g(requireContext3, "requireContext(...)");
a03.y(requireContext3);
h6 h6Var7 = this.f39740c;
if (h6Var7 == null) {
kotlin.jvm.internal.r.z("binding");
} else {
h6Var2 = h6Var7;
}
h6Var2.f20317c.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
c.l0(c.this, view2);
}
});
}
@Override
public View z() {
h6 c10 = h6.c(getLayoutInflater());
kotlin.jvm.internal.r.g(c10, "inflate(...)");
this.f39740c = c10;
if (c10 == null) {
kotlin.jvm.internal.r.z("binding");
c10 = null;
}
ConstraintLayout root = c10.getRoot();
kotlin.jvm.internal.r.g(root, "getRoot(...)");
return root;
}
}