(function(){var n={displayName:"AutoSuggest:Icon",getInitialState:function(){var t=this.props||{},r=t.viewData||{},f=t.properties||{},n={},o=r.TestHooksEnabled,e=f.Icon,u=string.Empty,i;return n.fontIcon=u,i={},n.bgColor=i,n},render:function(){var ft=this,t=this.props||{},nt=t.viewData||{},g=t.properties||{},k=[],i=t.encoder||Sparkle.defaultEncoder,tt=nt.TestHooksEnabled,n=g.Icon,d=this.state.fontIcon,b=this.state.bgColor,c={},h,o,f,r,s,v,p,e,u,a,y,l,w;if(tt&&(c["data-partnertag"]=i.writeAttribute("Suggestion.Icon")),c.className=i.writeAttribute("iconContainer"),h=Sparkle.copyContext(t,c),b=n&&n.bgColor?{backgroundColor:n.bgColor}:{},o={},o.style=i.writeAttribute(b),f="",f+="icon",n&&n.type==2&&(f+=" bingFontIcon"),f&&(o.className=i.writeAttribute(f)),r=Sparkle.copyContext(t,o),n)if(n.type==3){var rt={},ut=Sparkle.resolveView("AutoSuggest:CortanaIcon"),it=Sparkle.copyContext(t,rt);r.defaultSegment.push(ut.renderView(it))}else n.content&&(n.type==0?(s={},s.src=i.writeAttribute(n.content),v=Sparkle.resolveView("img"),p=Sparkle.copyContext(t,s),r.defaultSegment.push(v.renderView(p))):(e={},u="",u+="iconContent",n.needsAccentColor&&(u+=" accentColor"),u&&(e.className=i.writeAttribute(u)),a=Sparkle.copyContext(t,e),d=n.content,e.dangerouslySetInnerHTML={__html:i.writeUnencodedContent(d)},y=Sparkle.resolveView("span").renderView(a),r.defaultSegment.push(y)));return l=Sparkle.resolveView("div").renderView(r),h.defaultSegment.push(l),w=Sparkle.resolveView("div").renderView(h),k.push(w),Sparkle.ReactImpl.returnSingleNode(k,t)}};Sparkle.ReactImpl.registerView(n)})()