text: define ("core_message/message_drawer_view_contacts_section_requests",["jquery","core/notification","core/pubsub","core/templates","core_message/message_repository","core_message/message_drawer_events","core_message/message_drawer_lazy_load_list"],function(a,b,c,d,e,f,g){var h={CONTACT_REQUEST:"[data-region=\"contact-request\"]"},i={REQUESTS_LIST:"core_message/message_drawer_view_contacts_body_section_requests_list"},j=function(a,c){var e=c.map(function(a){return{id:a.id,profileimageurl:a.profileimageurl,fullname:a.fullname}});return d.render(i.REQUESTS_LIST,{requests:e}).then(function(b){a.append(b);return b}).catch(b.exception)},k=function(a,c){return e.getContactRequests(c).then(function(b){g.setLoadedAll(a,!0);return b}).catch(b.exception)},l=function(a){return function(b){a.find("[data-request-id=\""+b.userid+"\"]").remove();var c=a.find(h.CONTACT_REQUEST);if(!c.length){g.showEmptyMessage(a);g.hideContent(a)}}},m=function(a){c.subscribe(f.CONTACT_REQUEST_ACCEPTED,l(a));c.subscribe(f.CONTACT_REQUEST_DECLINED,l(a))};return{show:function show(a){if(!a.attr("data-contacts-init")){m(a);a.attr("data-contacts-init",!0)}g.show(a,k,j)}}});
  //# sourceMappingURL=message_drawer_view_contacts_section_requests.min.js.map
  