var __awaiter=this&&this.__awaiter||function(t,e,n,i){function r(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,o){function s(t){try{u(i.next(t))}catch(t){o(t)}}function a(t){try{u(i["throw"](t))}catch(t){o(t)}}function u(t){t.done?n(t.value):r(t.value).then(s,a)}u((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(t){return function(e){return u([t,e])}}function u(s){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,r&&(o=s[0]&2?r["return"]:s[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;if(r=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;r=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1];o=s;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(s);break}if(o[2])n.ops.pop();n.trys.pop();continue}s=e.call(t,n)}catch(t){s=[6,t];r=0}finally{i=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-343b3b10.system.js","./p-48ea6857.system.js","./p-83b75450.system.js","./p-577b99c3.system.js","./p-b0e93f3a.system.js","./p-fe1f76a3.system.js","./p-b3cf23d4.system.js","./p-451fa62c.system.js","./p-520803d3.system.js"],(function(t){"use strict";var e,n,i,r,o,s,a,u,l;return{setters:[function(t){e=t.r;n=t.c;i=t.h;r=t.H},function(t){o=t.C},function(t){s=t.S},function(t){a=t.s;u=t.d;l=t.e},function(){},function(){},function(){},function(){},function(){}],execute:function(){var c=t("mentornity_announcements_mailing_report",function(){function t(t){var i=this;e(this,t);this.openSelectUsersDialog=n(this,"openSelectUsersDialog",7);this.openAnnouncementReport=n(this,"openAnnouncementReport",7);this.setDictionaryLanguage=function(){return __awaiter(i,void 0,void 0,(function(){var t,e;return __generator(this,(function(n){switch(n.label){case 0:t=(new s).setLanguage(this.item.language).setContents(a);e=this;return[4,t.getContent(u,l)];case 1:e.strings=n.sent();return[2]}}))}))}}t.prototype.componentWillLoad=function(){this.setDictionaryLanguage()};t.prototype.render=function(){var t=this;var e,n,a,u,l,c,f;var m=this.strings;if(!m)return;var h=((n=(e=this.item)===null||e===void 0?void 0:e.targetList)===null||n===void 0?void 0:n.length)>0;var p=((u=(a=this.item)===null||a===void 0?void 0:a.sentEmailsAt)===null||u===void 0?void 0:u.length)>0&&o.format(((l=this.item)===null||l===void 0?void 0:l.sentEmailsAt[((f=(c=this.item)===null||c===void 0?void 0:c.sentEmailsAt)===null||f===void 0?void 0:f.length)-1])*1e3,"DD-MM-YYYY - ".concat(o.timeFormat==="12-hour"?"hh:mm A":"HH:mm"));return i(r,null,h?i("div",{class:"d-flex align-items-center"},i("p",{class:"m-0"},s.build(m.sentOn,{date:p})),i("strong",{class:"m-0 ml-3",style:{cursor:"pointer"},onClick:function(){return t.openAnnouncementReport.emit(t.item)}},i("dvn-icon",{iconName:"uil uil-envelope-check"}),m.checkReport)):i("div",{class:"d-flex align-items-center"},i("dvn-button",{tint:"primary",leaned:true,scale:"small",onClick:function(){return t.openSelectUsersDialog.emit(t.item)}},m.sendNow),i("p",{class:"m-0 ml-3"},m.notSent)))};return t}())}}}));