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';

const benefitCardCss = "ap-ben-benefit-card .fl-card-logo.img-fluid{height:1.25rem}";

const BenefitCard = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
    this.onBenefitButtonClick = async (event) => {
      event.preventDefault();
      if (this.benefit.url === null)
        return;
      window.open(this.benefit.url, '_blank');
      benefitsEventTrackingService.trackBenefitLinkClickedAsync(this.benefitWithId);
    };
  }
  render() {
    return (h("div", { class: "row h-100 d-flex justify-content-between no-gutters", onClick: async (event) => this.onBenefitButtonClick(event) }, 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())));
  }
  get benefit() {
    return this.benefitWithId.benefit;
  }
  IconElement() {
    var _a;
    if (this.benefit.icon !== null) {
      return h("img", { class: "img-fluid", src: (_a = this.benefit.icon) === null || _a === void 0 ? void 0 : _a.downloadUrl, alt: "" });
    }
    else {
      return h("ap-ben-icon", { class: "text-black-50 fa-3x", iconPrefix: "fad", iconId: "award" });
    }
  }
};
BenefitCard.style = benefitCardCss;

export { BenefitCard as ap_ben_benefit_card };
