import { Host, h } from '@stencil/core';
export class BsFormCheck {
  constructor() {
    this.type = 'checkbox';
    this.controlId = undefined;
    this.checked = false;
    this.name = undefined;
    this.inline = false;
    this.disabled = undefined;
    this.value = undefined;
    this.size = undefined;
  }
  render() {
    return (h(Host, { class: { 'form-check': true, 'form-check-inline': this.inline } }, h("input", { id: this.controlId, type: this.type, name: this.name, class: "form-check-input", style: {
        width: this.size ? this.size + 'px' : null,
        height: this.size ? this.size + 'px' : null,
      }, disabled: this.disabled, checked: this.checked, onInput: event => {
        const input = event.target;
        this.checked = input.checked;
        this.bsInput.emit({ value: this.value, checked: input.checked });
      } }), h("label", { class: "form-check-label", htmlFor: this.controlId }, h("slot", null))));
  }
  static get is() { return "bs-form-check"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() {
    return {
      "$": ["bs-form-check.scss"]
    };
  }
  static get styleUrls() {
    return {
      "$": ["bs-form-check.css"]
    };
  }
  static get properties() {
    return {
      "type": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "'checkbox' | 'radio'",
          "resolved": "\"checkbox\" | \"radio\"",
          "references": {}
        },
        "required": false,
        "optional": true,
        "docs": {
          "tags": [],
          "text": "This specifies what type of input is."
        },
        "attribute": "type",
        "reflect": false,
        "defaultValue": "'checkbox'"
      },
      "controlId": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "string",
          "resolved": "string",
          "references": {}
        },
        "required": false,
        "optional": true,
        "docs": {
          "tags": [],
          "text": "The input id."
        },
        "attribute": "control-id",
        "reflect": false
      },
      "checked": {
        "type": "boolean",
        "mutable": true,
        "complexType": {
          "original": "boolean",
          "resolved": "boolean",
          "references": {}
        },
        "required": false,
        "optional": true,
        "docs": {
          "tags": [],
          "text": "Determines selected item."
        },
        "attribute": "checked",
        "reflect": false,
        "defaultValue": "false"
      },
      "name": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "string",
          "resolved": "string",
          "references": {}
        },
        "required": false,
        "optional": true,
        "docs": {
          "tags": [],
          "text": "The name of input"
        },
        "attribute": "name",
        "reflect": false
      },
      "inline": {
        "type": "boolean",
        "mutable": false,
        "complexType": {
          "original": "boolean",
          "resolved": "boolean",
          "references": {}
        },
        "required": false,
        "optional": true,
        "docs": {
          "tags": [],
          "text": "Determines the orientation of radio and checkbox to horizontal."
        },
        "attribute": "inline",
        "reflect": false,
        "defaultValue": "false"
      },
      "disabled": {
        "type": "boolean",
        "mutable": false,
        "complexType": {
          "original": "boolean",
          "resolved": "boolean",
          "references": {}
        },
        "required": false,
        "optional": true,
        "docs": {
          "tags": [],
          "text": "Disables the radio or checkbox from edit or copy."
        },
        "attribute": "disabled",
        "reflect": false
      },
      "value": {
        "type": "any",
        "mutable": false,
        "complexType": {
          "original": "string | string[] | number",
          "resolved": "number | string | string[]",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": "The value of the input"
        },
        "attribute": "value",
        "reflect": false
      },
      "size": {
        "type": "number",
        "mutable": false,
        "complexType": {
          "original": "number",
          "resolved": "number",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": "Sets the width/height of the checkbox"
        },
        "attribute": "size",
        "reflect": false
      }
    };
  }
  static get events() {
    return [{
        "method": "bsInput",
        "name": "bsInput",
        "bubbles": true,
        "cancelable": true,
        "composed": true,
        "docs": {
          "tags": [],
          "text": "The event is emitted on keyboard input"
        },
        "complexType": {
          "original": "any",
          "resolved": "any",
          "references": {}
        }
      }];
  }
  static get elementRef() { return "el"; }
}
//# sourceMappingURL=bs-form-check.js.map
