import { Component, Event, h, Prop } from "@stencil/core";
import { modifiersToClass } from '../../utils/utils';
export class IbkButtonInline {
  constructor() {
    /** Posición del ícono si existiera */
    this.iconPosition = 'left';
    /** Determina si le botón se encuentra deshabilitado */
    this.disable = false;
    /** Determina si el enlace se abre en una nueva ventana o en la misma */
    this.hrefTarget = '_self';
    /** Configura la clase del componente basado en estados y modificadores */
    this.containerClass = () => {
      return modifiersToClass('ibk-button-inline', [`icon-${this.iconPosition}`]);
    };
  }
  render() {
    if (this.href) {
      return (h("a", { href: this.href, target: this.hrefTarget, class: this.containerClass() },
        this.icon && h("i", { class: 'ibk-button-inline__icon ' + this.icon }),
        this.text && h("span", { class: "ibk-button-inline__text" }, this.text)));
    }
    else {
      return (h("button", { type: "button", class: this.containerClass(), onClick: this.onclick.emit },
        this.icon && h("i", { class: 'ibk-button-inline__icon ' + this.icon }),
        this.text && h("span", { class: "ibk-button-inline__text", innerHTML: this.text })));
    }
  }
  static get is() { return "ibk-button-inline"; }
  static get originalStyleUrls() { return {
    "$": ["button-inline.css"]
  }; }
  static get styleUrls() { return {
    "$": ["button-inline.css"]
  }; }
  static get properties() { return {
    "text": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "Contenido del bot\u00F3n"
      },
      "attribute": "text",
      "reflect": false
    },
    "icon": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "\u00CDcono que describe la acci\u00F3n. Puede ir acompa\u00F1ado de un texto"
      },
      "attribute": "icon",
      "reflect": false
    },
    "iconPosition": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "'left' | 'right'",
        "resolved": "\"left\" | \"right\"",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "Posici\u00F3n del \u00EDcono si existiera"
      },
      "attribute": "icon-position",
      "reflect": false,
      "defaultValue": "'left'"
    },
    "disable": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "Determina si le bot\u00F3n se encuentra deshabilitado"
      },
      "attribute": "disable",
      "reflect": false,
      "defaultValue": "false"
    },
    "href": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "Crea un enlace a la url especificada"
      },
      "attribute": "href",
      "reflect": false
    },
    "hrefTarget": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "'_self' | '_blank' | '_parent' | '_top'",
        "resolved": "\"_blank\" | \"_parent\" | \"_self\" | \"_top\"",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "Determina si el enlace se abre en una nueva ventana o en la misma"
      },
      "attribute": "href-target",
      "reflect": false,
      "defaultValue": "'_self'"
    }
  }; }
  static get events() { return [{
      "method": "onclick",
      "name": "onclick",
      "bubbles": true,
      "cancelable": true,
      "composed": true,
      "docs": {
        "tags": [],
        "text": "Emite el evento click"
      },
      "complexType": {
        "original": "any",
        "resolved": "any",
        "references": {}
      }
    }]; }
}
