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