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{a(i.next(t))}catch(t){o(t)}}function c(t){try{a(i["throw"](t))}catch(t){o(t)}}function a(t){t.done?n(t.value):r(t.value).then(s,c)}a((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:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(t){return function(e){return a([t,e])}}function a(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-6c8594d0.system.js","./p-63ad215f.system.js","./p-45d6fbc2.system.js","./p-9a8c9350.system.js","./p-0045ce79.system.js","./p-19b00569.system.js","./p-6efcc4fd.system.js","./p-0eebae53.system.js","./p-d19c8a5d.system.js"],(function(t){"use strict";var e,n,i;return{setters:[function(t){e=t.r;n=t.h},function(t){i=t.b},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var r="ap-ben-benefit-list-item .btn.btn-success{background-color:#27a88a;border-color:#27a88a}ap-ben-benefit-list-item .btn.btn-success:hover{background-color:#23967b;border-color:#23967b}ap-ben-benefit-list-item .btn.btn-success:not(:disabled):not(.disabled):active{background-color:#23967b;border-color:#23967b}@media (max-width: 575.98px){ap-ben-benefit-list-item .btn.btn-success{display:block;width:100%}}ap-ben-benefit-list-item .benefit-image{-o-object-fit:cover;object-fit:cover;width:100%;max-width:4rem}";var o=t("ap_ben_benefit_list_item",function(){function t(t){var n=this;e(this,t);this.onBenefitButtonClick=function(){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(this.benefit.url===null)return[2];window.open(this.benefit.url,"_blank");return[4,i.trackBenefitLinkClickedAsync(this.benefitWithId)];case 1:t.sent();return[2]}}))}))}}t.prototype.render=function(){return n("div",{class:"uiid-view-benefit-item-exist row align-items-top py-3 mx-0"},n("div",{class:"col-4 col-md-2 col-lg-1 px-0"},n("div",{class:"ml-0 my-lg-3 my-sm-2 my-xs-2 mr-3"},this.IconElement())),n("div",{class:"col-12 col-lg-8 text-left px-lg-2 px-0 pt-lg-0 pt-3"},n("h4",{class:"card-title mb-1 text-break"},this.benefit.title),n("span",{class:"benefit-value-description text-break"},this.benefit.subtitle),this.benefit.subtitle&&" - ",n("span",{class:"text-muted"},this.benefit.category),n("p",{class:"mb-0 pt-lg-3 pt-4 text-break"},this.benefit.description)),n("div",{class:"col-12 col-lg-3 px-0 d-flex justify-content-end align-items-start"},this.openAttachmentButton(),this.learnMoreButton()))};Object.defineProperty(t.prototype,"benefit",{get:function(){return this.benefitWithId.benefit},enumerable:false,configurable:true});t.prototype.learnMoreButton=function(){var t=this;if(this.benefit.url===null||this.benefit.url===""){return undefined}return n("button",{type:"button",class:"uiid-validate-benefit-url-exist d-block d-lg-inline-block btn btn-light px-4 py-2 ml-2",onClick:function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.onBenefitButtonClick()]}))}))}},"Learn more")};t.prototype.openAttachmentButton=function(){var t=this;var e;if(this.benefit.attachments===null||((e=this.benefit.attachments)===null||e===void 0?void 0:e.length)===0){return undefined}return n("a",{class:"uiid-validate-benefit-doc-exist d-block d-lg-inline-block btn btn-light px-4 py-2",target:"_blank",href:this.benefit.attachments[0].downloadUrl,onClick:function(e){return i.trackBenefitAttachmentClickedAsync(t.benefitWithId)}},n("span",null,"View"))};t.prototype.IconElement=function(){if(this.benefit.icon!==null){return n("img",{src:this.benefit.icon.downloadUrl,class:"img-responsive benefit-image",alt:"benefit-icon"})}else{return n("ap-ben-icon",{class:"text-black-50 fa-3x",iconPrefix:"fad",iconId:"award"})}};return t}());o.style=r}}}));