package jg;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import androidx.recyclerview.widget.RecyclerView;
import ca.canadapost.module.track.model.CustomsHandlingPricing;
import java.util.List;

/* loaded from: classes4.dex */
public final class e5 extends RecyclerView.h {

    /* renamed from: d, reason: collision with root package name */
    private final ca.a f24268d;

    /* renamed from: e, reason: collision with root package name */
    private final List f24269e;

    public e5(CustomsHandlingPricing customsHandlingPricing, Context mContext, ca.a languageService) {
        List n10;
        kotlin.jvm.internal.t.g(mContext, "mContext");
        kotlin.jvm.internal.t.g(languageService, "languageService");
        this.f24268d = languageService;
        rm.v[] vVarArr = new rm.v[5];
        vVarArr[0] = rm.c0.a(mContext.getString(yf.h.f52585h0), customsHandlingPricing != null ? customsHandlingPricing.getDuty() : null);
        vVarArr[1] = rm.c0.a(mContext.getString(yf.h.G0), customsHandlingPricing != null ? customsHandlingPricing.getExciseTax() : null);
        vVarArr[2] = rm.c0.a(mContext.getString(yf.h.J0), customsHandlingPricing != null ? customsHandlingPricing.getGstHst() : null);
        vVarArr[3] = rm.c0.a(mContext.getString(yf.h.f52621o1), customsHandlingPricing != null ? customsHandlingPricing.getPst() : null);
        vVarArr[4] = rm.c0.a(mContext.getString(yf.h.H0), customsHandlingPricing != null ? customsHandlingPricing.getHandlingFee() : null);
        n10 = sm.u.n(vVarArr);
        this.f24269e = n10;
    }

    @Override // androidx.recyclerview.widget.RecyclerView.h
    /* renamed from: F, reason: merged with bridge method [inline-methods] */
    public void u(b holder, int i10) {
        kotlin.jvm.internal.t.g(holder, "holder");
        rm.v vVar = (rm.v) this.f24269e.get(i10);
        String str = (String) vVar.a();
        String str2 = (String) vVar.b();
        if (str2 != null) {
            kotlin.jvm.internal.t.d(str);
            holder.O(str, str2, this.f24268d);
        }
    }

    @Override // androidx.recyclerview.widget.RecyclerView.h
    /* renamed from: G, reason: merged with bridge method [inline-methods] */
    public b w(ViewGroup parent, int i10) {
        kotlin.jvm.internal.t.g(parent, "parent");
        zf.k U = zf.k.U(LayoutInflater.from(parent.getContext()), parent, false);
        kotlin.jvm.internal.t.f(U, "inflate(...)");
        return new b(U);
    }

    @Override // androidx.recyclerview.widget.RecyclerView.h
    public int g() {
        return this.f24269e.size();
    }
}
