package com.mexico.inloancash.fragment;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
import android.text.TextUtils;
import android.util.Log;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.core.widget.NestedScrollView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import butterknife.ButterKnife;
import com.facebook.AccessToken;
import com.facebook.places.model.PlaceFields;
import com.google.gson.Gson;
import com.indiaholacash.holacash.R;
import com.mexico.inloancash.MyApplication;
import com.mexico.inloancash.activity.IndiaBankInfoActivity;
import com.mexico.inloancash.activity.IndiaConfirm_LoanActivity;
import com.mexico.inloancash.activity.IndiaLoginActivity;
import com.mexico.inloancash.activity.IndiaWebViewActivity;
import com.mexico.inloancash.activity.MainActivity;
import com.mexico.inloancash.bean.BaseBean;
import com.mexico.inloancash.bean.INdia_Update_CardInfoListBean;
import com.mexico.inloancash.bean.India_MessageInfo_ListBean;
import com.mexico.inloancash.bean.India_UnLogin_Home_ListBean;
import com.mexico.inloancash.bean.India_UrlListBean;
import com.mexico.inloancash.bean.India_User_LoginList_Home_Bean;
import com.mexico.inloancash.bean.India_User_PhoneList_Bean;
import java.io.File;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import ඓ.ඓ.K.ⁱ.C0648;
import ඓ.ඓ.K.㳳.AbstractC0670;
import ඓ.ඓ.K.㳳.AbstractC0671;
import ඓ.ඓ.K.㳳.AbstractC0673;
import ඓ.ඓ.K.㴹.DialogC0674;
import ඓ.ඓ.K.㴹.DialogC0681;
import ඓ.ඓ.K.㿎.AbstractC0700;
import ඓ.ඓ.K.㿎.C0701;
import ඓ.ඓ.K.䁗.AbstractC0736;
import ඓ.ඓ.K.䁗.C0707;
import ඓ.ඓ.K.䁗.C0713;
import ඓ.ඓ.K.䁗.C0733;
import ඓ.K.K.K.C1293;
import ῲ.ᨨ.㳳.C1841;
import 㳳.ῲ.K.C2399;

public class IndiaFirstPageFragment extends C0648 implements AbstractC0671, AbstractC0736, AbstractC0673 {

    /* renamed from: ᑓ  reason: contains not printable characters */
    public static String f2596 = "";

    /* renamed from: 㴪  reason: contains not printable characters */
    public static String f2597 = "";
    public TextView fangkuanhou_amout1;
    public TextView fangkuanhou_amout2;
    public TextView fangkuanhou_amout3;
    public TextView fangkuanhou_date2;
    public RelativeLayout home_title_relative;
    public TextView home_title_text;
    public TextView huankuan_amount;
    public TextView huankuan_damount;
    public RelativeLayout mIndia_DengdaiCard;
    public ImageView mIndia_DengdaiImage;
    public LinearLayout mIndia_FangkuanCard;
    public TextView mIndia_FangkuanhouBottmom;
    public TextView mIndia_FangkuanhouDate;
    public TextView mIndia_FangkuanhouDate1;
    public LinearLayout mIndia_FirstJoinCard;
    public Button mIndia_JujueBottom;
    public TextView mIndia_JujueLine;
    public TextView mIndia_JujuePay;
    public LinearLayout mIndia_JujueVip;
    public Button mIndia_JujueggBotton;
    public RelativeLayout mIndia_JujueggCard;
    public NestedScrollView mIndia_NestedScroll;
    public RelativeLayout mIndia_ShenhejujueCard;
    public LinearLayout mIndia_ShenhetongguoCard;
    public RelativeLayout mIndia_ShenhezhongCard;
    public ImageView mIndia_ShenhezhongImage;
    public SwipeRefreshLayout refresh;

    /* renamed from: ʬ  reason: contains not printable characters */
    public View f2598;

    /* renamed from: Ԕ  reason: contains not printable characters */
    public String f2599;

    /* renamed from: Ԛ  reason: contains not printable characters */
    public String f2600 = "";

    /* renamed from: ؿ  reason: contains not printable characters */
    public String f2601;

    /* renamed from: ݜ  reason: contains not printable characters */
    public boolean f2602;

    /* renamed from: ඓ  reason: contains not printable characters */
    public String f2603 = "";

    /* renamed from: ᓆ  reason: contains not printable characters */
    public DialogC0674 f2604;

    /* renamed from: ᓣ  reason: contains not printable characters */
    public Handler f2605 = new Handler();

    /* renamed from: ᕣ  reason: contains not printable characters */
    public String f2606;

    /* renamed from: ᨨ  reason: contains not printable characters */
    public String f2607;

    /* renamed from: ⁱ  reason: contains not printable characters */
    public int f2608;

    /* renamed from: 㑃  reason: contains not printable characters */
    public String f2609;

    /* renamed from: 㗗  reason: contains not printable characters */
    public String f2610;

    /* renamed from: 㗽  reason: contains not printable characters */
    public int f2611;

    /* renamed from: 㳳  reason: contains not printable characters */
    public String f2612;

    /* renamed from: 㴹  reason: contains not printable characters */
    public String f2613;

    /* renamed from: 㶋  reason: contains not printable characters */
    public AbstractC0671 f2614 = new C0463();

    /* renamed from: 㸾  reason: contains not printable characters */
    public int f2615;

    /* renamed from: 㿎  reason: contains not printable characters */
    public String f2616;

    /* renamed from: 䀟  reason: contains not printable characters */
    public DialogC0681 f2617;

    /* renamed from: 䁗  reason: contains not printable characters */
    public String f2618;

    /* renamed from: com.mexico.inloancash.fragment.IndiaFirstPageFragment$ʬ  reason: contains not printable characters */
    public class C0462 implements AbstractC0670 {
        public C0462(IndiaFirstPageFragment indiaFirstPageFragment) {
        }

        /* renamed from: ῲ  reason: contains not printable characters */
        public void m1523() {
            C1841.m4764("hasShowedCoupon", 1);
        }

        /* renamed from: K  reason: contains not printable characters */
        public void m1524() {
        }
    }

    /* renamed from: com.mexico.inloancash.fragment.IndiaFirstPageFragment$ඓ  reason: contains not printable characters */
    public class C0463 implements AbstractC0671 {
        public C0463() {
        }

        @Override // ඓ.ඓ.K.㳳.AbstractC0671
        /* renamed from: ʬ  reason: contains not printable characters */
        public void m1525() {
        }

        @Override // ඓ.ඓ.K.㳳.AbstractC0671
        /* renamed from: K  reason: contains not printable characters */
        public void m1526() {
            Intent intent = new Intent(IndiaFirstPageFragment.this.getContext(), IndiaBankInfoActivity.class);
            intent.putExtra("orderno", IndiaFirstPageFragment.this.f2600);
            IndiaFirstPageFragment.this.startActivity(intent);
        }
    }

    /* renamed from: com.mexico.inloancash.fragment.IndiaFirstPageFragment$ᨨ  reason: contains not printable characters */
    public class C0464 implements Callback<String> {
        public C0464() {
        }

        @Override // retrofit2.Callback
        public void onFailure(Call<String> call, Throwable th) {
            IndiaFirstPageFragment.this.f3640.m2185();
        }

        @Override // retrofit2.Callback
        public void onResponse(Call<String> call, Response<String> response) {
            if (response.isSuccessful()) {
                India_MessageInfo_ListBean india_MessageInfo_ListBean = (India_MessageInfo_ListBean) new Gson().fromJson(response.body(), India_MessageInfo_ListBean.class);
                if (india_MessageInfo_ListBean.getCode() != 200) {
                    IndiaFirstPageFragment.this.f3640.m2185();
                } else if (india_MessageInfo_ListBean.getData() == null) {
                    IndiaFirstPageFragment indiaFirstPageFragment = IndiaFirstPageFragment.this;
                    indiaFirstPageFragment.f2615 = 1;
                    indiaFirstPageFragment.m1521();
                } else {
                    IndiaFirstPageFragment.this.mIndia_FirstJoinCard.setVisibility(0);
                    IndiaFirstPageFragment.this.home_title_relative.setVisibility(0);
                    IndiaFirstPageFragment.this.home_title_text.setVisibility(8);
                    IndiaFirstPageFragment.this.mIndia_FangkuanCard.setVisibility(8);
                    IndiaFirstPageFragment.this.mIndia_ShenhezhongCard.setVisibility(8);
                    IndiaFirstPageFragment.this.mIndia_ShenhejujueCard.setVisibility(8);
                    IndiaFirstPageFragment.this.mIndia_JujueggCard.setVisibility(8);
                    IndiaFirstPageFragment.this.mIndia_ShenhetongguoCard.setVisibility(8);
                    IndiaFirstPageFragment.this.mIndia_DengdaiCard.setVisibility(8);
                    IndiaFirstPageFragment.this.m1519();
                    if (india_MessageInfo_ListBean.getData().getWork() == 1 && india_MessageInfo_ListBean.getData().getContacts() == 1 && india_MessageInfo_ListBean.getData().getCominfo() == 1 && india_MessageInfo_ListBean.getData().getOcr() == 1 && india_MessageInfo_ListBean.getData().getBankinfo() == 0) {
                        IndiaFirstPageFragment indiaFirstPageFragment2 = IndiaFirstPageFragment.this;
                        indiaFirstPageFragment2.f2602 = true;
                        indiaFirstPageFragment2.f2615 = 2;
                    } else {
                        IndiaFirstPageFragment indiaFirstPageFragment3 = IndiaFirstPageFragment.this;
                        indiaFirstPageFragment3.f2615 = 3;
                        indiaFirstPageFragment3.f2602 = false;
                    }
                    IndiaFirstPageFragment.this.f3640.m2185();
                }
            } else {
                IndiaFirstPageFragment.this.f3640.m2185();
            }
        }
    }

    /* renamed from: com.mexico.inloancash.fragment.IndiaFirstPageFragment$ῲ  reason: contains not printable characters */
    public class C0465 implements Callback<String> {
        public C0465() {
        }

        @Override // retrofit2.Callback
        public void onFailure(Call<String> call, Throwable th) {
        }

        @Override // retrofit2.Callback
        public void onResponse(Call<String> call, Response<String> response) {
            if (response.isSuccessful()) {
                India_UrlListBean india_UrlListBean = (India_UrlListBean) new Gson().fromJson(response.body(), India_UrlListBean.class);
                if (india_UrlListBean.getCode() == 200) {
                    IndiaFirstPageFragment indiaFirstPageFragment = IndiaFirstPageFragment.this;
                    if (indiaFirstPageFragment.f2608 == 1) {
                        indiaFirstPageFragment.f2603 = india_UrlListBean.getData().getProduct_url();
                        return;
                    }
                    indiaFirstPageFragment.f2603 = india_UrlListBean.getData().getH5pay_url();
                    C1841.m4744("payweb", india_UrlListBean.getData().getH5pay_url());
                }
            }
        }
    }

    /* renamed from: com.mexico.inloancash.fragment.IndiaFirstPageFragment$ⁱ  reason: contains not printable characters */
    public class C0466 implements Callback<String> {
        public C0466() {
        }

        @Override // retrofit2.Callback
        public void onFailure(Call<String> call, Throwable th) {
            C1841.m4792(IndiaFirstPageFragment.this.getContext(), IndiaFirstPageFragment.this.getContext().getResources().getString(R.string.india_jianchawang_luo));
            IndiaFirstPageFragment.this.refresh.setRefreshing(false);
            IndiaFirstPageFragment.this.mIndia_NestedScroll.setVisibility(0);
        }

        @Override // retrofit2.Callback
        public void onResponse(Call<String> call, Response<String> response) {
            try {
                if (response.isSuccessful()) {
                    India_User_LoginList_Home_Bean india_User_LoginList_Home_Bean = (India_User_LoginList_Home_Bean) new Gson().fromJson(response.body(), India_User_LoginList_Home_Bean.class);
                    if (india_User_LoginList_Home_Bean.getCode() == 200) {
                        if (india_User_LoginList_Home_Bean.getData() == null) {
                            IndiaFirstPageFragment.this.f2600 = "";
                            INdia_Update_CardInfoListBean iNdia_Update_CardInfoListBean = new INdia_Update_CardInfoListBean();
                            iNdia_Update_CardInfoListBean.setCode(500);
                            iNdia_Update_CardInfoListBean.setOrderno("");
                            C2399.m6437().m6442(iNdia_Update_CardInfoListBean);
                        }
                        if (india_User_LoginList_Home_Bean.getData() != null) {
                            INdia_Update_CardInfoListBean iNdia_Update_CardInfoListBean2 = new INdia_Update_CardInfoListBean();
                            iNdia_Update_CardInfoListBean2.setCode(200);
                            iNdia_Update_CardInfoListBean2.setOrderno(india_User_LoginList_Home_Bean.getData().getOrderno());
                            C2399.m6437().m6442(iNdia_Update_CardInfoListBean2);
                            IndiaFirstPageFragment.this.f2600 = india_User_LoginList_Home_Bean.getData().getOrderno();
                            if (india_User_LoginList_Home_Bean.getData().getModify_bank() == 1) {
                                if (IndiaFirstPageFragment.this.f2617 == null) {
                                    IndiaFirstPageFragment.this.f2617 = new DialogC0681(IndiaFirstPageFragment.this.getContext(), IndiaFirstPageFragment.this.f2614);
                                }
                                IndiaFirstPageFragment.this.f2617.show();
                            }
                            IndiaFirstPageFragment.this.mIndia_FirstJoinCard.setVisibility(8);
                            IndiaFirstPageFragment.this.home_title_relative.setVisibility(8);
                            IndiaFirstPageFragment.this.home_title_text.setVisibility(0);
                            IndiaFirstPageFragment.this.mIndia_FangkuanCard.setVisibility(8);
                            IndiaFirstPageFragment.this.mIndia_ShenhezhongCard.setVisibility(8);
                            IndiaFirstPageFragment.this.mIndia_ShenhejujueCard.setVisibility(8);
                            IndiaFirstPageFragment.this.mIndia_JujueggCard.setVisibility(8);
                            IndiaFirstPageFragment.this.mIndia_ShenhetongguoCard.setVisibility(8);
                            IndiaFirstPageFragment.this.mIndia_DengdaiCard.setVisibility(8);
                            IndiaFirstPageFragment.this.m1519();
                            MainActivity.f2549 = true;
                            new SimpleDateFormat("yyyy/MM/dd");
                            IndiaFirstPageFragment.this.f2613 = india_User_LoginList_Home_Bean.getData().getOrderno();
                            if (india_User_LoginList_Home_Bean.getData().isCoupon()) {
                                IndiaFirstPageFragment.this.m1517(india_User_LoginList_Home_Bean.getData().getCoupon_amount());
                            }
                            if (india_User_LoginList_Home_Bean.getData().getStatus() == 4 && india_User_LoginList_Home_Bean.getData().getIs_reloan() == 0) {
                                if (!String.valueOf(india_User_LoginList_Home_Bean.getData().getId()).equals(C1841.m4751())) {
                                    C1841.m4790();
                                    try {
                                        String str = IndiaFirstPageFragment.this.getContext().getPackageName() + ".firstLoan";
                                        if (!new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS), str + ".txt").exists()) {
                                            C1841.m4741();
                                            try {
                                                new C0713().m2137(IndiaFirstPageFragment.this.getContext(), C0707.m2136(), str);
                                                Log.e("data", "First loan");
                                            } catch (Exception e) {
                                                e.printStackTrace();
                                            }
                                        } else {
                                            Log.e("data", "Not First loan");
                                        }
                                    } catch (Exception e2) {
                                        e2.printStackTrace();
                                    }
                                }
                                C1841.m4763(String.valueOf(india_User_LoginList_Home_Bean.getData().getId()));
                            }
                            int status = india_User_LoginList_Home_Bean.getData().getStatus();
                            if (status != 0) {
                                if (status == 1) {
                                    try {
                                        IndiaFirstPageFragment.this.f2616 = india_User_LoginList_Home_Bean.getData().getDays() + "";
                                        IndiaFirstPageFragment.this.f2607 = india_User_LoginList_Home_Bean.getData().getDamount() + "";
                                        IndiaFirstPageFragment.this.f2610 = india_User_LoginList_Home_Bean.getData().getDamount();
                                        IndiaFirstPageFragment.this.f2606 = india_User_LoginList_Home_Bean.getData().getAmount();
                                        IndiaFirstPageFragment.this.f2618 = india_User_LoginList_Home_Bean.getData().getPay_amount() + "";
                                        IndiaFirstPageFragment.this.f2599 = IndiaFirstPageFragment.this.m1515(Long.valueOf((long) india_User_LoginList_Home_Bean.getData().getAddtime()).longValue());
                                        IndiaFirstPageFragment.this.f2612 = india_User_LoginList_Home_Bean.getData().getService_fee() + "";
                                        IndiaFirstPageFragment.this.f2609 = "0.3";
                                        IndiaFirstPageFragment.this.f2611 = india_User_LoginList_Home_Bean.getData().getConfirmstatus();
                                        IndiaFirstPageFragment.this.f2601 = india_User_LoginList_Home_Bean.getData().getPay_amount();
                                        IndiaFirstPageFragment.this.mIndia_ShenhetongguoCard.setVisibility(0);
                                    } catch (Exception unused) {
                                    }
                                } else if (status == 2) {
                                    IndiaFirstPageFragment.this.mIndia_JujueggCard.setVisibility(0);
                                    IndiaFirstPageFragment.this.f2608 = 1;
                                } else if (status == 4 || status == 5 || status == 7) {
                                    IndiaFirstPageFragment.this.mIndia_FangkuanCard.setVisibility(0);
                                    IndiaFirstPageFragment.this.home_title_relative.setVisibility(0);
                                    IndiaFirstPageFragment.this.home_title_text.setVisibility(8);
                                    IndiaFirstPageFragment.this.huankuan_amount.setText(IndiaFirstPageFragment.this.getResources().getString(R.string.money_symbol) + C0733.m2153(india_User_LoginList_Home_Bean.getData().getPay_amount()));
                                    IndiaFirstPageFragment.this.mIndia_FangkuanhouDate.setText(IndiaFirstPageFragment.this.getResources().getString(R.string.money_symbol) + C0733.m2153(india_User_LoginList_Home_Bean.getData().getPay_amount()));
                                    IndiaFirstPageFragment.this.mIndia_FangkuanhouDate1.setText(IndiaFirstPageFragment.this.m1515(Long.valueOf((long) india_User_LoginList_Home_Bean.getData().getAddtime()).longValue()));
                                    IndiaFirstPageFragment.this.fangkuanhou_date2.setText(IndiaFirstPageFragment.this.m1515(Long.valueOf((long) india_User_LoginList_Home_Bean.getData().getDeadline()).longValue()));
                                    try {
                                        IndiaFirstPageFragment.this.huankuan_damount.setText(IndiaFirstPageFragment.this.getResources().getString(R.string.money_symbol) + C0733.m2153(india_User_LoginList_Home_Bean.getData().getAmount()));
                                        BigDecimal bigDecimal = new BigDecimal(Double.valueOf(india_User_LoginList_Home_Bean.getData().getAmount()).doubleValue());
                                        new BigDecimal(0.3d);
                                        BigDecimal bigDecimal2 = new BigDecimal(0.4d);
                                        BigDecimal bigDecimal3 = new BigDecimal(0.18d);
                                        BigDecimal bigDecimal4 = new BigDecimal(0.05d);
                                        IndiaFirstPageFragment.this.fangkuanhou_amout1.setText(IndiaFirstPageFragment.this.getResources().getString(R.string.money_symbol) + C0733.m2153(india_User_LoginList_Home_Bean.getData().getService_fee()));
                                        IndiaFirstPageFragment.this.fangkuanhou_amout2.setText(IndiaFirstPageFragment.this.getResources().getString(R.string.money_symbol) + C0733.m2153(String.valueOf(bigDecimal.multiply(bigDecimal2).multiply(bigDecimal3).setScale(2, 5))));
                                        IndiaFirstPageFragment.this.fangkuanhou_amout3.setText(IndiaFirstPageFragment.this.getResources().getString(R.string.money_symbol) + C0733.m2153(String.valueOf(bigDecimal.multiply(bigDecimal2).multiply(bigDecimal4).setScale(2, 5))));
                                    } catch (Exception unused2) {
                                    }
                                    IndiaFirstPageFragment.this.f2608 = 2;
                                }
                            } else if (india_User_LoginList_Home_Bean.getData().getCheckstatus() == 0) {
                                IndiaFirstPageFragment.this.mIndia_JujueggCard.setVisibility(0);
                                IndiaFirstPageFragment.this.f2608 = 1;
                            } else if (india_User_LoginList_Home_Bean.getData().getCheckstatus() == 1) {
                                IndiaFirstPageFragment.this.f2616 = india_User_LoginList_Home_Bean.getData().getDays() + "";
                                IndiaFirstPageFragment.this.f2607 = india_User_LoginList_Home_Bean.getData().getDamount() + "";
                                IndiaFirstPageFragment.this.f2610 = india_User_LoginList_Home_Bean.getData().getDamount();
                                IndiaFirstPageFragment.this.f2606 = india_User_LoginList_Home_Bean.getData().getAmount();
                                IndiaFirstPageFragment.this.f2618 = india_User_LoginList_Home_Bean.getData().getPay_amount() + "";
                                IndiaFirstPageFragment.this.f2599 = IndiaFirstPageFragment.this.m1515(Long.valueOf((long) india_User_LoginList_Home_Bean.getData().getAddtime()).longValue());
                                IndiaFirstPageFragment.this.f2612 = india_User_LoginList_Home_Bean.getData().getService_fee() + "";
                                IndiaFirstPageFragment.this.f2609 = "0.3";
                                IndiaFirstPageFragment.this.f2611 = india_User_LoginList_Home_Bean.getData().getConfirmstatus();
                                IndiaFirstPageFragment.this.f2601 = india_User_LoginList_Home_Bean.getData().getPay_amount();
                                IndiaFirstPageFragment.this.mIndia_ShenhetongguoCard.setVisibility(0);
                                new BigDecimal(Double.valueOf(india_User_LoginList_Home_Bean.getData().getAmount()).doubleValue());
                                new BigDecimal(0.3d);
                                new BigDecimal(0.16d);
                                new BigDecimal(0.54d);
                                new BigDecimal(0.3d);
                            } else {
                                IndiaFirstPageFragment.this.mIndia_ShenhezhongCard.setVisibility(0);
                            }
                        } else {
                            MainActivity.f2549 = false;
                            IndiaFirstPageFragment.this.mIndia_FirstJoinCard.setVisibility(0);
                            IndiaFirstPageFragment.this.home_title_relative.setVisibility(0);
                            IndiaFirstPageFragment.this.home_title_text.setVisibility(8);
                            IndiaFirstPageFragment.this.mIndia_FangkuanCard.setVisibility(8);
                            IndiaFirstPageFragment.this.mIndia_ShenhezhongCard.setVisibility(8);
                            IndiaFirstPageFragment.this.mIndia_ShenhejujueCard.setVisibility(8);
                            IndiaFirstPageFragment.this.mIndia_JujueggCard.setVisibility(8);
                            IndiaFirstPageFragment.this.mIndia_ShenhetongguoCard.setVisibility(8);
                            IndiaFirstPageFragment.this.mIndia_DengdaiCard.setVisibility(8);
                            IndiaFirstPageFragment.this.m1519();
                        }
                    } else if (india_User_LoginList_Home_Bean.getCode() == 401) {
                        C1841.m4744(AccessToken.TOKEN_KEY, "");
                        C1841.m4766(false);
                        MainActivity.f2549 = false;
                        IndiaFirstPageFragment.this.startActivity(new Intent(IndiaFirstPageFragment.this.getContext(), IndiaLoginActivity.class));
                    } else {
                        C1841.m4792(IndiaFirstPageFragment.this.getContext(), IndiaFirstPageFragment.this.getContext().getResources().getString(R.string.india_jiekoucuo_wu));
                    }
                    IndiaFirstPageFragment.this.f3640.m2185();
                } else {
                    IndiaFirstPageFragment.this.f3640.m2185();
                }
                IndiaFirstPageFragment.this.m1513();
            } catch (Exception unused3) {
                IndiaFirstPageFragment.this.f3640.m2185();
            }
            IndiaFirstPageFragment.this.refresh.setRefreshing(false);
            IndiaFirstPageFragment.this.mIndia_NestedScroll.setVisibility(0);
        }
    }

    /* renamed from: com.mexico.inloancash.fragment.IndiaFirstPageFragment$K  reason: contains not printable characters */
    public class C0467 implements SwipeRefreshLayout.AbstractC0289 {

        /* renamed from: com.mexico.inloancash.fragment.IndiaFirstPageFragment$K$K  reason: contains not printable characters */
        public class RunnableC0468 implements Runnable {
            public RunnableC0468() {
            }

            public void run() {
                IndiaFirstPageFragment.this.m1512();
            }
        }

        public C0467() {
        }

        @Override // androidx.swiperefreshlayout.widget.SwipeRefreshLayout.AbstractC0289
        /* renamed from: K  reason: contains not printable characters */
        public void m1527() {
            IndiaFirstPageFragment.this.f2605.postDelayed(new RunnableC0468(), 1000);
        }
    }

    /* renamed from: com.mexico.inloancash.fragment.IndiaFirstPageFragment$㳳  reason: contains not printable characters */
    public class C0469 implements Callback<String> {
        public C0469(IndiaFirstPageFragment indiaFirstPageFragment) {
        }

        @Override // retrofit2.Callback
        public void onFailure(Call<String> call, Throwable th) {
        }

        @Override // retrofit2.Callback
        public void onResponse(Call<String> call, Response<String> response) {
            StringBuilder r2 = C1293.m3416("index getService onResponse:");
            r2.append(response.body());
            Log.d("loan", r2.toString());
            if (response.isSuccessful()) {
                India_User_PhoneList_Bean india_User_PhoneList_Bean = (India_User_PhoneList_Bean) new Gson().fromJson(response.body(), India_User_PhoneList_Bean.class);
                if (india_User_PhoneList_Bean.getCode() == 200) {
                    C1841.m4744("email", india_User_PhoneList_Bean.getData().getE_mail());
                    C1841.m4744(PlaceFields.PHONE, india_User_PhoneList_Bean.getData().getTelephone());
                }
            }
        }
    }

    /* renamed from: com.mexico.inloancash.fragment.IndiaFirstPageFragment$㴹  reason: contains not printable characters */
    public class C0470 implements Callback<String> {
        public C0470() {
        }

        @Override // retrofit2.Callback
        public void onFailure(Call<String> call, Throwable th) {
            C1841.m4792(IndiaFirstPageFragment.this.getContext(), IndiaFirstPageFragment.this.getContext().getResources().getString(R.string.india_jianchawang_luo));
            IndiaFirstPageFragment.this.refresh.setRefreshing(false);
            IndiaFirstPageFragment.this.mIndia_NestedScroll.setVisibility(0);
            IndiaFirstPageFragment.this.f3640.m2185();
        }

        @Override // retrofit2.Callback
        public void onResponse(Call<String> call, Response<String> response) {
            try {
                if (response.isSuccessful()) {
                    India_UnLogin_Home_ListBean india_UnLogin_Home_ListBean = (India_UnLogin_Home_ListBean) new Gson().fromJson(response.body(), India_UnLogin_Home_ListBean.class);
                    if (india_UnLogin_Home_ListBean.getCode() == 200) {
                        india_UnLogin_Home_ListBean.getData().getTop_desc_fq().split("\\*");
                        C1841.m4764("authority", india_UnLogin_Home_ListBean.getData().getAuthority());
                    } else {
                        C1841.m4792(IndiaFirstPageFragment.this.getContext(), IndiaFirstPageFragment.this.getContext().getResources().getString(R.string.india_jiekoucuo_wu));
                    }
                }
            } catch (Exception unused) {
            }
            IndiaFirstPageFragment.this.refresh.setRefreshing(false);
            IndiaFirstPageFragment.this.mIndia_NestedScroll.setVisibility(0);
            if (!C1841.m4767()) {
                IndiaFirstPageFragment.this.f3640.m2185();
            }
        }
    }

    /* renamed from: com.mexico.inloancash.fragment.IndiaFirstPageFragment$㸾  reason: contains not printable characters */
    public class RunnableC0471 implements Runnable {
        public RunnableC0471() {
        }

        public void run() {
            IndiaFirstPageFragment.this.refresh.setRefreshing(false);
        }
    }

    /* renamed from: com.mexico.inloancash.fragment.IndiaFirstPageFragment$㿎  reason: contains not printable characters */
    public class C0472 implements Callback<String> {
        public C0472() {
        }

        @Override // retrofit2.Callback
        public void onFailure(Call<String> call, Throwable th) {
            IndiaFirstPageFragment.this.f3640.m2185();
        }

        @Override // retrofit2.Callback
        public void onResponse(Call<String> call, Response<String> response) {
            try {
                IndiaFirstPageFragment.this.f3640.m2185();
                if (response.isSuccessful()) {
                    BaseBean baseBean = (BaseBean) new Gson().fromJson(response.body(), BaseBean.class);
                    if (baseBean.getCode() == 200) {
                        IndiaFirstPageFragment.this.m1521();
                    } else if (baseBean.getCode() == 401) {
                        C1841.m4744(AccessToken.TOKEN_KEY, "");
                        C1841.m4766(false);
                        MainActivity.f2549 = false;
                        IndiaFirstPageFragment.this.startActivity(new Intent(IndiaFirstPageFragment.this.getContext(), IndiaLoginActivity.class));
                    }
                }
            } catch (Exception unused) {
                IndiaFirstPageFragment.this.f3640.m2185();
            }
        }
    }

    @Override // androidx.fragment.app.Fragment
    public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        this.f2598 = layoutInflater.inflate(R.layout.india_activity_first_view_page_layout_fragment, viewGroup, false);
        ButterKnife.m1067(this, this.f2598);
        this.mIndia_JujueLine.getPaint().setFlags(16);
        this.mIndia_JujueLine.getPaint().setAntiAlias(true);
        this.refresh.setColorSchemeResources(R.color.theme);
        this.refresh.setRefreshing(false);
        this.refresh.m972(false, 0, (int) TypedValue.applyDimension(1, 24.0f, getResources().getDisplayMetrics()));
        this.refresh.setOnRefreshListener(new C0467());
        this.refresh.post(new RunnableC0471());
        getActivity();
        m1522();
        return this.f2598;
    }

    @Override // androidx.fragment.app.Fragment
    public void onResume() {
        super.onResume();
        this.f3640.m2183();
        m1512();
    }

    public void onViewClicked(View view) {
        Intent intent = new Intent(getContext(), IndiaWebViewActivity.class);
        intent.putExtra("web", this.f2603);
        intent.putExtra("type", this.f2608);
        intent.putExtra("orderno", this.f2613);
        switch (view.getId()) {
            case R.id.fangkuanhou_bottmom /*{ENCODED_INT: 2131296549}*/:
            case R.id.jujue_bottom /*{ENCODED_INT: 2131296632}*/:
            case R.id.jujue_vip /*{ENCODED_INT: 2131296635}*/:
                StringBuilder r4 = C1293.m3416("还款 url:");
                r4.append(this.f2603);
                Log.d("loan", r4.toString());
                new HashMap().put("product", "product");
                C1841.m4749();
                startActivity(intent);
                return;
            case R.id.first_bottom /*{ENCODED_INT: 2131296559}*/:
                if (C1841.m4767()) {
                    m1520();
                    return;
                } else {
                    startActivity(new Intent(getContext(), IndiaLoginActivity.class));
                    return;
                }
            case R.id.jujuegg_botton /*{ENCODED_INT: 2131296636}*/:
                if (!TextUtils.isEmpty(this.f2603)) {
                    try {
                        startActivity(new Intent("android.intent.action.VIEW", Uri.parse(C1293.m3414(new StringBuilder(), this.f2603, "?AppName=gg"))));
                        return;
                    } catch (Exception e) {
                        e.printStackTrace();
                        return;
                    }
                } else {
                    return;
                }
            case R.id.shenhetongguo_bottom /*{ENCODED_INT: 2131296914}*/:
                Intent intent2 = new Intent(getContext(), IndiaConfirm_LoanActivity.class);
                intent2.putExtra("order", this.f2613);
                intent2.putExtra("day", this.f2616);
                intent2.putExtra("damount", this.f2607);
                intent2.putExtra("fuwu", this.f2612);
                intent2.putExtra("allMount", this.f2606);
                intent2.putExtra("lixi", this.f2609);
                intent2.putExtra("zongshu", this.f2618);
                intent2.putExtra("riqi", this.f2599);
                startActivity(intent2);
                return;
            default:
                return;
        }
    }

    @Override // ඓ.ඓ.K.㳳.AbstractC0671
    /* renamed from: ʬ  reason: contains not printable characters */
    public void m1511() {
    }

    /* renamed from: Ԕ  reason: contains not printable characters */
    public void m1512() {
        m1514();
        if (C1841.m4767()) {
            m1518();
            return;
        }
        this.mIndia_FirstJoinCard.setVisibility(0);
        this.home_title_relative.setVisibility(0);
        this.home_title_text.setVisibility(8);
        this.mIndia_FangkuanCard.setVisibility(8);
        this.mIndia_ShenhezhongCard.setVisibility(8);
        this.mIndia_ShenhejujueCard.setVisibility(8);
        this.mIndia_JujueggCard.setVisibility(8);
        this.mIndia_ShenhetongguoCard.setVisibility(8);
        this.mIndia_DengdaiCard.setVisibility(8);
        m1519();
    }

    /* renamed from: ᕣ  reason: contains not printable characters */
    public void m1513() {
        C0701.f3707.m2131().m2109().enqueue(new C0465());
    }

    /* renamed from: ᨨ  reason: contains not printable characters */
    public void m1514() {
        C0701.f3707.m2131().m2106().enqueue(new C0470());
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public final String m1515(long j) {
        return new SimpleDateFormat("dd/MM/yyyy").format(new Date(j * 1000));
    }

    @Override // ඓ.ඓ.K.㳳.AbstractC0671
    /* renamed from: K  reason: contains not printable characters */
    public void m1516() {
        startActivity(new Intent(getContext(), IndiaLoginActivity.class));
    }

    /* renamed from: 㑃  reason: contains not printable characters */
    public void m1518() {
        AbstractC0700 r0 = C0701.f3707.m2131();
        String r1 = C1841.m4788(AccessToken.TOKEN_KEY, "");
        MyApplication.m1353();
        r0.m2118(r1, MyApplication.f2291).enqueue(new C0464());
    }

    /* renamed from: 㗗  reason: contains not printable characters */
    public final void m1519() {
        if (this.mIndia_FirstJoinCard.getVisibility() == 0) {
            this.refresh.setBackgroundColor(-1);
        } else {
            this.refresh.setBackgroundColor(-526345);
        }
    }

    /* renamed from: 㳳  reason: contains not printable characters */
    public void m1520() {
        this.f3640.m2183();
        C0701.f3707.m2131().m2127(C1841.m4788(AccessToken.TOKEN_KEY, ""), MyApplication.f2291).enqueue(new C0472());
    }

    /* renamed from: 㿎  reason: contains not printable characters */
    public void m1521() {
        C0701.f3707.m2131().m2103(C1841.m4788(AccessToken.TOKEN_KEY, ""), MyApplication.f2291).enqueue(new C0466());
    }

    /* renamed from: 䁗  reason: contains not printable characters */
    public void m1522() {
        Log.d("loan", "index getService");
        C0701.f3707.m2131().m2116().enqueue(new C0469(this));
    }

    /* renamed from: K  reason: contains not printable characters */
    public final void m1517(double d) {
        if (C1841.m4771("hasShowedCoupon", 0) == 0) {
            if (this.f2604 == null) {
                this.f2604 = new DialogC0674(getActivity(), new C0462(this), d);
            }
            this.f2604.show();
        }
    }
}
