'use strict';

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

const index = require('./index-399a4a13.js');
const utils = require('./utils-311c1b40.js');

const badgeCss = ".ibk-badge{display:inline-block;position:absolute;font-family:var(--fontGeometria);font-size:10px;text-transform:uppercase;color:white;padding:7px 10px;font-weight:500;top:0}.ibk-badge--info{background-color:var(--secondaryBlue1)}.ibk-badge--promo{background-color:var(--extendedWatermelon1)}.ibk-badge--left{border-radius:4px 0 4px 0;left:0}.ibk-badge--right{border-radius:0 4px 0 4px;right:0}";

const IbkBadge = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    /** <strong>Info: </strong> color azul<br>
     * <strong>Promo: </strong>color rojo
     */
    this.type = 'info';
    /** Posición en la que se encuentra ubicado el badge */
    this.position = "left";
    /** Le agrega el estilo position relative al contenedor del badge para posicionarlo correctamente */
    this.setPositionRelativeToParent = () => {
      this.host.parentElement.style.position = 'relative';
    };
  }
  componentWillLoad() {
    this.setPositionRelativeToParent();
  }
  /** Configura la clase del componente basado en estados y modificadores */
  containerClass() {
    return utils.modifiersToClass('ibk-badge', [
      this.type,
      this.position
    ]);
  }
  render() {
    return (index.h("div", { class: this.containerClass(), innerHTML: this.text }));
  }
  get host() { return index.getElement(this); }
};
IbkBadge.style = badgeCss;

exports.ibk_badge = IbkBadge;
