define("siteButton",["lodash","react","core","santaProps","buttonCommon","coreUtils","utils","experiment"],function(a,b,c,d,e,f,g,h){"use strict";var i=g.linkRenderer;var j=f.anchorTagsGenerator;return{displayName:"SiteButton",mixins:[c.compMixins.skinBasedComp,e.buttonMixin],propTypes:{compData:d.Types.Component.compData,isMobileDevice:d.Types.Device.isMobileDevice,isMobileView:d.Types.isMobileView,linkRenderInfo:d.Types.Link.linkRenderInfo,rootNavigationInfo:d.Types.Component.rootNavigationInfo},statics:{useSantaTypes:true},getDefaultProps:function(){return{shouldUseFlex:true}},getInitialState:function(){return{$mobile:this.props.isMobileDevice?"mobile":"desktop",$shouldUseFlex:this.props.shouldUseFlex?"shouldUseFlex":"",$align:this.props.compProp.align}},componentWillReceiveProps:function(a){this.setState({$align:a.compProp.align})},getImpliedLink:function(){if(this.props.noAutoLinkGeneration){return}var b=j.getIncludedPatterns(h,this.props.isMobileView);return a.first(j.findDataForAnchors(this.props.compData.label,b))},getLinkSkinPart:function(){var a=this.props.compData;var c=this.props.compProp;var d={parentConst:b.DOM.div};if(c.isDisabled){return d}if(a.link){return i.renderLink(a.link,this.props.linkRenderInfo,this.props.rootNavigationInfo)}return this.getImpliedLink()||d},getSkinProperties:function(){this.lastScale=a.get(this,"props.structure.layout.scale")||1;var b=this.props.compData;var c=this.props.compProp;var d=!!c.isDisabled;var e=this.getLinkSkinPart();e.style={};if(!this.props.shouldUseFlex){e.style.textAlign=c.align}var f={"":{id:this.props.id,key:"f"+this.getDesktopFontSize(this.props)*this.currentScale,ref:this.props.id,"data-align":c.align,"data-disabled":d,"data-margin":c.margin,"data-should-use-flex":this.props.shouldUseFlex},label:{children:[b.label],style:this.getLabelStyle()},link:e};if(this.props.onClick&&!d){f[""].onClick=this.props.onClick}this.resetMinHeightIfNeeded(f);return f}}});