'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-d685a739.js');
const eventTracking_service = require('./event-tracking.service-fcc820f1.js');
require('./api-client-00edc9b6.js');
require('./index-4f00f593.js');
require('./index-889ce6c6.js');
require('./datorama-akita-bb801820.js');
require('./scheduleArray-0ba3d6f8.js');
require('./delay-e91dba76.js');
require('./filter-c38164e6.js');

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

const BenefitCard = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    this.onBenefitButtonClick = async (event) => {
      event.preventDefault();
      if (this.benefit.url === null)
        return;
      window.open(this.benefit.url, '_blank');
      eventTracking_service.benefitsEventTrackingService.trackBenefitLinkClickedAsync(this.benefitWithId);
    };
  }
  render() {
    return (index.h("div", { class: "row h-100 d-flex justify-content-between no-gutters", onClick: async (event) => this.onBenefitButtonClick(event) }, index.h("div", { class: "col-9 col-md-12 col-lg-10 text-left" }, index.h("h5", { class: "card-title mb-1" }, this.benefit.title), index.h("h6", { class: "benefit-value-description" }, this.benefit.subtitle), index.h("small", { class: "card-text text-muted text-uppercase" }, this.benefit.description)), index.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 index.h("img", { class: "img-fluid", src: (_a = this.benefit.icon) === null || _a === void 0 ? void 0 : _a.downloadUrl, alt: "" });
    }
    else {
      return index.h("ap-ben-icon", { class: "text-black-50 fa-3x", iconPrefix: "fad", iconId: "award" });
    }
  }
};
BenefitCard.style = benefitCardCss;

exports.ap_ben_benefit_card = BenefitCard;
