package com.mexico.inloancash.activity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import butterknife.ButterKnife;
import com.facebook.AccessToken;
import com.google.gson.Gson;
import com.indiaholacash.holacash.R;
import com.mexico.inloancash.MyApplication;
import com.mexico.inloancash.bean.BaseBean;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import ඓ.ඓ.K.㴹.DialogC0687;
import ඓ.ඓ.K.㿎.C0701;
import ῲ.ᨨ.㳳.C1841;

public class IndiaConfirm_LoanActivity extends BaseActivity {
    public LinearLayout confirm_loan_linear;
    public Button mIndiaBtnJqBottom;
    public ImageView mIndiaIvChoose;
    public TextView mIndiaService;
    public TextView mIndiaTotal_Money;
    public TextView mIndiaTvJks;
    public TextView mIndiaTvLoanDay;
    public TextView mIndiaTvLoanDetailsInfo;
    public TextView mIndiaTvMoney;
    public TextView mIndiaTvff;
    public ImageView mIndia_GonBack;
    public TextView title;

    /* renamed from: ඓ  reason: contains not printable characters */
    public DialogC0687 f2400;

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

    /* renamed from: ⁱ  reason: contains not printable characters */
    public boolean f2402 = true;

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

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

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

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

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

        @Override // retrofit2.Callback
        public void onResponse(Call<String> call, Response<String> response) {
            if (response.isSuccessful()) {
                BaseBean baseBean = (BaseBean) new Gson().fromJson(response.body(), BaseBean.class);
                if (baseBean.getCode() == 200) {
                    C1841.m4792((Context) IndiaConfirm_LoanActivity.this, "Successful cancellation");
                    IndiaConfirm_LoanActivity.this.finish();
                } else if (baseBean.getCode() == 401) {
                    C1841.m4744(AccessToken.TOKEN_KEY, "");
                    C1841.m4766(false);
                    MainActivity.f2549 = false;
                    IndiaConfirm_LoanActivity.this.startActivity(new Intent(IndiaConfirm_LoanActivity.this, IndiaLoginActivity.class));
                } else {
                    C1841.m4792((Context) IndiaConfirm_LoanActivity.this, baseBean.getMsg());
                }
            }
            IndiaConfirm_LoanActivity.this.f2296.m2185();
        }
    }

    /* renamed from: com.mexico.inloancash.activity.IndiaConfirm_LoanActivity$K  reason: contains not printable characters */
    public class View$OnClickListenerC0389 implements View.OnClickListener {
        public View$OnClickListenerC0389() {
        }

        public void onClick(View view) {
            IndiaConfirm_LoanActivity.this.f2400.dismiss();
            IndiaConfirm_LoanActivity.this.m1408();
        }
    }

    @Override // androidx.activity.ComponentActivity, androidx.core.app.ComponentActivity, com.mexico.inloancash.activity.BaseActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.india_activity_confirm_view_loan_layout);
        ButterKnife.m1066(this);
        this.title.setText("Rincian Pinjaman");
        this.f2404 = getIntent().getStringExtra("order");
        this.f2405 = getIntent().getStringExtra("day");
        getIntent().getStringExtra("daozhang");
        getIntent().getStringExtra("fuwu");
        this.f2401 = getIntent().getStringExtra("allMount");
        getIntent().getStringExtra("lixi");
        this.f2403 = getIntent().getStringExtra("zongshu");
        TextView textView = this.mIndiaTvJks;
        textView.setText(getResources().getString(R.string.money_symbol) + this.f2401);
        TextView textView2 = this.mIndiaTvMoney;
        textView2.setText(getResources().getString(R.string.money_symbol) + this.f2401);
        TextView textView3 = this.mIndiaTvLoanDetailsInfo;
        textView3.setText(getResources().getString(R.string.money_symbol) + this.f2403);
        getIntent().getStringExtra("damount");
        this.mIndiaTotal_Money.setText(getIntent().getStringExtra("riqi"));
        getIntent().getStringExtra("payAmount");
        TextView textView4 = this.mIndiaTvff;
        textView4.setText(this.f2405 + " " + getResources().getString(R.string.days));
        TextView textView5 = this.mIndiaTvLoanDay;
        textView5.setText(this.f2405 + " " + getResources().getString(R.string.days));
        this.mIndiaBtnJqBottom.setSelected(true);
    }

    @Override // androidx.appcompat.app.AppCompatActivity
    public boolean onKeyDown(int i, KeyEvent keyEvent) {
        if (i == 4) {
            finish();
        }
        return super.onKeyDown(i, keyEvent);
    }

    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.choose_serve /*{ENCODED_INT: 2131296436}*/:
                if (this.f2402) {
                    this.mIndiaIvChoose.setImageResource(R.mipmap.india_gocash_picture_land_choice);
                    this.f2402 = false;
                    this.mIndiaBtnJqBottom.setSelected(false);
                    return;
                }
                this.mIndiaIvChoose.setImageResource(R.mipmap.india_gocash_picture_land_choice_ed);
                this.f2402 = true;
                this.mIndiaBtnJqBottom.setSelected(true);
                return;
            case R.id.jieqian_bottom /*{ENCODED_INT: 2131296630}*/:
                if (this.f2402) {
                    finish();
                    return;
                } else {
                    C1841.m4792((Context) this, "Please read and agree to the terms of service");
                    return;
                }
            case R.id.logon_back /*{ENCODED_INT: 2131296676}*/:
                finish();
                return;
            case R.id.service /*{ENCODED_INT: 2131296905}*/:
                Intent intent = new Intent(this, IndiaWeb_ViewActivity.class);
                intent.putExtra("webUrl", "https://adminmxwj.cashbeemuch.com/appapi/login/prestamos_privacy_agreement.html");
                intent.putExtra("titleName", "Política de Privacidad");
                startActivity(intent);
                return;
            case R.id.tv_cancel_order /*{ENCODED_INT: 2131297036}*/:
                this.f2400 = new DialogC0687(this);
                this.f2400.show();
                this.f2400.findViewById(R.id.btn_ok).setOnClickListener(new View$OnClickListenerC0389());
                return;
            default:
                return;
        }
    }

    /* renamed from: ؿ  reason: contains not printable characters */
    public void m1408() {
        this.f2296.m2183();
        C0701.f3707.m2131().m2104(C1841.m4788(AccessToken.TOKEN_KEY, ""), MyApplication.f2291, this.f2404).enqueue(new C0388());
    }
}
