导航菜单

页面标题

页面副标题

MedEd v5.3.6 - NeetPGContactUsActivity.java 源代码

正在查看: MedEd v5.3.6 应用的 NeetPGContactUsActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.penpencil.physicswallah.feature.extras.presentation;

import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.text.TextUtils;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.appcompat.widget.AppCompatImageButton;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.widget.NestedScrollView;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.freshchat.consumer.sdk.Freshchat;
import com.freshchat.consumer.sdk.FreshchatConfig;
import com.freshchat.consumer.sdk.FreshchatUser;
import com.google.android.material.button.MaterialButton;
import com.google.gson.Gson;
import com.penpencil.network.models.ContactUsModel;
import com.penpencil.network.models.ReportQuestionResponse;
import com.penpencil.network.response.PreferenceData;
import com.penpencil.network.response.PreferenceResponse;
import com.penpencil.network.response.RecentOrderDetails;
import com.penpencil.network.response.RecentOrderResponse;
import com.penpencil.network.response.RecentOrdersData;
import com.penpencil.physicswallah.feature.bookmark.domain.model.PostBookmarkResponse;
import com.penpencil.physicswallah.feature.extras.presentation.NeetPGContactUsActivity;
import com.penpencil.physicswallah.feature.pdf.ui.PDFActivity;
import com.truecaller.android.sdk.oAuth.TcSdkOptions;
import defpackage.C0812sz;
import defpackage.NQ0;
import defpackage.mL1;
import defpackage.qk0;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import kotlin.jvm.internal.Intrinsics;

public class NeetPGContactUsActivity extends NQ0 implements qk0 {
    public static final int S0 = 0;
    public String I0;
    public C0812sz K0;
    public NeetPGContactUsActivity L0;
    public hI R0;

    @BindView
    ImageView backBtn;

    @BindView
    RelativeLayout callRl;

    @BindView
    LinearLayout contactUsOldFlowLl;

    @BindView
    ImageView faceBookIv;

    @BindView
    LinearLayout followLl;

    @BindView
    AppCompatImageButton freshChatBtn;

    @BindView
    ConstraintLayout freshChatLl;

    @BindView
    ImageView instaGramIv;

    @BindView
    AppCompatImageButton ivrNumberBtn;

    @BindView
    RelativeLayout mailRl;

    @BindView
    EditText msgEt;

    @BindView
    NestedScrollView nsv_Contact_Us;

    @BindView
    MaterialButton submitBtn;

    @BindView
    ImageView telegramIv;

    @BindView
    TextView tvErrorMessage;

    @BindView
    RelativeLayout whatsAppRl;

    @BindView
    ImageView youTubeIv;
    public ContactUsModel J0 = null;
    public final ArrayList M0 = new ArrayList();
    public String N0 = "";
    public String O0 = "";
    public Bundle P0 = null;
    public ApplicationInfo Q0 = null;

    public static void U0(NeetPGContactUsActivity neetPGContactUsActivity) {
        if (neetPGContactUsActivity.msgEt.getText().toString().isEmpty()) {
            return;
        }
        String obj = neetPGContactUsActivity.msgEt.getText().toString();
        neetPGContactUsActivity.T0((String) null);
        StringBuilder b = I8.b(fj.a("MESSAGE : ", obj), "/APP_VERSION : ");
        String str = PV1.b;
        b.append(a.c(neetPGContactUsActivity).b());
        String sb = b.toString();
        if (!TextUtils.isEmpty(((rp) neetPGContactUsActivity).C0.c().e())) {
            StringBuilder b2 = I8.b(sb, "/CITY : ");
            b2.append(((rp) neetPGContactUsActivity).C0.c().e());
            sb = b2.toString();
        }
        if (!TextUtils.isEmpty(((rp) neetPGContactUsActivity).C0.c().s())) {
            StringBuilder b3 = I8.b(sb, "/PINCODE : ");
            b3.append(((rp) neetPGContactUsActivity).C0.c().s());
            sb = b3.toString();
        }
        ReportQuestionResponse reportQuestionResponse = new ReportQuestionResponse(((rp) neetPGContactUsActivity).C0.c().n(), ((rp) neetPGContactUsActivity).C0.c().r(), ((rp) neetPGContactUsActivity).C0.c().k(), "", sb, "63b52963e72e8b00186c11f3");
        Object value = ((rp) neetPGContactUsActivity).C0.g.getValue();
        Intrinsics.checkNotNullExpressionValue(value, "getValue(...)");
        ((ul0) value).b(reportQuestionResponse).f(neetPGContactUsActivity, new a(neetPGContactUsActivity, 0));
    }

    @Override
    public final void K0() {
    }

    public final void V0(String str, String str2, String str3) {
        FreshchatConfig freshchatConfig = new FreshchatConfig(str, str2);
        freshchatConfig.setDomain(str3);
        freshchatConfig.setCameraCaptureEnabled(true);
        freshchatConfig.setGallerySelectionEnabled(true);
        freshchatConfig.setResponseExpectationEnabled(true);
        Freshchat.getInstance(getApplicationContext()).init(freshchatConfig);
        String n = ((rp) this).C0.c().n();
        String p = ((rp) this).C0.c().p();
        String k = ((rp) this).C0.c().k();
        String r = ((rp) this).C0.c().r();
        FreshchatUser user = Freshchat.getInstance(getApplicationContext()).getUser();
        HashMap hashMap = new HashMap();
        if (!TextUtils.isEmpty(n)) {
            hashMap.put("cf_name", n);
            user.setFirstName(n);
        }
        if (!TextUtils.isEmpty(p)) {
            user.setLastName(p);
        }
        if (!TextUtils.isEmpty(k)) {
            hashMap.put("cf_email", k);
            user.setEmail(k);
        }
        if (!TextUtils.isEmpty(r)) {
            hashMap.put("cf_phone", r);
            user.setPhone("+91", r);
        }
        hashMap.put("cf_recent_purchases", this.M0.toString());
        hashMap.put("cf_course", this.R0.a().getName());
        try {
            Freshchat.getInstance(getApplicationContext()).setUser(user);
            Freshchat.getInstance(getApplicationContext()).setUserProperties(hashMap);
        } catch (Exception unused) {
        }
    }

    public final void onCreate(Bundle bundle) {
        String str;
        super.onCreate(bundle);
        setContentView(2131558456);
        ButterKnife.b(this);
        this.L0 = this;
        this.backBtn.setOnClickListener(new mL1(this, 1));
        S0();
        String m = ((rp) this).C0.c().a.m("https://meded-api.penpencil.coep_programId_preference");
        final int i = 0;
        if (!TextUtils.isEmpty(m)) {
            C0812sz c0812sz = (C0812sz) pK0.c(C0812sz.class, m);
            this.K0 = c0812sz;
            Iterator it = pK0.a(PreferenceData.class, c0812sz.a()).iterator();
            while (true) {
                if (!it.hasNext()) {
                    break;
                }
                PreferenceData preferenceData = (PreferenceData) it.next();
                if (preferenceData.getKey().equals("ContactUs") && preferenceData.getType().equalsIgnoreCase("object")) {
                    ContactUsModel contactUsModel = (ContactUsModel) pK0.c(ContactUsModel.class, new Gson().l(preferenceData.getValue()));
                    this.J0 = contactUsModel;
                    if (TextUtils.isEmpty(contactUsModel.getFacebook())) {
                        this.faceBookIv.setVisibility(8);
                    } else {
                        this.faceBookIv.setVisibility(0);
                    }
                    if (TextUtils.isEmpty(this.J0.getInstagram())) {
                        this.instaGramIv.setVisibility(8);
                    } else {
                        this.instaGramIv.setVisibility(0);
                    }
                    if (TextUtils.isEmpty(this.J0.getYoutube())) {
                        this.youTubeIv.setVisibility(8);
                    } else {
                        this.youTubeIv.setVisibility(0);
                    }
                }
            }
        }
        C0812sz c0812sz2 = this.K0;
        if (c0812sz2 != null) {
            str = String.valueOf(c0812sz2.b());
        } else {
            T0("Loading Details");
            str = "";
        }
        ((rp) this).C0.d().b(str).f(this, new b02() {
            public final void a(Object obj) {
                int i2 = i;
                PDFActivity pDFActivity = this;
                switch (i2) {
                    case 0:
                        NeetPGContactUsActivity neetPGContactUsActivity = (NeetPGContactUsActivity) pDFActivity;
                        PreferenceResponse preferenceResponse = (PreferenceResponse) obj;
                        if (neetPGContactUsActivity.K0 == null) {
                            neetPGContactUsActivity.S0();
                        }
                        if (preferenceResponse != null && preferenceResponse.getSuccess()) {
                            if (neetPGContactUsActivity.K0 == null) {
                                neetPGContactUsActivity.K0 = new C0812sz(pK0.g(PreferenceData.class, new ArrayList()));
                            }
                            neetPGContactUsActivity.K0.d(Long.valueOf(System.currentTimeMillis()));
                            if (!preferenceResponse.getData().isEmpty()) {
                                neetPGContactUsActivity.K0.c(pK0.g(PreferenceData.class, preferenceResponse.getData()));
                                Iterator it2 = preferenceResponse.getData().iterator();
                                while (true) {
                                    if (it2.hasNext()) {
                                        PreferenceData preferenceData2 = (PreferenceData) it2.next();
                                        if (preferenceData2.getKey().equals("ContactUs") && preferenceData2.getType().equalsIgnoreCase("object")) {
                                            neetPGContactUsActivity.J0 = (ContactUsModel) pK0.c(ContactUsModel.class, new Gson().l(preferenceData2.getValue()));
                                        }
                                    }
                                }
                            }
                            ((rp) neetPGContactUsActivity).C0.c().H("https://meded-api.penpencil.coep_programId_preference", pK0.h(C0812sz.class, neetPGContactUsActivity.K0));
                            break;
                        }
                        break;
                    default:
                        PDFActivity.a1(pDFActivity, (PostBookmarkResponse) obj);
                        break;
                }
            }
        });
        this.freshChatBtn.setOnClickListener(new K0(this, 2));
        this.ivrNumberBtn.setOnClickListener(new gh0(this, 3));
        this.msgEt.addTextChangedListener(new b(this));
        this.submitBtn.setOnClickListener(new wK0(this, 4));
        this.mailRl.setOnClickListener(new xK0(this, 5));
        this.youTubeIv.setOnClickListener(new Dt1(this, 6));
        this.faceBookIv.setOnClickListener(new yK0(this, 5));
        this.instaGramIv.setOnClickListener(new YH2(this, 8));
        this.telegramIv.setOnClickListener(new y92(this, 4));
        this.callRl.setOnClickListener(new com.penpencil.physicswallah.feature.batch.presentation.fragment.b(this, 1));
        this.whatsAppRl.setOnClickListener(new iY2(this, 3));
        Kv0 a = kw2.a();
        mw2 mw2Var = mw2.a;
        boolean c = a.h.c("neetpg_enable_fresh_chat");
        String g = kw2.a().h.g("telegram_link");
        Intrinsics.checkNotNullExpressionValue(g, "getString(...)");
        this.I0 = g;
        if (!c) {
            this.freshChatLl.setVisibility(8);
            this.contactUsOldFlowLl.setVisibility(0);
            return;
        }
        this.freshChatLl.setVisibility(0);
        this.contactUsOldFlowLl.setVisibility(8);
        try {
            ApplicationInfo applicationInfo = getApplicationContext().getPackageManager().getApplicationInfo(getPackageName(), TcSdkOptions.BUTTON_SHAPE_ROUNDED);
            this.Q0 = applicationInfo;
            this.P0 = applicationInfo.metaData;
        } catch (PackageManager.NameNotFoundException e) {
            e.printStackTrace();
        }
        if (this.Q0 != null) {
            this.N0 = this.P0.getString("FRESH_CHAT_APP_ID");
            this.O0 = this.P0.getString("FRESH_CHAT_APP_KEY");
            final String string = this.P0.getString("FRESH_CHAT_DOMAIN");
            final String str2 = this.N0;
            final String str3 = this.O0;
            Object value = ((rp) this).C0.g.getValue();
            Intrinsics.checkNotNullExpressionValue(value, "getValue(...)");
            ul0 ul0Var = (ul0) value;
            ul0Var.getClass();
            lH1 lh1 = new lH1();
            ul0Var.a.b().getRecentPurchases(5).d(VF2.a()).a(Jc.a()).c(new tl0(lh1));
            lh1.f(this, new b02() {
                public final void a(Object obj) {
                    RecentOrderResponse recentOrderResponse = (RecentOrderResponse) obj;
                    int i2 = NeetPGContactUsActivity.S0;
                    NeetPGContactUsActivity neetPGContactUsActivity = NeetPGContactUsActivity.this;
                    neetPGContactUsActivity.S0();
                    String str4 = str2;
                    String str5 = str3;
                    String str6 = string;
                    if (recentOrderResponse == null) {
                        neetPGContactUsActivity.V0(str4, str5, str6);
                        return;
                    }
                    if (recentOrderResponse.getSuccess()) {
                        List<RecentOrdersData> data = recentOrderResponse.getData();
                        if (data.isEmpty()) {
                            neetPGContactUsActivity.V0(str4, str5, str6);
                            return;
                        }
                        for (RecentOrdersData recentOrdersData : data) {
                            if (recentOrdersData.getOrderDetails() != null) {
                                Iterator it2 = recentOrdersData.getOrderDetails().iterator();
                                while (it2.hasNext()) {
                                    neetPGContactUsActivity.M0.add(((RecentOrderDetails) it2.next()).getName());
                                }
                            }
                        }
                        neetPGContactUsActivity.V0(str4, str5, str6);
                    }
                }
            });
        }
    }
}