package cc;

import android.content.Context;
import ca.canadapost.core.data.model.RepositoryError;
import ca.canadapost.core.data.model.ResultWrapper;
import ca.canadapost.core.data.model.ValidationError;
import w8.o;

/* loaded from: classes4.dex */
public final class n implements w8.o {

    /* loaded from: classes4.dex */
    public /* synthetic */ class a {

        /* renamed from: a, reason: collision with root package name */
        public static final /* synthetic */ int[] f11681a;

        static {
            int[] iArr = new int[RepositoryError.values().length];
            try {
                iArr[RepositoryError.ServiceError.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            f11681a = iArr;
        }
    }

    @Override // w8.o
    public String a(Context context) {
        return o.a.h(this, context);
    }

    public void b(l8.c cVar, androidx.fragment.app.f fVar) {
        o.a.a(this, cVar, fVar);
    }

    @Override // w8.o
    public String d(Context context) {
        return o.a.g(this, context);
    }

    @Override // w8.o
    public void e(ResultWrapper.Error error, Context context) {
        o.a.i(this, error, context);
    }

    @Override // w8.o
    public void g(androidx.fragment.app.f fVar, ResultWrapper.Error error) {
        o.a.l(this, fVar, error);
    }

    @Override // w8.o
    public String h(Context context) {
        return o.a.f(this, context);
    }

    @Override // w8.o
    public String i(ValidationError validationError, Context context) {
        return o.a.d(this, validationError, context);
    }

    @Override // w8.o
    public String j(String str, Context context) {
        return o.a.e(this, str, context);
    }

    @Override // w8.o
    public void k(ValidationError validationError, Context context) {
        o.a.m(this, validationError, context);
    }

    @Override // w8.o
    public void l(androidx.fragment.app.f fragment, ResultWrapper.Error error) {
        kotlin.jvm.internal.t.g(fragment, "fragment");
        kotlin.jvm.internal.t.g(error, "error");
        if (a.f11681a[error.getError().ordinal()] != 1) {
            o.a.j(this, fragment, error);
        } else {
            x4.d.a(fragment).N(ob.i.I0, androidx.core.os.c.a(rm.c0.a("error_title", fragment.getString(ob.l.L1)), rm.c0.a("error_message", fragment.getString(ob.l.K1)), rm.c0.a("button_text", fragment.getString(ob.l.G1))));
        }
    }

    @Override // w8.o
    public String m(ValidationError validationError, Context context) {
        return o.a.b(this, validationError, context);
    }

    @Override // w8.o
    public String n(String str, String str2, Context context) {
        return o.a.c(this, str, str2, context);
    }

    @Override // w8.o
    public void o(Context context) {
        o.a.k(this, context);
    }
}
