!function(){"use strict";vart,e={25381:function(t,e,n){varr=n(92541),o=(n(25101),n(13080),n(52004),n(28407),n(56394),n(38288),n(55677),n(92129),n(24655),n(35466)),i=n(3074),u=n.n(i),a=n(43613),c=n(20541),l=n(25910),s=n(9700);functionf(t){return(f="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(t){returntypeoft}:function(t){returnt&&"function"==typeofSymbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeoft})(t)}functionp(t,e){for(varn=0;n<e.length;n++){varr=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"inr&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}functionm(t,e){return(m=Object.setPrototypeOf||function(t,e){returnt.__proto__=e,t})(t,e)}functiony(t,e){return!e||"object"!==f(e)&&"function"!=typeofe?d(t):e}functiond(t){if(void0===t)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");returnt}functionb(t){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(t){returnt.__proto__||Object.getPrototypeOf(t)})(t)}functionv(t,e,n){returnt+"?"+e+(""===e?"":"&")+"page="+n}varg=function(t){!function(t,e){if("function"!=typeofe&&null!==e)thrownewTypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&m(t,e)}(f,t);vare,n,r,i,u=(r=f,i=function(){if("undefined"==typeofReflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeofProxy)return!0;try{returnBoolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){vart,e=b(r);if(i){varn=b(this).constructor;t=Reflect.construct(e,arguments,n)}elset=e.apply(this,arguments);returny(this,t)});functionf(t){vare;returnfunction(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}(this,f),(e=u.call(this,t,"manage-comments")).state={resultsCount:null,requestUrl:a.ApiUrlContext._currentValue.manage.comments,currentPage:1,sortingArgs:"",sortBy:"add_date",ordering:"desc",refresh:0},e.getCountFunc=e.getCountFunc.bind(d(e)),e.onTablePageChange=e.onTablePageChange.bind(d(e)),e.onColumnSortClick=e.onColumnSortClick.bind(d(e)),e.onItemsRemoval=e.onItemsRemoval.bind(d(e)),e.onItemsRemovalFail=e.onItemsRemovalFail.bind(d(e)),e}returne=f,(n=[{key:"onTablePageChange",value:function(t,e){this.setState({currentPage:e,requestUrl:v(a.ApiUrlContext._currentValue.manage.comments,this.state.sortingArgs,e)})}},{key:"getCountFunc",value:function(t){this.setState({resultsCount:t})}},{key:"onColumnSortClick",value:function(t,e){varn="sort_by="+t+"&ordering="+e;this.setState({sortBy:t,ordering:e,sortingArgs:n,requestUrl:v(a.ApiUrlContext._currentValue.manage.comments,n,this.state.currentPage)})}},{key:"onItemsRemoval",value:function(t){this.setState({resultsCount:null,refresh:this.state.refresh+1,requestUrl:a.ApiUrlContext._currentValue.manage.comments},(function(){t?c.PageActions.addNotification("The comments deleted successfully.","commentsRemovalSucceed"):c.PageActions.addNotification("The comment deleted successfully.","commentRemovalSucceed")}))}},{key:"onItemsRemovalFail",value:function(t){t?c.PageActions.addNotification("The comments removal failed. Please try again.","commentsRemovalFailed"):c.PageActions.addNotification("The comment removal failed. Please try again.","commentRemovalFailed")}},{key:"pageContent",value:function(){returno.createElement(l.MediaListWrapper,{title:this.props.title+(null===this.state.resultsCount?"":" ("+this.state.resultsCount+")"),className:"search-results-wrap items-list-hor"},o.createElement(s.d,{pageItems:50,manageType:"comments",key:this.state.requestUrl+"["+this.state.refresh+"]",itemsCountCallback:this.getCountFunc,requestUrl:this.state.requestUrl,onPageChange:this.onTablePageChange,sortBy:this.state.sortBy,ordering:this.state.ordering,onRowsDelete:this.onItemsRemoval,onRowsDeleteFail:this.onItemsRemovalFail,onClickColumnSort:this.onColumnSortClick}))}}])&&p(e.prototype,n),f}(n(58204).T);g.propTypes={title:u().string.isRequire