import { h } from "@stencil/core";
/**
 * Basic button component
 *
 * @slot default - Button text
 * @csspart button-base The button element
 */
export class KlevuButton {
  constructor() {
    this.disabled = undefined;
    this.isSecondary = undefined;
    this.isTertiary = undefined;
    this.fullWidth = undefined;
    this.size = "normal";
    this.icon = undefined;
  }
  render() {
    return (h("button", { part: "button-base", disabled: this.disabled, class: {
        secondary: Boolean(this.isSecondary),
        tertiary: Boolean(this.isTertiary),
        fullwidth: Boolean(this.fullWidth),
        icon: Boolean(this.icon),
        sizeSmall: this.size === "small",
        sizeLarge: this.size === "large",
        sizeTiny: this.size === "tiny",
      } }, this.icon ? (h("klevu-icon", { name: this.icon })) : (h("klevu-typography", { variant: this.isTertiary || this.size === "tiny" ? "body-s" : "body-s-bold" }, h("slot", null)))));
  }
  static get is() { return "klevu-button"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() {
    return {
      "$": ["klevu-button.css"]
    };
  }
  static get styleUrls() {
    return {
      "$": ["klevu-button.css"]
    };
  }
  static get properties() {
    return {
      "disabled": {
        "type": "boolean",
        "mutable": false,
        "complexType": {
          "original": "boolean",
          "resolved": "boolean | undefined",
          "references": {}
        },
        "required": false,
        "optional": true,
        "docs": {
          "tags": [],
          "text": "Is button disabled"
        },
        "attribute": "disabled",
        "reflect": true
      },
      "isSecondary": {
        "type": "boolean",
        "mutable": false,
        "complexType": {
          "original": "boolean",
          "resolved": "boolean | undefined",
          "references": {}
        },
        "required": false,
        "optional": true,
        "docs": {
          "tags": [],
          "text": "Toned down secondary button"
        },
        "attribute": "is-secondary",
        "reflect": false
      },
      "isTertiary": {
        "type": "boolean",
        "mutable": false,
        "complexType": {
          "original": "boolean",
          "resolved": "boolean | undefined",
          "references": {}
        },
        "required": false,
        "optional": true,
        "docs": {
          "tags": [],
          "text": "Toned down tertiary button"
        },
        "attribute": "is-tertiary",
        "reflect": false
      },
      "fullWidth": {
        "type": "boolean",
        "mutable": false,
        "complexType": {
          "original": "boolean",
          "resolved": "boolean | undefined",
          "references": {}
        },
        "required": false,
        "optional": true,
        "docs": {
          "tags": [],
          "text": "Make button display block"
        },
        "attribute": "full-width",
        "reflect": false
      },
      "size": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "\"tiny\" | \"small\" | \"normal\" | \"large\"",
          "resolved": "\"large\" | \"normal\" | \"small\" | \"tiny\"",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": ""
        },
        "attribute": "size",
        "reflect": false,
        "defaultValue": "\"normal\""
      },
      "icon": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "string",
          "resolved": "string | undefined",
          "references": {}
        },
        "required": false,
        "optional": true,
        "docs": {
          "tags": [],
          "text": "Instead of content have an icon. So basically icon-button"
        },
        "attribute": "icon",
        "reflect": false
      }
    };
  }
}
//# sourceMappingURL=klevu-button.js.map
