package com.vinfast.companion.main.ui.booking.allquotation;

/* JADX INFO: compiled from: r8-map-id-ae6aab8d9a1033945587ffdd1bc6222159522c1d66e66a2c4cecb065134dd0a6 */
/* JADX INFO: loaded from: E:\ios\vf_dex\classes3.dex */
@dagger.hilt.android.lifecycle.HiltViewModel
@kotlin.Metadata(d1 = {"\u0000N\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\u0010\u0006\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\b\u0017\u0018\u00002\u00020\u0001B\u0011\b\u0007\u0012\u0006\u0010\u0003\u001a\u00020\u0002¢\u0006\u0004\b\u0004\u0010\u0005J\u0017\u0010\t\u001a\u00020\b2\b\u0010\u0007\u001a\u0004\u0018\u00010\u0006¢\u0006\u0004\b\t\u0010\nJ\u0015\u0010\r\u001a\u00020\b2\u0006\u0010\f\u001a\u00020\u000b¢\u0006\u0004\b\r\u0010\u000eR\u0014\u0010\u0003\u001a\u00020\u00028\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u000f\u0010\u0010R.\u0010\u0018\u001a\u001a\u0012\u0016\u0012\u0014\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00140\u0013\u0012\u0004\u0012\u00020\u00150\u00120\u00118\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u0016\u0010\u0017R\u001c\u0010\u001b\u001a\b\u0012\u0004\u0012\u00020\u00190\u00118\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u001a\u0010\u0017R)\u0010\u001f\u001a\u001a\u0012\u0016\u0012\u0014\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00140\u0013\u0012\u0004\u0012\u00020\u00150\u00120\u001c8F¢\u0006\u0006\u001a\u0004\b\u001d\u0010\u001eR\u0017\u0010!\u001a\b\u0012\u0004\u0012\u00020\u00190\u001c8F¢\u0006\u0006\u001a\u0004\b \u0010\u001e¨\u0006\""}, d2 = {"Lcom/vinfast/companion/main/ui/booking/allquotation/ApprovedQuotationListViewModel;", "Lcom/vinfast/companion/core/base/BaseViewModel;", "Lcom/vinfast/companion/serviceskit/manager/IBookingServiceManager;", "bookingServiceManager", "<init>", "(Lcom/vinfast/companion/serviceskit/manager/IBookingServiceManager;)V", "Landroid/os/Bundle;", "arguments", okhttp3.HttpUrl.FRAGMENT_ENCODE_SET, "N", "(Landroid/os/Bundle;)V", okhttp3.HttpUrl.FRAGMENT_ENCODE_SET, "position", "O", "(I)V", "m", "Lcom/vinfast/companion/serviceskit/manager/IBookingServiceManager;", "Landroidx/lifecycle/MutableLiveData;", "Lkotlin/Pair;", okhttp3.HttpUrl.FRAGMENT_ENCODE_SET, "Lcom/vinfast/companion/serviceskit/domain/model/Quotation;", okhttp3.HttpUrl.FRAGMENT_ENCODE_SET, "n", "Landroidx/lifecycle/MutableLiveData;", "_approvedQuotationsLiveData", okhttp3.HttpUrl.FRAGMENT_ENCODE_SET, "o", "_navigateToQuotationScreenLiveData", "Landroidx/lifecycle/LiveData;", "L", "()Landroidx/lifecycle/LiveData;", "approvedQuotationsLiveData", "M", "navigateToQuotationScreenLiveData", "services_release"}, k = 1, mv = {2, 2, 0}, xi = 48)
public class ApprovedQuotationListViewModel extends com.vinfast.companion.core.base.BaseViewModel {

    /* JADX INFO: renamed from: m, reason: from kotlin metadata */
    private final com.vinfast.companion.serviceskit.manager.IBookingServiceManager bookingServiceManager;

    /* JADX INFO: renamed from: n, reason: from kotlin metadata */
    private androidx.lifecycle.MutableLiveData _approvedQuotationsLiveData;

    /* JADX INFO: renamed from: o, reason: from kotlin metadata */
    private androidx.lifecycle.MutableLiveData _navigateToQuotationScreenLiveData;

    public ApprovedQuotationListViewModel(com.vinfast.companion.serviceskit.manager.IBookingServiceManager iBookingServiceManager) {
        kotlin.jvm.internal.Intrinsics.l(iBookingServiceManager, "bookingServiceManager");
        this.bookingServiceManager = iBookingServiceManager;
        this._approvedQuotationsLiveData = new androidx.lifecycle.MutableLiveData();
        this._navigateToQuotationScreenLiveData = new androidx.lifecycle.MutableLiveData();
    }

    public final androidx.lifecycle.LiveData L() {
        return this._approvedQuotationsLiveData;
    }

    public final androidx.lifecycle.LiveData M() {
        return this._navigateToQuotationScreenLiveData;
    }

    public final void N(android.os.Bundle arguments) {
        android.os.Parcelable[] parcelableArray = arguments != null ? arguments.getParcelableArray("ARGUMENT_QUOTATIONS") : null;
        kotlin.jvm.internal.Intrinsics.j(parcelableArray, "null cannot be cast to non-null type kotlin.Array<com.vinfast.companion.serviceskit.domain.model.Quotation>");
        com.vinfast.companion.serviceskit.domain.model.Quotation[] quotationArr = (com.vinfast.companion.serviceskit.domain.model.Quotation[]) parcelableArray;
        java.lang.String string = arguments.getString("ARGUMENT_TOTAL_APPROVED_AMOUNT");
        java.lang.Double dValueOf = string != null ? java.lang.Double.valueOf(java.lang.Double.parseDouble(string)) : null;
        kotlin.jvm.internal.Intrinsics.i(dValueOf);
        dValueOf.doubleValue();
        this._approvedQuotationsLiveData.q(new kotlin.Pair(kotlin.collections.ArraysKt.w1(quotationArr), dValueOf));
    }

    public final void O(int position) {
        java.util.List list;
        java.lang.String id;
        kotlin.Pair pair = (kotlin.Pair) this._approvedQuotationsLiveData.f();
        if (pair == null || (list = (java.util.List) pair.e()) == null || position < 0 || position >= list.size() || (id = ((com.vinfast.companion.serviceskit.domain.model.Quotation) list.get(position)).getId()) == null) {
            return;
        }
        kotlinx.coroutines.BuildersKt.d(androidx.lifecycle.ViewModelKt.a(this), (kotlin.coroutines.CoroutineContext) null, (kotlinx.coroutines.CoroutineStart) null, new com.vinfast.companion.main.ui.booking.allquotation.ApprovedQuotationListViewModel$onClickItem$1(this, id, null), 3, (java.lang.Object) null);
    }
}
