package j;

import d.C0425e;
import g.C0474a;
import h.t;
import i.C0516I;
import i.U;
import i.e0;
import java.lang.reflect.Type;
import java.math.BigDecimal;
import javax.money.Monetary;
import org.javamoney.moneta.Money;

/* JADX INFO: renamed from: j.a, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public class C0550a implements U, t {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public static final C0550a f4516a = new C0550a();

    @Override // i.U
    public void a(C0516I c0516i, Object obj, Object obj2, Type type, int i2) {
        Money money = (Money) obj;
        if (money == null) {
            c0516i.x();
            return;
        }
        e0 e0Var = c0516i.f4223k;
        e0Var.A('{', "numberStripped", money.getNumberStripped());
        e0Var.z(',', "currency", money.getCurrency().getCurrencyCode());
        e0Var.write(125);
    }

    @Override // h.t
    public Object b(C0474a c0474a, Type type, Object obj) {
        C0425e c0425eL = c0474a.L();
        Object obj2 = c0425eL.get("currency");
        String strS = obj2 instanceof C0425e ? ((C0425e) obj2).s("currencyCode") : obj2 instanceof String ? (String) obj2 : null;
        Object obj3 = c0425eL.get("numberStripped");
        if (obj3 instanceof BigDecimal) {
            return Money.of((BigDecimal) obj3, Monetary.getCurrency(strS, new String[0]));
        }
        throw new UnsupportedOperationException();
    }

    @Override // h.t
    public int d() {
        return 0;
    }
}
