package com.mbridge.msdk.dycreator.baseview; import android.content.Context; import android.util.AttributeSet; import android.widget.Button; import com.mbridge.msdk.dycreator.baseview.inter.InterBase; import com.mbridge.msdk.dycreator.e.a; import com.mbridge.msdk.dycreator.e.c; import com.mbridge.msdk.foundation.entity.CampaignEx; import com.mbridge.msdk.foundation.same.report.k; import java.util.Map; /* loaded from: classes4.dex */ public class MBButton extends Button implements InterBase { private Map a; private Map b; private String c; public MBButton(Context context) { super(context); this.c = ""; } public MBButton(Context context, AttributeSet attributeSet) { super(context); this.c = ""; this.a = c.a(context, attributeSet); a.a(this, attributeSet); c.a(this.a, this); } public MBButton(Context context, AttributeSet attributeSet, int i) { super(context, attributeSet, i); this.c = ""; } @Override // android.widget.TextView, android.view.View public void onAttachedToWindow() { super.onAttachedToWindow(); Map map = this.b; if (map != null && map.containsKey("mbridgeAttached") && this.b.get("mbridgeAttached").booleanValue()) { new k.a("mbridgeAttached").a().a(this.c); } } @Override // android.view.View public void onDetachedFromWindow() { super.onDetachedFromWindow(); Map map = this.b; if (map != null && map.containsKey("mbridgeDetached") && this.b.get("mbridgeDetached").booleanValue()) { new k.a("mbridgeDetached").a().a(this.c); } } @Override // com.mbridge.msdk.dycreator.baseview.inter.InterBase public String getBindDataDes() { Map map = this.a; return (map == null || !map.containsKey("mbridgeData")) ? "" : this.a.get("mbridgeData"); } @Override // com.mbridge.msdk.dycreator.baseview.inter.InterBase public String getActionDes() { Map map = this.a; return (map == null || !map.containsKey("mbridgeAction")) ? "" : this.a.get("mbridgeAction"); } @Override // com.mbridge.msdk.dycreator.baseview.inter.InterBase public String getStrategyDes() { Map map = this.a; return (map == null || !map.containsKey("mbridgeStrategy")) ? "" : this.a.get("mbridgeStrategy"); } @Override // com.mbridge.msdk.dycreator.baseview.inter.InterBase public String getEffectDes() { Map map = this.a; return (map == null || !map.containsKey("mbridgeEffect")) ? "" : this.a.get("mbridgeEffect"); } @Override // com.mbridge.msdk.dycreator.baseview.inter.InterBase public String getReportDes() { Map map = this.a; return (map == null || !map.containsKey("mbridgeReport")) ? "" : this.a.get("mbridgeReport"); } @Override // com.mbridge.msdk.dycreator.baseview.inter.InterBase public void setDynamicReport(String str, CampaignEx campaignEx) { this.b = c.a(str); if (campaignEx != null) { this.c = campaignEx.getCampaignUnitId(); } } }