导航菜单

页面标题

页面副标题

Cashalo v2.25.0.0 - b.java 源代码

正在查看: Cashalo v2.25.0.0 应用的 b.java JAVA 源代码文件

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


package com.oriente.cashalo.page.fragment;

import android.content.Intent;
import android.content.res.ColorStateList;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.listener.OnItemChildClickListener;
import com.fullstory.FS;
import com.oriente.adapter.R;
import com.oriente.adapter.analytics.impl.CommonAnalytics;
import com.oriente.adapter.config.ValueConfig;
import com.oriente.borrow.service.BorrowService;
import com.oriente.cashalo.businese.b;
import com.oriente.cashalo.businese.verify.OptionUtil;
import com.oriente.cashalo.page.activity.CommonActivity;
import com.oriente.cashalo.page.adapter.CancelLoanReasonAdapter;
import com.oriente.cashalo.service.CommonService;
import com.oriente.cashalo.service.model.borrow.BorrowInfo;
import com.oriente.cashalo.service.model.config.ConfigSwitch;
import com.oriente.cashalo.service.model.consumer.GetUpdateReceiptBean;
import com.oriente.cashalo.service.model.consumer.IPriceQueryModel;
import com.oriente.cashalo.service.model.loan.CashacartCashData;
import com.oriente.cashalo.service.model.loan.ConsumerOrderInfo;
import com.oriente.cashalo.service.model.loan.ExclusiveProductInfoModel;
import com.oriente.cashalo.service.model.loan.HomeDetailBaseModel;
import com.oriente.cashalo.service.model.loan.HomeDetailEmptyModel;
import com.oriente.cashalo.service.model.loan.HomeItemCashaCartModel;
import com.oriente.cashalo.service.model.loan.HomeItemExclusiveModel;
import com.oriente.cashalo.service.model.loan.HomeItemFeedBackModel;
import com.oriente.cashalo.service.model.loan.LoanDetailsModel;
import com.oriente.cashalo.service.model.loan.PurchaseItemBean;
import com.oriente.cashalo.service.model.loan.RecommendStoreModel;
import com.oriente.cashalo.service.model.loan.StoreRecommendModel;
import com.oriente.cashalo.service.model.ver.KeyResult;
import com.oriente.cashalo.service.model.ver.VerifyOptionModel;
import com.oriente.cashalo.utils.BottomDialogUtils;
import com.oriente.cashalo.utils.OrientUtils;
import com.oriente.core.page.PageManager;
import com.oriente.core.page.RouterUri;
import com.oriente.core.page.jump.Jumper;
import com.oriente.core.router.Router;
import com.oriente.core.router.RouterBuilder;
import com.oriente.core.router.RouterScene;
import com.oriente.core.store.cache.GlobalSession;
import com.oriente.core.utils.ResUtils;
import com.oriente.core.utils.StringUtils;
import com.oriente.core.utils.ToastUtils;
import com.oriente.http.callback.RequestCallback;
import com.oriente.http.model.RequestContext;
import com.oriente.http.model.RequestResult;
import com.oriente.manager.OrientManager;
import com.oriente.plugin.PluginResult;
import com.oriente.plugin.PluginResultCallback;
import com.oriente.plugin.module.AppPlugin;
import com.oriente.plugin.module.BorrowPlugin;
import com.oriente.plugin.module.UserPlugin;
import com.oriente.plugin.module.VerifyPlugin;
import com.oriente.uikit.group.NestRefreshLayout;
import com.oriente.uikit.group.PageScrollView;
import com.oriente.uimodule.alert.Alert;
import com.oriente.uimodule.alert.AlertBuilder;
import com.oriente.uimodule.alert.DialogBuilder;
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Ref;
import kotlin.jvm.internal.StringCompanionObject;

@Metadata(d1 = {"\u0000®\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0010\u000e\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0006\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\f\n\u0002\u0018\u0002\n\u0002\b\u0006\u0018\u00002\u00020\u00012\u00020\u00022\u00020\u00032\u00020\u0004B\u0007¢\u0006\u0004\b\u0005\u0010\u0006J\u000f\u0010\b\u001a\u00020\u0007H\u0002¢\u0006\u0004\b\b\u0010\u0006J\u000f\u0010\t\u001a\u00020\u0007H\u0002¢\u0006\u0004\b\t\u0010\u0006J\u001f\u0010\r\u001a\u00020\u00072\u000e\u0010\f\u001a\n\u0012\u0004\u0012\u00020\u000b\u0018\u00010\nH\u0002¢\u0006\u0004\b\r\u0010\u000eJ\u000f\u0010\u000f\u001a\u00020\u0007H\u0002¢\u0006\u0004\b\u000f\u0010\u0006J\u001f\u0010\u0012\u001a\u00020\u00112\u000e\u0010\u0010\u001a\n\u0012\u0004\u0012\u00020\u000b\u0018\u00010\nH\u0002¢\u0006\u0004\b\u0012\u0010\u0013J\u001d\u0010\u0016\u001a\u00020\u00072\f\u0010\u0015\u001a\b\u0012\u0004\u0012\u00020\u00140\nH\u0002¢\u0006\u0004\b\u0016\u0010\u000eJ\u000f\u0010\u0017\u001a\u00020\u0007H\u0002¢\u0006\u0004\b\u0017\u0010\u0006J\u000f\u0010\r\u001a\u00020\u0011H\u0002¢\u0006\u0004\b\r\u0010\u0018J\u0017\u0010\b\u001a\u00020\u00072\u0006\u0010\u0019\u001a\u00020\u000bH\u0002¢\u0006\u0004\b\b\u0010\u001aJ\u0017\u0010\r\u001a\u00020\u00072\u0006\u0010\u0019\u001a\u00020\u000bH\u0002¢\u0006\u0004\b\r\u0010\u001aJ\u0017\u0010\u0017\u001a\u00020\u00072\u0006\u0010\u0019\u001a\u00020\u000bH\u0002¢\u0006\u0004\b\u0017\u0010\u001aJ\u0019\u0010\u0012\u001a\u0004\u0018\u00010\u001b2\u0006\u0010\u0019\u001a\u00020\u000bH\u0002¢\u0006\u0004\b\u0012\u0010\u001cJ\u0017\u0010\u0016\u001a\u00020\u00072\u0006\u0010\u0019\u001a\u00020\u000bH\u0002¢\u0006\u0004\b\u0016\u0010\u001aJ\u0017\u0010\u001d\u001a\u00020\u00072\u0006\u0010\u0019\u001a\u00020\u000bH\u0002¢\u0006\u0004\b\u001d\u0010\u001aJ\u0017\u0010\u001e\u001a\u00020\u00072\u0006\u0010\u0019\u001a\u00020\u000bH\u0002¢\u0006\u0004\b\u001e\u0010\u001aJ\u0017\u0010\t\u001a\u00020\u00072\u0006\u0010\u0019\u001a\u00020\u000bH\u0002¢\u0006\u0004\b\t\u0010\u001aJ\u0017\u0010\u000f\u001a\u00020\u00072\u0006\u0010\u0019\u001a\u00020\u000bH\u0002¢\u0006\u0004\b\u000f\u0010\u001aJ!\u0010\u001e\u001a\u00020\u00072\b\u0010\u001f\u001a\u0004\u0018\u00010\u000b2\u0006\u0010 \u001a\u00020\u001bH\u0002¢\u0006\u0004\b\u001e\u0010!J\u000f\u0010\u0016\u001a\u00020\u0007H\u0002¢\u0006\u0004\b\u0016\u0010\u0006J\u000f\u0010\u001d\u001a\u00020\u0007H\u0002¢\u0006\u0004\b\u001d\u0010\u0006J\u000f\u0010\u0012\u001a\u00020\u0011H\u0002¢\u0006\u0004\b\u0012\u0010\u0018J%\u0010%\u001a\u00020\u00072\f\u0010#\u001a\b\u0012\u0002\b\u0003\u0018\u00010\"2\u0006\u0010$\u001a\u00020\u0011H\u0016¢\u0006\u0004\b%\u0010&J!\u0010,\u001a\u00020+2\u0006\u0010(\u001a\u00020'2\b\u0010*\u001a\u0004\u0018\u00010)H\u0014¢\u0006\u0004\b,\u0010-J-\u00102\u001a\u00020\u00072\b\u0010.\u001a\u0004\u0018\u00010+2\b\u00100\u001a\u0004\u0018\u00010/2\b\u00101\u001a\u0004\u0018\u00010/H\u0014¢\u0006\u0004\b2\u00103J\u001d\u0010\u001d\u001a\u00020\u00072\u000e\u0010\f\u001a\n\u0012\u0004\u0012\u00020\u000b\u0018\u00010\n¢\u0006\u0004\b\u001d\u0010\u000eJ\u0017\u00105\u001a\u00020\u00072\u0006\u00104\u001a\u00020\u0011H\u0016¢\u0006\u0004\b5\u00106J#\u0010\u001e\u001a\u00020\u00072\u0012\u0010\u0010\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u000b0\n07H\u0016¢\u0006\u0004\b\u001e\u00108J\u001d\u0010:\u001a\u00020\u00072\f\u0010\u0010\u001a\b\u0012\u0004\u0012\u00020907H\u0016¢\u0006\u0004\b:\u00108J\u001d\u0010<\u001a\u00020\u00072\f\u0010\u0010\u001a\b\u0012\u0004\u0012\u00020;07H\u0016¢\u0006\u0004\b<\u00108J3\u0010\r\u001a\u00020\u00072\u0012\u0010\u0010\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020=0\n072\u000e\u0010>\u001a\n\u0012\u0004\u0012\u00020=\u0018\u00010\nH\u0016¢\u0006\u0004\b\r\u0010?J/\u0010D\u001a\u00020\u00072\u000e\u0010A\u001a\n\u0012\u0002\b\u0003\u0012\u0002\b\u00030@2\u0006\u0010.\u001a\u00020+2\u0006\u0010C\u001a\u00020BH\u0016¢\u0006\u0004\bD\u0010EJ\u0019\u0010G\u001a\u00020\u00072\b\u0010F\u001a\u0004\u0018\u00010+H\u0016¢\u0006\u0004\bG\u0010HJ\u001d\u0010J\u001a\u00020\u00072\f\u0010\u0010\u001a\b\u0012\u0004\u0012\u00020I07H\u0016¢\u0006\u0004\bJ\u00108R\u0018\u0010M\u001a\u0004\u0018\u00010K8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u0012\u0010LR\u001c\u0010P\u001a\b\u0012\u0004\u0012\u00020\u00000N8\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b\r\u0010OR\u0016\u0010R\u001a\u00020\u00118\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u001d\u0010QR\u0016\u0010T\u001a\u00020B8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u0016\u0010SR\u0016\u0010U\u001a\u00020B8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\t\u0010SR\u0016\u0010V\u001a\u00020\u00118\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u0017\u0010QR\u0016\u0010W\u001a\u00020\u00118\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u000f\u0010QR\"\u0010Z\u001a\u00020\u00118\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b\b\u0010Q\u001a\u0004\bX\u0010\u0018\"\u0004\bY\u00106R\u0018\u0010^\u001a\u0004\u0018\u00010[8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\\\u0010]R\u0014\u0010`\u001a\u00020[8BX\u0082\u0004¢\u0006\u0006\u001a\u0004\b\u001e\u0010_¨\u0006a"}, d2 = {"Lcom/oriente/cashalo/page/fragment/b;", "Lcom/oriente/cashalo/page/fragment/s;", "Lcom/oriente/cashalo/businese/b$b;", "Landroid/view/View$OnClickListener;", "Lcom/chad/library/adapter/base/listener/OnItemChildClickListener;", "<init>", "()V", "", "i", "f", "", "Lcom/oriente/cashalo/service/model/loan/LoanDetailsModel;", "loanList", "c", "(Ljava/util/List;)V", "h", "result", "", "b", "(Ljava/util/List;)Z", "Lcom/oriente/cashalo/service/model/loan/HomeDetailBaseModel;", "item", "e", "g", "()Z", "loanDetail", "(Lcom/oriente/cashalo/service/model/loan/LoanDetailsModel;)V", "", "(Lcom/oriente/cashalo/service/model/loan/LoanDetailsModel;)Ljava/lang/String;", "d", "a", "details", "payNow", "(Lcom/oriente/cashalo/service/model/loan/LoanDetailsModel;Ljava/lang/String;)V", "Lcom/oriente/uikit/group/NestRefreshLayout;", "p0", "p1", "onRefresh", "(Lcom/oriente/uikit/group/NestRefreshLayout;Z)V", "Landroid/view/LayoutInflater;", "inflater", "Landroid/view/ViewGroup;", "container", "Landroid/view/View;", "onCreateContentView", "(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;)Landroid/view/View;", "view", "Landroid/os/Bundle;", "argument", "savedInstanceState", "onContentViewCreated", "(Landroid/view/View;Landroid/os/Bundle;Landroid/os/Bundle;)V", "visible", "onVisibleChanged", "(Z)V", "Lcom/oriente/http/model/RequestResult;", "(Lcom/oriente/http/model/RequestResult;)V", "Lcom/oriente/cashalo/service/model/loan/CashacartCashData;", "n", "Lcom/oriente/cashalo/service/model/loan/ExclusiveProductInfoModel;", "m", "Lcom/oriente/cashalo/service/model/config/ConfigSwitch;", "data", "(Lcom/oriente/http/model/RequestResult;Ljava/util/List;)V", "Lcom/chad/library/adapter/base/BaseQuickAdapter;", "adapter", "", "position", "onItemChildClick", "(Lcom/chad/library/adapter/base/BaseQuickAdapter;Landroid/view/View;I)V", "v", "onClick", "(Landroid/view/View;)V", "", "k", "Lcom/oriente/cashalo/page/fragment/i;", "Lcom/oriente/cashalo/page/fragment/i;", "mCurrentLoanAdapter", "Lcom/oriente/cashalo/businese/b;", "Lcom/oriente/cashalo/businese/b;", "mCurrentLoanBiz", "Z", "mEmpty", "I", "mRateUsSwitchReadyCount", "mRateUsSwitchActualCount", "mExclusiveReady", "mCashaCartReady", "getHasAddRateUs", "setHasAddRateUs", "hasAddRateUs", "Lcom/oriente/cashalo/databinding/g;", "j", "Lcom/oriente/cashalo/databinding/g;", "_binding", "()Lcom/oriente/cashalo/databinding/g;", "binding", "app_release"}, k = 1, mv = {1, 9, 0})
public final class b extends s implements b.InterfaceC0008b, View.OnClickListener, OnItemChildClickListener {

    private com.oriente.cashalo.page.fragment.i mCurrentLoanAdapter;

    private com.oriente.cashalo.businese.b<b> mCurrentLoanBiz;

    private boolean mEmpty;

    private int mRateUsSwitchReadyCount;

    private int mRateUsSwitchActualCount;

    private boolean mExclusiveReady;

    private boolean mCashaCartReady;

    private boolean hasAddRateUs;

    private com.oriente.cashalo.databinding.g _binding;

    @Metadata(d1 = {"\u0000\u001a\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u00012*\u0010\u0002\u001a&\u0012\f\u0012\n \u0005*\u0004\u0018\u00010\u00040\u0004 \u0005*\u0012\u0012\f\u0012\n \u0005*\u0004\u0018\u00010\u00040\u0004\u0018\u00010\u00030\u00032*\u0010\u0006\u001a&\u0012\f\u0012\n \u0005*\u0004\u0018\u00010\u00040\u0004 \u0005*\u0012\u0012\f\u0012\n \u0005*\u0004\u0018\u00010\u00040\u0004\u0018\u00010\u00070\u0007H\n¢\u0006\u0002\b\b"}, d2 = {"<anonymous>", "", "<anonymous parameter 0>", "Lcom/oriente/http/model/RequestContext;", "Lcom/oriente/cashalo/service/model/consumer/IPriceQueryModel;", "kotlin.jvm.PlatformType", "requestResult", "Lcom/oriente/http/model/RequestResult;", "onRequestFinished"}, k = 3, mv = {1, 9, 0}, xi = 48)
    static final class a<RESULT> implements RequestCallback {
        a() {
        }

        public final void onRequestFinished(RequestContext<IPriceQueryModel> requestContext, RequestResult<IPriceQueryModel> requestResult) {
            if (!requestResult.isSuccessFull() || requestResult.getResult() == null) {
                return;
            }
            Object result = requestResult.getResult();
            Intrinsics.checkNotNull(result);
            if (StringUtils.isVisibleUnNull(((IPriceQueryModel) result).url)) {
                RouterBuilder from = Router.from(b.this);
                Object result2 = requestResult.getResult();
                Intrinsics.checkNotNull(result2);
                from.deliver(OrientUtils.buildUrlWithParams(((IPriceQueryModel) result2).url, ValueConfig.BUNDLE_WEBVIEW_GOBACK, "1", ValueConfig.BUNDLE_WEBVIEW_NEED_TITLEBAR, "1", ValueConfig.BUNDLE_WEBVIEW_CLOSE_CONTAINER, "1"), RouterScene.INNER);
            }
        }
    }

    @Metadata(d1 = {"\u0000\u001c\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u0000\n\u0000\u0010\u0000\u001a\u00020\u00012\u000e\u0010\u0002\u001a\n \u0004*\u0004\u0018\u00010\u00030\u00032\u0006\u0010\u0005\u001a\u00020\u00062\u000e\u0010\u0007\u001a\n \u0004*\u0004\u0018\u00010\b0\bH\n¢\u0006\u0002\b\t"}, d2 = {"<anonymous>", "", "<anonymous parameter 0>", "Landroid/view/View;", "kotlin.jvm.PlatformType", "position", "", "<anonymous parameter 2>", "", "onDialogClick"}, k = 3, mv = {1, 9, 0}, xi = 48)
    static final class C0020b implements BottomDialogUtils.OnDialogClick {
        final LoanDetailsModel a;
        final b b;

        @Metadata(d1 = {"\u0000\u001a\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u00012*\u0010\u0002\u001a&\u0012\f\u0012\n \u0005*\u0004\u0018\u00010\u00040\u0004 \u0005*\u0012\u0012\f\u0012\n \u0005*\u0004\u0018\u00010\u00040\u0004\u0018\u00010\u00030\u00032*\u0010\u0006\u001a&\u0012\f\u0012\n \u0005*\u0004\u0018\u00010\u00040\u0004 \u0005*\u0012\u0012\f\u0012\n \u0005*\u0004\u0018\u00010\u00040\u0004\u0018\u00010\u00070\u0007H\n¢\u0006\u0002\b\b"}, d2 = {"<anonymous>", "", "<anonymous parameter 0>", "Lcom/oriente/http/model/RequestContext;", "", "kotlin.jvm.PlatformType", "requestResult", "Lcom/oriente/http/model/RequestResult;", "onRequestFinished"}, k = 3, mv = {1, 9, 0}, xi = 48)
        static final class a<RESULT> implements RequestCallback {
            final b a;

            a(b bVar) {
                this.a = bVar;
            }

            public final void onRequestFinished(RequestContext<Object> requestContext, RequestResult<Object> requestResult) {
                if (requestResult != null) {
                    this.a.f();
                }
            }
        }

        C0020b(LoanDetailsModel loanDetailsModel, b bVar) {
            this.a = loanDetailsModel;
            this.b = bVar;
        }

        @Override
        public final boolean onDialogClick(View view, int i, Object obj) {
            LoanDetailsModel loanDetailsModel;
            if (i != 0 || (loanDetailsModel = this.a) == null) {
                return false;
            }
            com.oriente.cashalo.service.a.a(loanDetailsModel.number, "Cancel Recommended Loan", new RequestContext.Builder(this.b).build(new a(this.b)));
            return false;
        }
    }

    @Metadata(d1 = {"\u0000\u0010\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u00012\u000e\u0010\u0002\u001a\n \u0004*\u0004\u0018\u00010\u00030\u0003H\n¢\u0006\u0002\b\u0005"}, d2 = {"<anonymous>", "", "it", "Lcom/oriente/plugin/PluginResult;", "kotlin.jvm.PlatformType", "onPluginResult"}, k = 3, mv = {1, 9, 0}, xi = 48)
    static final class c implements PluginResultCallback {
        public static final c a = new c();

        c() {
        }

        public final void onPluginResult(PluginResult pluginResult) {
        }
    }

    @Metadata(d1 = {"\u0000\u000e\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u00012\b\u0010\u0002\u001a\u0004\u0018\u00010\u0003H\n¢\u0006\u0002\b\u0004"}, d2 = {"<anonymous>", "", "result", "Lcom/oriente/plugin/PluginResult;", "onPluginResult"}, k = 3, mv = {1, 9, 0}, xi = 48)
    static final class d implements PluginResultCallback {
        public static final d a = new d();

        d() {
        }

        public final void onPluginResult(PluginResult pluginResult) {
        }
    }

    @Metadata(d1 = {"\u0000\u001a\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\b\n\u0000\u0010\u0000\u001a\u00020\u00012&\u0010\u0002\u001a\"\u0012\f\u0012\n \u0005*\u0004\u0018\u00010\u00040\u0004 \u0005*\u000b\u0012\u0002\b\u0003\u0018\u00010\u0003¨\u0006\u00010\u0003¨\u0006\u00012\u0006\u0010\u0006\u001a\u00020\u0007H\n¢\u0006\u0002\b\b"}, d2 = {"<anonymous>", "", "alert", "Lcom/oriente/uimodule/alert/AlertBuilder;", "", "kotlin.jvm.PlatformType", "action", "", "onAlertAction"}, k = 3, mv = {1, 9, 0}, xi = 48)
    static final class e implements Alert.IAlertAction {
        final LoanDetailsModel b;

        e(LoanDetailsModel loanDetailsModel) {
            this.b = loanDetailsModel;
        }

        public final void onAlertAction(AlertBuilder alertBuilder, int i) {
            if (i == 1) {
                alertBuilder.dismiss();
            } else {
                if (i != 4) {
                    return;
                }
                b.this.f(this.b);
            }
        }
    }

    @Metadata(d1 = {"\u0000\u0010\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u00012\u000e\u0010\u0002\u001a\n \u0004*\u0004\u0018\u00010\u00030\u0003H\n¢\u0006\u0002\b\u0005"}, d2 = {"<anonymous>", "", "it", "Lcom/oriente/plugin/PluginResult;", "kotlin.jvm.PlatformType", "onPluginResult"}, k = 3, mv = {1, 9, 0}, xi = 48)
    static final class f implements PluginResultCallback {
        public static final f a = new f();

        f() {
        }

        public final void onPluginResult(PluginResult pluginResult) {
        }
    }

    @Metadata(d1 = {"\u0000\u0010\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u00012\u000e\u0010\u0002\u001a\n \u0004*\u0004\u0018\u00010\u00030\u0003H\n¢\u0006\u0002\b\u0005"}, d2 = {"<anonymous>", "", "it", "Landroid/view/View;", "kotlin.jvm.PlatformType", "onClick"}, k = 3, mv = {1, 9, 0}, xi = 48)
    static final class g implements View.OnClickListener {
        final Ref.ObjectRef<AlertBuilder> a;

        g(Ref.ObjectRef<AlertBuilder> objectRef) {
            this.a = objectRef;
        }

        @Override
        public final void onClick(View view) {
            ((AlertBuilder) this.a.element).dismiss();
        }
    }

    @Metadata(d1 = {"\u0000\u0010\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u00012\u000e\u0010\u0002\u001a\n \u0004*\u0004\u0018\u00010\u00030\u0003H\n¢\u0006\u0002\b\u0005"}, d2 = {"<anonymous>", "", "it", "Landroid/view/View;", "kotlin.jvm.PlatformType", "onClick"}, k = 3, mv = {1, 9, 0}, xi = 48)
    static final class h implements View.OnClickListener {
        final Ref.ObjectRef<VerifyOptionModel.VerifyOptionItemModel> a;
        final LoanDetailsModel b;
        final b c;
        final Ref.ObjectRef<AlertBuilder> d;

        @Metadata(d1 = {"\u0000\u001a\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u00012*\u0010\u0002\u001a&\u0012\f\u0012\n \u0005*\u0004\u0018\u00010\u00040\u0004 \u0005*\u0012\u0012\f\u0012\n \u0005*\u0004\u0018\u00010\u00040\u0004\u0018\u00010\u00030\u00032*\u0010\u0006\u001a&\u0012\f\u0012\n \u0005*\u0004\u0018\u00010\u00040\u0004 \u0005*\u0012\u0012\f\u0012\n \u0005*\u0004\u0018\u00010\u00040\u0004\u0018\u00010\u00070\u0007H\n¢\u0006\u0002\b\b"}, d2 = {"<anonymous>", "", "<anonymous parameter 0>", "Lcom/oriente/http/model/RequestContext;", "", "kotlin.jvm.PlatformType", "requestResult", "Lcom/oriente/http/model/RequestResult;", "onRequestFinished"}, k = 3, mv = {1, 9, 0}, xi = 48)
        static final class a<RESULT> implements RequestCallback {
            final b a;

            a(b bVar) {
                this.a = bVar;
            }

            public final void onRequestFinished(RequestContext<Object> requestContext, RequestResult<Object> requestResult) {
                if (requestResult != null) {
                    ToastUtils.pop(R.layout.layout_toast_success, ResUtils.string(com.oriente.borrow.R.string.ori_borrow_msg_loan_cancel_success));
                    this.a.f();
                }
            }
        }

        h(Ref.ObjectRef<VerifyOptionModel.VerifyOptionItemModel> objectRef, LoanDetailsModel loanDetailsModel, b bVar, Ref.ObjectRef<AlertBuilder> objectRef2) {
            this.a = objectRef;
            this.b = loanDetailsModel;
            this.c = bVar;
            this.d = objectRef2;
        }

        @Override
        public final void onClick(View view) {
            VerifyOptionModel.VerifyOptionItemModel verifyOptionItemModel;
            Object obj = this.a.element;
            VerifyOptionModel.VerifyOptionItemModel verifyOptionItemModel2 = null;
            if (obj == null) {
                Intrinsics.throwUninitializedPropertyAccessException("mVerifyOptionItemModel");
                verifyOptionItemModel = null;
            } else {
                verifyOptionItemModel = (VerifyOptionModel.VerifyOptionItemModel) obj;
            }
            if (verifyOptionItemModel != null) {
                String str = this.b.number;
                Object obj2 = this.a.element;
                if (obj2 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("mVerifyOptionItemModel");
                } else {
                    verifyOptionItemModel2 = (VerifyOptionModel.VerifyOptionItemModel) obj2;
                }
                com.oriente.cashalo.service.a.a(str, verifyOptionItemModel2.name, new RequestContext.Builder(this.c).build(new a(this.c)));
            }
            ((AlertBuilder) this.d.element).dismiss();
        }
    }

    @Metadata(d1 = {"\u0000\u0016\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u00032\u000e\u0010\u0004\u001a\n \u0006*\u0004\u0018\u00010\u00050\u0005H\n¢\u0006\u0002\b\u0007"}, d2 = {"<anonymous>", "", "<anonymous parameter 0>", "", "verifyOptionItemModel", "Lcom/oriente/cashalo/service/model/ver/VerifyOptionModel$VerifyOptionItemModel;", "kotlin.jvm.PlatformType", "onCancelLoanClick"}, k = 3, mv = {1, 9, 0}, xi = 48)
    static final class i implements CancelLoanReasonAdapter.OnCancelLoanCallback {
        final Ref.ObjectRef<VerifyOptionModel.VerifyOptionItemModel> a;
        final Ref.ObjectRef<TextView> b;

        i(Ref.ObjectRef<VerifyOptionModel.VerifyOptionItemModel> objectRef, Ref.ObjectRef<TextView> objectRef2) {
            this.a = objectRef;
            this.b = objectRef2;
        }

        @Override
        public final void onCancelLoanClick(int i, VerifyOptionModel.VerifyOptionItemModel verifyOptionItemModel) {
            Ref.ObjectRef<VerifyOptionModel.VerifyOptionItemModel> objectRef = this.a;
            Intrinsics.checkNotNull(verifyOptionItemModel);
            objectRef.element = verifyOptionItemModel;
            ((TextView) this.b.element).setEnabled(true);
        }
    }

    @Metadata(d1 = {"\u0000\u001a\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u00012*\u0010\u0002\u001a&\u0012\f\u0012\n \u0005*\u0004\u0018\u00010\u00040\u0004 \u0005*\u0012\u0012\f\u0012\n \u0005*\u0004\u0018\u00010\u00040\u0004\u0018\u00010\u00030\u00032*\u0010\u0006\u001a&\u0012\f\u0012\n \u0005*\u0004\u0018\u00010\u00040\u0004 \u0005*\u0012\u0012\f\u0012\n \u0005*\u0004\u0018\u00010\u00040\u0004\u0018\u00010\u00070\u0007H\n¢\u0006\u0002\b\b"}, d2 = {"<anonymous>", "", "<anonymous parameter 0>", "Lcom/oriente/http/model/RequestContext;", "Lcom/oriente/cashalo/service/model/consumer/GetUpdateReceiptBean;", "kotlin.jvm.PlatformType", "result", "Lcom/oriente/http/model/RequestResult;", "onRequestFinished"}, k = 3, mv = {1, 9, 0}, xi = 48)
    static final class j<RESULT> implements RequestCallback {
        final LoanDetailsModel b;

        j(LoanDetailsModel loanDetailsModel) {
            this.b = loanDetailsModel;
        }

        public final void onRequestFinished(RequestContext<GetUpdateReceiptBean> requestContext, RequestResult<GetUpdateReceiptBean> requestResult) {
            AppPlugin plugin;
            if (PageManager.isAlive(PageManager.getActivityByPageTarget(b.this)) && requestResult.isBizSuccess() && (plugin = OrientManager.getPlugin(AppPlugin.class)) != null) {
                plugin.goUploadReceipt(b.this, Jumper.obtain(new Object[]{"receiptInfo", requestResult.getResult(), "scenarioCode", this.b.loanType}));
            }
        }
    }

    private final boolean b(List<? extends LoanDetailsModel> result) {
        return result == null || result.isEmpty() || (result.size() == 1 && result.get(0).ipriceLoanIsCancelled);
    }

    private final void c(List<? extends LoanDetailsModel> loanList) {
        if (loanList == null || loanList.isEmpty()) {
            HomeDetailEmptyModel homeDetailEmptyModel = new HomeDetailEmptyModel();
            homeDetailEmptyModel.setItemType(1);
            com.oriente.cashalo.page.fragment.i iVar = this.mCurrentLoanAdapter;
            if (iVar != null && iVar != null) {
                iVar.addData(homeDetailEmptyModel);
            }
        } else {
            e(loanList);
        }
        PageManager.setPageName(this, "my_loan");
        if (!b(loanList)) {
            this.mEmpty = false;
            return;
        }
        this.mRateUsSwitchReadyCount++;
        this.mEmpty = true;
        com.oriente.cashalo.businese.b<b> bVar = this.mCurrentLoanBiz;
        if (bVar == null) {
            Intrinsics.throwUninitializedPropertyAccessException("mCurrentLoanBiz");
            bVar = null;
        }
        bVar.e();
    }

    private final void e(java.util.List<? extends com.oriente.cashalo.service.model.loan.HomeDetailBaseModel> r8) {
        throw new UnsupportedOperationException("Method not decompiled: com.oriente.cashalo.page.fragment.b.e(java.util.List):void");
    }

    public final void f() {
        if (b()) {
            com.oriente.cashalo.businese.b<b> bVar = this.mCurrentLoanBiz;
            if (bVar == null) {
                Intrinsics.throwUninitializedPropertyAccessException("mCurrentLoanBiz");
                bVar = null;
            }
            bVar.a(true);
        }
    }

    private final void g() {
        if (c()) {
            com.oriente.cashalo.businese.b<b> bVar = this.mCurrentLoanBiz;
            if (bVar == null) {
                Intrinsics.throwUninitializedPropertyAccessException("mCurrentLoanBiz");
                bVar = null;
            }
            bVar.c();
        }
    }

    private final void h() {
        setRefreshComplete();
        com.oriente.cashalo.page.fragment.i iVar = this.mCurrentLoanAdapter;
        if (iVar != null) {
            iVar.setList((Collection) null);
        }
    }

    private final void i() {
        this.mRateUsSwitchReadyCount = 0;
        this.mRateUsSwitchActualCount = 0;
        this.mExclusiveReady = false;
        this.mCashaCartReady = false;
        this.hasAddRateUs = false;
    }

    public final void d(List<? extends LoanDetailsModel> loanList) {
        com.oriente.cashalo.businese.b<b> bVar = this.mCurrentLoanBiz;
        com.oriente.cashalo.businese.b<b> bVar2 = null;
        if (bVar == null) {
            Intrinsics.throwUninitializedPropertyAccessException("mCurrentLoanBiz");
            bVar = null;
        }
        bVar.a(loanList);
        h();
        c(loanList);
        com.oriente.cashalo.businese.b<b> bVar3 = this.mCurrentLoanBiz;
        if (bVar3 == null) {
            Intrinsics.throwUninitializedPropertyAccessException("mCurrentLoanBiz");
        } else {
            bVar2 = bVar3;
        }
        bVar2.d();
    }

    @Override
    public void k(RequestResult<Object> result) {
        Intrinsics.checkNotNullParameter(result, "result");
        if (result.isBizSuccess()) {
            d();
        }
    }

    @Override
    public void m(RequestResult<ExclusiveProductInfoModel> result) {
        Intrinsics.checkNotNullParameter(result, "result");
        this.mExclusiveReady = true;
        this.mRateUsSwitchActualCount++;
        if (result.isBizSuccess() && result.getResult() != null) {
            HomeItemExclusiveModel homeItemExclusiveModel = new HomeItemExclusiveModel(((ExclusiveProductInfoModel) result.getResult()).getMinAmount(), ((ExclusiveProductInfoModel) result.getResult()).getMaxAmount(), ((ExclusiveProductInfoModel) result.getResult()).getMinInterestRate(), ((ExclusiveProductInfoModel) result.getResult()).getMaxInstallment(), ((ExclusiveProductInfoModel) result.getResult()).getLoanType(), ((ExclusiveProductInfoModel) result.getResult()).getMaxDays());
            homeItemExclusiveModel.setItemType(6);
            com.oriente.cashalo.page.fragment.i iVar = this.mCurrentLoanAdapter;
            if (iVar != null && iVar != null) {
                iVar.addData(homeItemExclusiveModel);
            }
        }
        g();
    }

    @Override
    public void n(RequestResult<CashacartCashData> result) {
        Intrinsics.checkNotNullParameter(result, "result");
        this.mCashaCartReady = true;
        if (result.isBizSuccess() && result.getResult() != null && ((CashacartCashData) result.getResult()).isShow) {
            HomeItemCashaCartModel homeItemCashaCartModel = new HomeItemCashaCartModel(((CashacartCashData) result.getResult()).isShow, ((CashacartCashData) result.getResult()).amount, ((CashacartCashData) result.getResult()).rate, ((CashacartCashData) result.getResult()).LoanType);
            homeItemCashaCartModel.setItemType(5);
            com.oriente.cashalo.page.fragment.i iVar = this.mCurrentLoanAdapter;
            if (iVar != null && iVar != null) {
                iVar.addData(homeItemCashaCartModel);
            }
        }
        g();
    }

    @Override
    public void onClick(View v) {
        Integer valueOf = v != null ? Integer.valueOf(v.getId()) : null;
        int i2 = com.oriente.cashalo.R.id.emailUs;
        if (valueOf != null && valueOf.intValue() == i2) {
            startActivity(Intent.createChooser(new Intent("android.intent.action.SENDTO", Uri.parse("mailto:[email protected]")), ""));
            return;
        }
        int i3 = com.oriente.cashalo.R.id.chatWithUs;
        if (valueOf != null && valueOf.intValue() == i3) {
            Intent intent = new Intent("android.intent.action.VIEW", Uri.parse("https://m.me/HowToPayCashaloSupport"));
            if (requireActivity() != null) {
                requireActivity().startActivity(intent);
            }
        }
    }

    @Override
    protected void onContentViewCreated(View view, Bundle argument, Bundle savedInstanceState) {
        super.onContentViewCreated(view, argument, savedInstanceState);
        this.mTitleBar.setVisibility(8);
        this.mCurrentLoanBiz = new com.oriente.cashalo.businese.b<>(this);
        this.mCurrentLoanAdapter = new com.oriente.cashalo.page.fragment.i(this, null);
        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());
        DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(getActivity(), 1);
        dividerItemDecoration.setDrawable(FS.Resources_getDrawable(getResources(), com.oriente.cashalo.R.drawable.recyclerdivider));
        a().d.setLayoutManager(linearLayoutManager);
        a().d.setAdapter(this.mCurrentLoanAdapter);
        a().d.addItemDecoration(dividerItemDecoration);
        com.oriente.cashalo.page.fragment.i iVar = this.mCurrentLoanAdapter;
        Intrinsics.checkNotNull(iVar);
        iVar.setOnItemChildClickListener(this);
        com.oriente.cashalo.page.fragment.i iVar2 = this.mCurrentLoanAdapter;
        Intrinsics.checkNotNull(iVar2);
        iVar2.addChildClickViewIds(new int[]{com.oriente.cashalo.R.id.tvCashApply, com.oriente.cashalo.R.id.tvReviewDetail, com.oriente.cashalo.R.id.tvPayNow, com.oriente.cashalo.R.id.tvUploadReceipt, com.oriente.cashalo.R.id.reviseLoan, com.oriente.cashalo.R.id.normalCancelNowBtn, com.oriente.cashalo.R.id.downGradeCancelNowBtn, com.oriente.cashalo.R.id.checkTheLoan, com.oriente.cashalo.R.id.extendLoanPay, com.oriente.cashalo.R.id.extendLoanHow, com.oriente.cashalo.R.id.extendLoanApply, com.oriente.cashalo.R.id.tvPostponeLoan, com.oriente.cashalo.R.id.btnExclusiveApplyNow, com.oriente.cashalo.R.id.txtLove, com.oriente.cashalo.R.id.tvSeeOtherProduct, com.oriente.cashalo.R.id.btnExclusiveApplyNow2, com.oriente.cashalo.R.id.on_2_off_confirm_purchase_lv, com.oriente.cashalo.R.id.recommendStoreMoreContainer});
        a().b.c.setOnClickListener(this);
        a().b.b.setOnClickListener(this);
    }

    @Override
    protected View onCreateContentView(LayoutInflater inflater, ViewGroup container) {
        Intrinsics.checkNotNullParameter(inflater, "inflater");
        this._binding = com.oriente.cashalo.databinding.g.a(inflater, container, false);
        PageScrollView root = a().getRoot();
        Intrinsics.checkNotNullExpressionValue(root, "getRoot(...)");
        return root;
    }

    public void onItemChildClick(BaseQuickAdapter<?, ?> adapter, View view, int position) {
        VerifyPlugin plugin;
        Intrinsics.checkNotNullParameter(adapter, "adapter");
        Intrinsics.checkNotNullParameter(view, "view");
        if (adapter.getItem(position) instanceof LoanDetailsModel) {
            Object item = adapter.getItem(position);
            Intrinsics.checkNotNull(item, "null cannot be cast to non-null type com.oriente.cashalo.service.model.loan.LoanDetailsModel");
            LoanDetailsModel loanDetailsModel = (LoanDetailsModel) item;
            int id = view.getId();
            if (id == com.oriente.cashalo.R.id.tvReviewDetail) {
                a(loanDetailsModel, "ViewDetails");
                Jumper.from(this).argument(Jumper.obtain(new Object[]{ValueConfig.BUNDLE_PAGE_ENTITY, loanDetailsModel})).fragment(p.class).jumpActivity(CommonActivity.class);
                return;
            }
            if (id == com.oriente.cashalo.R.id.tvPayNow) {
                a(loanDetailsModel, "PayNow");
                GlobalSession.remove(ValueConfig.BUNDLE_KEY_LOAN_ITEM);
                GlobalSession.remove(ValueConfig.BUNDLE_KEY_LOAN_DETAILS);
                GlobalSession.remove(ValueConfig.BUNDLE_KEY_LOAN_EARLY);
                GlobalSession.put(ValueConfig.BUNDLE_KEY_LOAN_DETAILS, loanDetailsModel);
                Router.from(this).deliver(RouterUri.PAYMENT_OPTION_PAGE, RouterScene.INNER);
                return;
            }
            if (id == com.oriente.cashalo.R.id.downGradeCancelNowBtn) {
                a(loanDetailsModel, "CancelNow");
                BottomDialogUtils.sheet(DialogBuilder.from(this), ResUtils.string(com.oriente.cashalo.R.string.ori_home_myloan_alert_cancel_now_title), ResUtils.string(com.oriente.cashalo.R.string.ori_home_myloan_alert_btn_maybe_later), BottomDialogUtils.adapter(new String[]{ResUtils.string(com.oriente.cashalo.R.string.ori_home_myloan_alert_btn_cancel_now)}, ColorStateList.valueOf(ResUtils.color(R.color.ori_text_warning))), new C0020b(loanDetailsModel, this));
                return;
            }
            if (id == com.oriente.cashalo.R.id.normalCancelNowBtn) {
                a(loanDetailsModel, "CancelNow");
                h(loanDetailsModel);
                return;
            }
            if (id == com.oriente.cashalo.R.id.tvUploadReceipt) {
                i(loanDetailsModel);
                return;
            }
            if (id == com.oriente.cashalo.R.id.checkTheLoan) {
                a(loanDetailsModel, "CheckTheLoan");
                BorrowPlugin plugin2 = OrientManager.getPlugin(BorrowPlugin.class);
                if (plugin2 != null) {
                    plugin2.checkTheLoan(this, Jumper.obtain(new Object[]{"loanId", loanDetailsModel.number}), c.a);
                    return;
                }
                return;
            }
            if (id == com.oriente.cashalo.R.id.reviseLoan) {
                g(loanDetailsModel);
                return;
            }
            if (id == com.oriente.cashalo.R.id.extendLoanHow) {
                c(loanDetailsModel);
                return;
            }
            if (id == com.oriente.cashalo.R.id.extendLoanPay) {
                d(loanDetailsModel);
                return;
            }
            if (id == com.oriente.cashalo.R.id.extendLoanApply) {
                a(loanDetailsModel);
                return;
            }
            if (id == com.oriente.cashalo.R.id.tvPostponeLoan) {
                e(loanDetailsModel);
                return;
            } else {
                if (id != com.oriente.cashalo.R.id.on_2_off_confirm_purchase_lv || (plugin = OrientManager.getPlugin(VerifyPlugin.class)) == null) {
                    return;
                }
                plugin.codeScanPlugin(this, Jumper.obtain(new Object[]{ValueConfig.BUNDLE_SCAN_FACTORY, "QRMixMpfCouponFactory", BorrowInfo.OUT_ORDER_NO, loanDetailsModel.creditOrderInfo.creditOrderNo, ValueConfig.BUNDLE_SCAN_SOURCE, 4}), d.a);
                return;
            }
        }
        int id2 = view.getId();
        com.oriente.cashalo.businese.b<b> bVar = null;
        if (id2 == com.oriente.cashalo.R.id.txtLove) {
            CommonAnalytics.analyticsClick(getPageId(), "RateUs");
            com.oriente.cashalo.businese.b<b> bVar2 = this.mCurrentLoanBiz;
            if (bVar2 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("mCurrentLoanBiz");
            } else {
                bVar = bVar2;
            }
            bVar.a();
            return;
        }
        if (id2 == com.oriente.cashalo.R.id.btnExclusiveApplyNow) {
            CommonAnalytics.analyticsClick(getPageId(), "ExclusiveApplyNow");
            if (adapter.getItem(position) instanceof HomeItemCashaCartModel) {
                com.oriente.cashalo.businese.b<b> bVar3 = this.mCurrentLoanBiz;
                if (bVar3 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("mCurrentLoanBiz");
                    bVar3 = null;
                }
                if (bVar3.b() != null) {
                    Object item2 = adapter.getItem(position);
                    Intrinsics.checkNotNull(item2, "null cannot be cast to non-null type com.oriente.cashalo.service.model.loan.HomeItemCashaCartModel");
                    HomeItemCashaCartModel homeItemCashaCartModel = (HomeItemCashaCartModel) item2;
                    BorrowPlugin plugin3 = OrientManager.getPlugin(BorrowPlugin.class);
                    if (plugin3 != null) {
                        String str = homeItemCashaCartModel.LoanType;
                        com.oriente.cashalo.businese.b<b> bVar4 = this.mCurrentLoanBiz;
                        if (bVar4 == null) {
                            Intrinsics.throwUninitializedPropertyAccessException("mCurrentLoanBiz");
                        } else {
                            bVar = bVar4;
                        }
                        LoanDetailsModel b = bVar.b();
                        Intrinsics.checkNotNull(b);
                        plugin3.borrow(this, Jumper.obtain(new Object[]{"scenarioCode", str, "scenarioCode", str, KeyResult.BANK_ACCOUNT_TYPE, b.bankAccountType}), false);
                        return;
                    }
                    return;
                }
                return;
            }
            return;
        }
        if (id2 == com.oriente.cashalo.R.id.btnExclusiveApplyNow2) {
            CommonAnalytics.analyticsClick(getPageId(), "ExclusiveApplyNow");
            if (adapter.getItem(position) instanceof HomeItemExclusiveModel) {
                Object item3 = adapter.getItem(position);
                Intrinsics.checkNotNull(item3, "null cannot be cast to non-null type com.oriente.cashalo.service.model.loan.HomeItemExclusiveModel");
                HomeItemExclusiveModel homeItemExclusiveModel = (HomeItemExclusiveModel) item3;
                BorrowPlugin plugin4 = OrientManager.getPlugin(BorrowPlugin.class);
                if (plugin4 != null) {
                    plugin4.borrow(this, Jumper.obtain(new Object[]{"scenarioCode", homeItemExclusiveModel.loanType}), false);
                    return;
                }
                return;
            }
            return;
        }
        if (id2 == com.oriente.cashalo.R.id.tvSeeOtherProduct) {
            CommonAnalytics.analyticsClick(getPageId(), "SeeOtherProduct");
            e();
            return;
        }
        if (id2 == com.oriente.cashalo.R.id.recommendStoreMoreContainer && adapter.getItem(position) != null && (adapter.getItem(position) instanceof RecommendStoreModel)) {
            Object item4 = adapter.getItem(position);
            Intrinsics.checkNotNull(item4, "null cannot be cast to non-null type com.oriente.cashalo.service.model.loan.RecommendStoreModel");
            RecommendStoreModel recommendStoreModel = (RecommendStoreModel) item4;
            StoreRecommendModel storeRecommendModel = recommendStoreModel.storesRecommended;
            if (storeRecommendModel == null || !StringUtils.isVisibleUnNull(storeRecommendModel.viewAllUrl)) {
                return;
            }
            Router.from(this).deliver(recommendStoreModel.storesRecommended.viewAllUrl, RouterScene.INNER);
        }
    }

    public void onRefresh(NestRefreshLayout<?> p0, boolean p1) {
        i();
        com.oriente.cashalo.businese.b<b> bVar = this.mCurrentLoanBiz;
        if (bVar == null) {
            Intrinsics.throwUninitializedPropertyAccessException("mCurrentLoanBiz");
            bVar = null;
        }
        bVar.a(true);
    }

    @Override
    public void onVisibleChanged(boolean visible) {
        super.onVisibleChanged(visible);
        this.a = true;
        i();
    }

    private final String b(LoanDetailsModel loanDetail) {
        List<PurchaseItemBean> list = loanDetail.consumerOrderInfo.purchaseItems;
        if (list == null || list.size() <= 0) {
            return null;
        }
        PurchaseItemBean purchaseItemBean = loanDetail.consumerOrderInfo.purchaseItems.get(0);
        return StringUtils.contractWithComma(purchaseItemBean.parentName, purchaseItemBean.itemName, new String[0]);
    }

    private final com.oriente.cashalo.databinding.g a() {
        com.oriente.cashalo.databinding.g gVar = this._binding;
        Intrinsics.checkNotNull(gVar);
        return gVar;
    }

    public final void f(LoanDetailsModel loanDetail) {
        loanDetail.postponeOrderInfo.preOrderNo = loanDetail.number;
        BorrowPlugin plugin = OrientManager.getPlugin(BorrowPlugin.class);
        if (plugin != null) {
            plugin.postponeLoan(this, Jumper.obtain(new Object[]{ValueConfig.BUNDLE_POSTPONE_ORDER_INFO, loanDetail.postponeOrderInfo}));
        }
    }

    private final void g(LoanDetailsModel loanDetail) {
        BorrowPlugin plugin;
        if (loanDetail.consumerOrderInfo == null || (plugin = OrientManager.getPlugin(BorrowPlugin.class)) == null) {
            return;
        }
        String str = loanDetail.loanType;
        String str2 = loanDetail.number;
        ConsumerOrderInfo consumerOrderInfo = loanDetail.consumerOrderInfo;
        String str3 = consumerOrderInfo.source;
        String str4 = consumerOrderInfo.merchantId;
        String str5 = consumerOrderInfo.billAmount;
        String b = b(loanDetail);
        ConsumerOrderInfo consumerOrderInfo2 = loanDetail.consumerOrderInfo;
        plugin.reviseLoan(this, Jumper.obtain(new Object[]{"scenarioCode", str, "orderType", "revise", ValueConfig.BUNDLE_PRE_ORDER_NO, str2, BorrowInfo.PRE_ORDER_NO, str2, "source", str3, "merchantId", str4, BorrowInfo.PRODUCTAMOUNT, str5, "productName", b, ValueConfig.BUNDLE_FROM_REVISE_LOAN, Boolean.TRUE, BorrowInfo.SACODE, consumerOrderInfo2.sacode, ValueConfig.BUNDLE_PURCHASE_ITEMS, consumerOrderInfo2.purchaseItems}), f.a);
    }

    private final void h(LoanDetailsModel loanDetail) {
        Ref.ObjectRef objectRef = new Ref.ObjectRef();
        Ref.ObjectRef objectRef2 = new Ref.ObjectRef();
        objectRef2.element = Alert.from(PageManager.getActivityByPageTarget(this));
        View inflate = LayoutInflater.from(getContext()).inflate(com.oriente.borrow.R.layout.dialog_cancel_loan, (ViewGroup) null);
        TextView textView = (TextView) inflate.findViewById(com.oriente.cashalo.R.id.titleTv);
        RecyclerView findViewById = inflate.findViewById(com.oriente.cashalo.R.id.recyclerView);
        TextView textView2 = (TextView) inflate.findViewById(com.oriente.borrow.R.id.dialog_keep);
        Ref.ObjectRef objectRef3 = new Ref.ObjectRef();
        objectRef3.element = inflate.findViewById(com.oriente.borrow.R.id.dialog_submit);
        VerifyOptionModel optionModelByType = OptionUtil.getOptionModelByType(KeyResult.KEY_OPTION_CANCEL_REASON);
        if ((optionModelByType != null ? optionModelByType.options : null) != null) {
            textView.setText(optionModelByType.title);
            CancelLoanReasonAdapter cancelLoanReasonAdapter = new CancelLoanReasonAdapter(optionModelByType.options, new i(objectRef, objectRef3));
            findViewById.setLayoutManager(new LinearLayoutManager(getContext()));
            findViewById.setAdapter(cancelLoanReasonAdapter);
        }
        textView2.setOnClickListener(new g(objectRef2));
        ((TextView) objectRef3.element).setOnClickListener(new h(objectRef, loanDetail, this, objectRef2));
        ((AlertBuilder) objectRef2.element).custView(inflate);
        ((AlertBuilder) objectRef2.element).dismissBackpress(false).dismissTouchOut(false);
        ((AlertBuilder) objectRef2.element).show();
    }

    @Override
    public void a(RequestResult<List<LoanDetailsModel>> result) {
        Intrinsics.checkNotNullParameter(result, "result");
        if (result.isSuccessFull()) {
            h();
            c((List<? extends LoanDetailsModel>) result.getResult());
        }
        com.oriente.cashalo.businese.b<b> bVar = this.mCurrentLoanBiz;
        if (bVar == null) {
            Intrinsics.throwUninitializedPropertyAccessException("mCurrentLoanBiz");
            bVar = null;
        }
        bVar.d();
    }

    private final void d(LoanDetailsModel loanDetail) {
        a(loanDetail, "ToPayment");
        GlobalSession.remove(ValueConfig.BUNDLE_KEY_LOAN_ITEM);
        GlobalSession.remove(ValueConfig.BUNDLE_KEY_LOAN_DETAILS);
        GlobalSession.remove(ValueConfig.BUNDLE_KEY_LOAN_EARLY);
        GlobalSession.put(ValueConfig.BUNDLE_KEY_LOAN_DETAILS, loanDetail);
        Router.from(this).deliver(RouterUri.PAYMENT_OPTION_EXTEND_PAGE, RouterScene.INNER);
    }

    private final void i(LoanDetailsModel loanDetail) {
        a(loanDetail, "UploadReceipt");
        CommonService.getUpdateReceiptInfo(loanDetail.number, new RequestContext.Builder(this).build(new j(loanDetail)));
    }

    private final boolean b() {
        UserPlugin plugin = OrientManager.getPlugin(UserPlugin.class);
        return plugin != null && plugin.isLogin();
    }

    private final void a(LoanDetailsModel loanDetail) {
        a(loanDetail, "ApplyNow");
        if (loanDetail == null || !StringUtils.isVisibleUnNull(loanDetail.loanId)) {
            return;
        }
        RouterBuilder from = Router.from(this);
        StringCompanionObject stringCompanionObject = StringCompanionObject.INSTANCE;
        String format = String.format(RouterUri.EXTEND_LOAN_DETAIL, Arrays.copyOf(new Object[]{loanDetail.loanId}, 1));
        Intrinsics.checkNotNullExpressionValue(format, "format(...)");
        from.deliver(format, RouterScene.INNER);
    }

    private final void d() {
        Intent intent = new Intent();
        intent.setAction("android.intent.action.VIEW");
        intent.setData(Uri.parse("https://play.google.com/store/apps/details?id=" + requireActivity().getPackageName()));
        intent.addCategory("android.intent.category.BROWSABLE");
        intent.setFlags(268435456);
        startActivity(intent);
    }

    private final void a(LoanDetailsModel details, String payNow) {
        if ((details != null ? details.repayingDetail : null) != null) {
            CommonAnalytics.analyticsClick(getPageId(), payNow, CommonAnalytics.toProperties("status", details.repayingDetail.status, "days", details.days, "load_id", details.loanId));
        }
    }

    private final boolean c() {
        if (this.mRateUsSwitchReadyCount > 0) {
            return this.mCashaCartReady && this.mExclusiveReady;
        }
        return this.mCashaCartReady;
    }

    @Override
    public void c(RequestResult<List<ConfigSwitch>> result, List<ConfigSwitch> data) {
        Intrinsics.checkNotNullParameter(result, "result");
        if (result.isBizSuccess() && data != null && (!data.isEmpty()) && data.get(0).getIsShow()) {
            HomeItemFeedBackModel homeItemFeedBackModel = new HomeItemFeedBackModel();
            homeItemFeedBackModel.setItemType(7);
            com.oriente.cashalo.page.fragment.i iVar = this.mCurrentLoanAdapter;
            if (iVar != null) {
                Intrinsics.checkNotNull(iVar);
                if (iVar.getData() != null) {
                    com.oriente.cashalo.page.fragment.i iVar2 = this.mCurrentLoanAdapter;
                    List data2 = iVar2 != null ? iVar2.getData() : null;
                    Intrinsics.checkNotNull(data2);
                    Iterator it = data2.iterator();
                    while (true) {
                        if (!it.hasNext()) {
                            break;
                        } else if (((HomeDetailBaseModel) it.next()).getItemType() == 7) {
                            this.hasAddRateUs = true;
                            break;
                        }
                    }
                }
                if (this.hasAddRateUs) {
                    return;
                }
                com.oriente.cashalo.page.fragment.i iVar3 = this.mCurrentLoanAdapter;
                Intrinsics.checkNotNull(iVar3);
                iVar3.addData(homeItemFeedBackModel);
            }
        }
    }

    private final void c(LoanDetailsModel loanDetail) {
        a(loanDetail, "HowToExtend");
        if (loanDetail == null || !StringUtils.isVisibleUnNull(loanDetail.loanId)) {
            return;
        }
        RouterBuilder from = Router.from(this);
        StringCompanionObject stringCompanionObject = StringCompanionObject.INSTANCE;
        String format = String.format(RouterUri.EXTEND_LOAN_DETAIL, Arrays.copyOf(new Object[]{loanDetail.loanId}, 1));
        Intrinsics.checkNotNullExpressionValue(format, "format(...)");
        from.deliver(format, RouterScene.INNER);
    }

    private final void e(LoanDetailsModel loanDetail) {
        a(loanDetail, "PostPoneLoan");
        if (loanDetail.postponeOrderInfo == null) {
            return;
        }
        Alert.from(PageManager.getActivityByPageTarget(this)).message(ResUtils.string(com.oriente.cashalo.R.string.ori_home_myloan_postpone_dialog_content)).button(ResUtils.string(R.string.ori_common_btn_cancel), ResUtils.string(com.oriente.cashalo.R.string.ori_home_myloan_dialog_btn_postpone)).dismissTouchOut(false).dismissBackpress(false).callback(new e(loanDetail)).show();
    }

    private final void e() {
        BorrowService.hotItemsUrl(new RequestContext.Builder(this).build(new a()));
    }
}