package com.mexico.inloancash.fragment;

import android.annotation.SuppressLint;
import android.content.ClipboardManager;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.fragment.app.Fragment;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import com.facebook.AccessToken;
import com.facebook.places.model.PlaceFields;
import com.google.gson.Gson;
import com.indiaholacash.holacash.R;
import com.mexico.inloancash.activity.IndiaBillActivity;
import com.mexico.inloancash.activity.IndiaCommon_SettingActivity;
import com.mexico.inloancash.activity.IndiaLoginActivity;
import com.mexico.inloancash.activity.MainActivity;
import com.mexico.inloancash.bean.INdia_Update_CardInfoListBean;
import com.mexico.inloancash.bean.India_User_PhoneList_Bean;
import org.greenrobot.eventbus.ThreadMode;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import ඓ.ඓ.K.㿎.C0701;
import ඓ.ඓ.K.䁗.C0733;
import ඓ.K.K.K.C1293;
import ῲ.ᨨ.㳳.C1841;
import 㳳.ῲ.K.AbstractC2413;
import 㳳.ῲ.K.C2399;

public class IndiaPersonalFragment extends Fragment {
    public ImageView mHeadImg;
    public TextView mPhone;
    public TextView mine_email;
    public TextView mine_number;
    public TextView person_email;

    /* renamed from: ʬ  reason: contains not printable characters */
    public Unbinder f2676;

    /* renamed from: ඓ  reason: contains not printable characters */
    public String f2677 = "https://www.facebook.com/";

    /* renamed from: ῲ  reason: contains not printable characters */
    public View f2678;

    /* renamed from: 㸾  reason: contains not printable characters */
    public String f2679 = "https://www.instagram.com/";

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

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

        @Override // retrofit2.Callback
        public void onResponse(Call<String> call, Response<String> response) {
            StringBuilder r3 = C1293.m3416("getService onResponse:");
            r3.append(response.body());
            Log.d("loan", r3.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) {
                    IndiaPersonalFragment indiaPersonalFragment = IndiaPersonalFragment.this;
                    indiaPersonalFragment.f2679 = IndiaPersonalFragment.this.f2679 + india_User_PhoneList_Bean.getData().getIns();
                    IndiaPersonalFragment indiaPersonalFragment2 = IndiaPersonalFragment.this;
                    indiaPersonalFragment2.f2677 = IndiaPersonalFragment.this.f2677 + india_User_PhoneList_Bean.getData().getIns();
                }
            }
        }
    }

    @Override // androidx.fragment.app.Fragment
    public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        this.f2678 = layoutInflater.inflate(R.layout.india_activity_mine_view_page_layout_fragment, viewGroup, false);
        this.f2676 = ButterKnife.m1067(this, this.f2678);
        C2399.m6437().m6441(this);
        m1554();
        this.mine_number.setText(C1841.m4788(PlaceFields.PHONE, ""));
        this.mine_email.setText(C1841.m4788("email", ""));
        this.person_email.setText(C1841.m4788("email", ""));
        return this.f2678;
    }

    @Override // androidx.fragment.app.Fragment
    public void onDestroy() {
        super.onDestroy();
        this.f2676.m1069();
    }

    @Override // androidx.fragment.app.Fragment
    public void onDestroyView() {
        super.onDestroyView();
        C2399.m6437().m6440(this);
    }

    @AbstractC2413(threadMode = ThreadMode.MAIN)
    @SuppressLint({"CheckResult"})
    public void onMessageEvent(INdia_Update_CardInfoListBean iNdia_Update_CardInfoListBean) {
    }

    @Override // androidx.fragment.app.Fragment
    public void onResume() {
        super.onResume();
        this.mPhone.setText(C0733.m2154(C1841.m4788("myPhone", "")));
    }

    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.bill_linear /*{ENCODED_INT: 2131296394}*/:
                startActivity(new Intent(getContext(), IndiaBillActivity.class));
                return;
            case R.id.layout_set /*{ENCODED_INT: 2131296652}*/:
            default:
                return;
            case R.id.person_copy /*{ENCODED_INT: 2131296796}*/:
                Toast.makeText(getContext(), "Copia correcta", 0).show();
                ((ClipboardManager) getActivity().getSystemService("clipboard")).setText(this.person_email.getText().toString());
                return;
            case R.id.set_linear /*{ENCODED_INT: 2131296908}*/:
                startActivity(new Intent(getContext(), IndiaCommon_SettingActivity.class));
                return;
            case R.id.tv_bill /*{ENCODED_INT: 2131297034}*/:
            case R.id.tv_feedback /*{ENCODED_INT: 2131297041}*/:
                C1841.m4744(AccessToken.TOKEN_KEY, "");
                C1841.m4766(false);
                MainActivity.f2549 = false;
                startActivity(new Intent(getContext(), IndiaLoginActivity.class));
                ((MainActivity) getActivity()).m1485(0);
                return;
        }
    }

    /* renamed from: 㿎  reason: contains not printable characters */
    public void m1554() {
        Log.d("loan", "getService");
        C0701.f3707.m2131().m2116().enqueue(new C0488());
    }
}
