"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),t=require("@babel/runtime/helpers/assertThisInitialized"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),u=require("@babel/runtime/helpers/defineProperty"),a=require("react"),s=require("prop-types"),l=require("@material-ui/core/styles"),c=require("./LoadingIndicator/LoadingIndicator.js"),p=require("./CommentWrapper.js"),d=require("react/jsx-runtime");function f(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=f(e),m=f(r),b=f(t),y=f(n),q=f(o),v=f(i),w=f(u),x=f(s);function j(e){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,n=v.default(e);if(r){var o=v.default(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return q.default(this,t)}}var I={loadingIndicatorWrapper:{padding:"0 20px 0 0"}},R=function(e){y.default(t,e);var r=j(t);function t(e){var n;return h.default(this,t),n=r.call(this,e),w.default(b.default(n),"showIntoView",(function(){n.commentLoaderEl.current.scrollIntoView({block:"end"})})),n.commentLoaderEl=a.createRef(),n}return m.default(t,[{key:"componentDidMount",value:function(){this.props.showOnMount&&this.showIntoView()}},{key:"render",value:function(){return d.jsx("div",{ref:this.commentLoaderEl,children:d.jsx(p,{spaceAround:this.props.spaceAround,isLoader:!0,className:this.props.classes.commentWrapper,children:d.jsx("div",{style:I.loadingIndicatorWrapper,children:d.jsx(c,{fullscreen:!1,size:30})})})})}}]),t}(a.PureComponent);R.propTypes={showOnMount:x.default.bool,spaceAround:x.default.bool,classes:x.default.shape({}).isRequired},R.defaultProps={showOnMount:!1,spaceAround:!1};var g=l.withStyles({commentWrapper:{width:"calc(100% - 28px)"}})(R);module.exports=g;
//# sourceMappingURL=CommentLoader.js.map
