package ca.canadapost.module.postal;

import android.util.SparseIntArray;
import android.view.View;
import androidx.databinding.d;
import androidx.databinding.e;
import androidx.databinding.n;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import re.o;
import se.b;
import se.f;

/* loaded from: classes4.dex */
public class DataBinderMapperImpl extends d {

    /* renamed from: a, reason: collision with root package name */
    private static final SparseIntArray f10607a;

    /* loaded from: classes4.dex */
    private static class a {

        /* renamed from: a, reason: collision with root package name */
        static final HashMap f10608a;

        static {
            HashMap hashMap = new HashMap(3);
            f10608a = hashMap;
            hashMap.put("layout/activity_postal_0", Integer.valueOf(o.f34674a));
            hashMap.put("layout/find_postal_code_fragment_0", Integer.valueOf(o.f34675b));
            hashMap.put("layout/google_map_fragment_0", Integer.valueOf(o.f34676c));
        }
    }

    static {
        SparseIntArray sparseIntArray = new SparseIntArray(3);
        f10607a = sparseIntArray;
        sparseIntArray.put(o.f34674a, 1);
        sparseIntArray.put(o.f34675b, 2);
        sparseIntArray.put(o.f34676c, 3);
    }

    @Override // androidx.databinding.d
    public List a() {
        ArrayList arrayList = new ArrayList(4);
        arrayList.add(new androidx.databinding.library.baseAdapters.DataBinderMapperImpl());
        arrayList.add(new ca.canadapost.core.common.DataBinderMapperImpl());
        arrayList.add(new ca.canadapost.core.data.DataBinderMapperImpl());
        arrayList.add(new ca.canadapost.module.addresscomplete.DataBinderMapperImpl());
        return arrayList;
    }

    @Override // androidx.databinding.d
    public n b(e eVar, View view, int i10) {
        int i11 = f10607a.get(i10);
        if (i11 <= 0) {
            return null;
        }
        Object tag = view.getTag();
        if (tag == null) {
            throw new RuntimeException("view must have a tag");
        }
        if (i11 == 1) {
            if ("layout/activity_postal_0".equals(tag)) {
                return new b(eVar, view);
            }
            throw new IllegalArgumentException("The tag for activity_postal is invalid. Received: " + tag);
        }
        if (i11 == 2) {
            if ("layout/find_postal_code_fragment_0".equals(tag)) {
                return new se.d(eVar, view);
            }
            throw new IllegalArgumentException("The tag for find_postal_code_fragment is invalid. Received: " + tag);
        }
        if (i11 != 3) {
            return null;
        }
        if ("layout/google_map_fragment_0".equals(tag)) {
            return new f(eVar, view);
        }
        throw new IllegalArgumentException("The tag for google_map_fragment is invalid. Received: " + tag);
    }

    @Override // androidx.databinding.d
    public n c(e eVar, View[] viewArr, int i10) {
        if (viewArr == null || viewArr.length == 0 || f10607a.get(i10) <= 0 || viewArr[0].getTag() != null) {
            return null;
        }
        throw new RuntimeException("view must have a tag");
    }

    @Override // androidx.databinding.d
    public int d(String str) {
        Integer num;
        if (str == null || (num = (Integer) a.f10608a.get(str)) == null) {
            return 0;
        }
        return num.intValue();
    }
}
