package com.mbridge.msdk.mbbid.out; import android.content.Context; import android.text.TextUtils; import com.mbridge.msdk.foundation.controller.authoritycontroller.c; import com.mbridge.msdk.foundation.tools.af; import com.mbridge.msdk.mbbid.common.a.b; import java.util.Map; /* loaded from: classes4.dex */ public class BidManager { private b a; private BidListennning b; private boolean c; public void setRewardPlus(boolean z) { this.c = z; } public BidManager(String str, String str2) { this(str, str2, "0"); } public BidManager(String str, String str2, String str3) { this.c = false; this.a = new b(str, str2, str3); } public BidManager(T t) { this(t == null ? "" : t.getmPlacementId(), t == null ? "" : t.getmUnitId(), t != null ? t.getmFloorPrice() : ""); if (t instanceof BannerBidRequestParams) { BannerBidRequestParams bannerBidRequestParams = (BannerBidRequestParams) t; this.a.a(bannerBidRequestParams.getHeight()); this.a.b(bannerBidRequestParams.getWidth()); this.a.b(296); if (t instanceof SplashBidRequestParams) { SplashBidRequestParams splashBidRequestParams = (SplashBidRequestParams) t; this.a.a(splashBidRequestParams.a()); this.a.a(splashBidRequestParams.getOrientation()); this.a.b(297); return; } return; } if (t instanceof AdvancedNativeBidRequestParams) { AdvancedNativeBidRequestParams advancedNativeBidRequestParams = (AdvancedNativeBidRequestParams) t; this.a.a(advancedNativeBidRequestParams.getHeight()); this.a.b(advancedNativeBidRequestParams.getWidth()); this.a.b(298); } } public void bid() { b bVar = this.a; if (bVar != null) { bVar.b(this.c); return; } BidListennning bidListennning = this.b; if (bidListennning != null) { bidListennning.onFailed("you need init the class :BidManager"); } } public static String getBuyerUid(Context context) { if (com.mbridge.msdk.e.b.a()) { try { c.c(true); } catch (Throwable th) { af.b("BidManager", th.getMessage()); } } return com.mbridge.msdk.mbbid.common.b.a(context, ""); } public static String getBuyerUid(Context context, String str) { if (com.mbridge.msdk.e.b.a()) { try { c.c(true); } catch (Throwable th) { af.b("BidManager", th.getMessage()); } } if (TextUtils.isEmpty(str)) { str = ""; } return com.mbridge.msdk.mbbid.common.b.a(context, str); } public static String getBuyerUid(Context context, Map map) { if (com.mbridge.msdk.e.b.a()) { try { c.c(true); } catch (Throwable th) { af.b("BidManager", th.getMessage()); } } return com.mbridge.msdk.mbbid.common.b.a(context, map); } public void setBidListener(BidListennning bidListennning) { this.b = bidListennning; b bVar = this.a; if (bVar != null) { bVar.a(bidListennning); } } }