define("facebookComments",["lodash","core","react","socialCommon","santaProps"],function(a,b,c,d,e){"use strict";var f=b.compMixins;var g=["xfbml.render","xfbml.resize","comment.create","comment.remove"];return{displayName:"WFacebookComment",mixins:[f.skinBasedComp,f.timeoutsMixin,d.facebookComponentMixin,d.socialCompMixin],scriptDesc:null,propTypes:{id:e.Types.Component.id.isRequired,isMobileView:e.Types.isMobileView.isRequired,compData:e.Types.Component.compData.isRequired,compProp:e.Types.Component.compProp.isRequired,registerReLayoutPending:e.Types.Layout.registerReLayoutPending.isRequired},statics:{useSantaTypes:true},getInitialState:function(){if(typeof window!=="undefined"){window.fbAsyncInit=this.subscribeToFacebookEvents}return{ready:false,lastEventTimeStamp:Date.now()}},commentsAreReady:function(){this.props.registerReLayoutPending(this.props.id);this.setState({lastEventTimeStamp:Date.now()})},subscribeToFacebookEvents:function(){a.forEach(g,function(a){window.FB.Event.subscribe(a,this.commentsAreReady)},this)},getHref:function(){return this.getSocialUrl()},componentDidMount:function(){if(window.FB){this.subscribeToFacebookEvents()}},componentWillUnmount:function(){if(window.FB){a.forEach(g,function(a){window.FB.Event.unsubscribe(a,this.commentsAreReady)},this)}},getSkinProperties:function(){return{facebook:{children:c.DOM.div({className:"fb-comments","data-href":this.getHref(),"data-width":this.props.isMobileView?320:this.props.compProp.width,"data-numposts":this.props.compProp.numPosts,"data-colorscheme":this.props.compProp.colorScheme,"data-mobile":false})}}}}});