import{r as t,h as i}from"./p-91e1cdd0.js";import{b as e}from"./p-d14b00d9.js";import"./p-7062880e.js";import"./p-2c9dd7c4.js";import"./p-7ad92407.js";import"./p-f3effa5d.js";import"./p-ea120e31.js";import"./p-054d1471.js";import"./p-f63d9d89.js";const s=class{constructor(i){t(this,i),this.onBenefitButtonClick=async()=>{null!==this.benefit.url&&(window.open(this.benefit.url,"_blank"),await e.trackBenefitLinkClickedAsync(this.benefitWithId))}}render(){return i("div",{class:"uiid-view-benefit-item-exist row align-items-top py-3 mx-0"},i("div",{class:"col-4 col-md-2 col-lg-1 px-0"},i("div",{class:"ml-0 my-lg-3 my-sm-2 my-xs-2 mr-3"},this.IconElement())),i("div",{class:"col-12 col-lg-8 text-left px-lg-2 px-0 pt-lg-0 pt-3"},i("h4",{class:"card-title mb-1 text-break"},this.benefit.title),i("span",{class:"benefit-value-description text-break"},this.benefit.subtitle),this.benefit.subtitle&&" - ",i("span",{class:"text-muted"},this.benefit.category),i("p",{class:"mb-0 pt-lg-3 pt-4 text-break"},this.benefit.description)),i("div",{class:"col-12 col-lg-3 px-0 d-flex justify-content-end align-items-start"},this.openAttachmentButton(),this.learnMoreButton()))}get benefit(){return this.benefitWithId.benefit}learnMoreButton(){if(null!==this.benefit.url&&""!==this.benefit.url)return i("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:async()=>this.onBenefitButtonClick()},"Learn more")}openAttachmentButton(){var t;if(null!==this.benefit.attachments&&0!==(null===(t=this.benefit.attachments)||void 0===t?void 0:t.length))return i("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:()=>e.trackBenefitAttachmentClickedAsync(this.benefitWithId)},i("span",null,"View"))}IconElement(){return null!==this.benefit.icon?i("img",{src:this.benefit.icon.downloadUrl,class:"img-responsive benefit-image",alt:"benefit-icon"}):i("ap-ben-icon",{class:"text-black-50 fa-3x",iconPrefix:"fad",iconId:"award"})}};s.style="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}";export{s as ap_ben_benefit_list_item}