var __awaiter=this&&this.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function c(e){try{l(i["throw"](e))}catch(e){o(e)}}function l(e){e.done?n(e.value):r(e.value).then(a,c)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,r&&(o=a[0]&2?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;if(r=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;r=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){n.label=a[1];break}if(a[0]===6&&n.label<o[1]){n.label=o[1];o=a;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(a);break}if(o[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];r=0}finally{i=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,h}from"./index-67f7ec52.js";import{b as benefitsEventTrackingService}from"./event-tracking.service-8d44e7ac.js";import"./api-client-a68152b8.js";import"./index-6869168f.js";import"./index-8f0ba0c8.js";import"./datorama-akita-d2413fd0.js";import"./scheduleArray-b9669898.js";import"./delay-d08c267f.js";import"./filter-aeb65cac.js";var benefitCardCss="ap-ben-benefit-card .fl-card-logo.img-fluid{height:1.25rem}";var BenefitCard=function(){function e(e){var t=this;registerInstance(this,e);this.onBenefitButtonClick=function(e){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){e.preventDefault();if(this.benefit.url===null)return[2];window.open(this.benefit.url,"_blank");benefitsEventTrackingService.trackBenefitLinkClickedAsync(this.benefitWithId);return[2]}))}))}}e.prototype.render=function(){var e=this;return h("div",{class:"row h-100 d-flex justify-content-between no-gutters",onClick:function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.onBenefitButtonClick(t)]}))}))}},h("div",{class:"col-9 col-md-12 col-lg-10 text-left"},h("h5",{class:"card-title mb-1"},this.benefit.title),h("h6",{class:"benefit-value-description"},this.benefit.subtitle),h("small",{class:"card-text text-muted text-uppercase"},this.benefit.description)),h("div",{class:"col-2 col-md-12 col-lg-2 d-flex justify-content-end align-items-center"},this.IconElement()))};Object.defineProperty(e.prototype,"benefit",{get:function(){return this.benefitWithId.benefit},enumerable:false,configurable:true});e.prototype.IconElement=function(){var e;if(this.benefit.icon!==null){return h("img",{class:"img-fluid",src:(e=this.benefit.icon)===null||e===void 0?void 0:e.downloadUrl,alt:""})}else{return h("ap-ben-icon",{class:"text-black-50 fa-3x",iconPrefix:"fad",iconId:"award"})}};return e}();BenefitCard.style=benefitCardCss;export{BenefitCard as ap_ben_benefit_card};