package io.github.inflationx.calligraphy3; import android.content.Context; import android.view.View; import o.C13122fRd; import o.C14957gcv; import o.InterfaceC13128fRj; /* loaded from: classes.dex */ public class CalligraphyInterceptor implements InterfaceC13128fRj { private final Calligraphy calligraphy; public CalligraphyInterceptor(CalligraphyConfig calligraphyConfig) { this.calligraphy = new Calligraphy(calligraphyConfig); } @Override // o.InterfaceC13128fRj public C13122fRd intercept(InterfaceC13128fRj.IeS ieS) { C13122fRd b = ieS.b(ieS.a()); View onViewCreated = this.calligraphy.onViewCreated(b.c, b.a, b.d); C13122fRd.IeS ieS2 = new C13122fRd.IeS(b); ieS2.c = onViewCreated; String str = ieS2.d; if (str == null) { throw new IllegalStateException("name == null".toString()); } View view = ieS2.c; if (view == null) { view = null; } else if (!C14957gcv.b((Object) str, (Object) view.getClass().getName())) { StringBuilder sb = new StringBuilder("name ("); sb.append(str); sb.append(") must be the view's fully qualified name ("); sb.append(view.getClass().getName()); sb.append(')'); throw new IllegalStateException(sb.toString().toString()); } Context context = ieS2.b; if (context != null) { return new C13122fRd(view, str, context, ieS2.e); } throw new IllegalStateException("context == null"); } }