var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
    r = Reflect.decorate(decorators, target, key, desc);
  else
    for (var i = decorators.length - 1; i >= 0; i--)
      if (d = decorators[i])
        r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { h, Host } from '@stencil/core';
import SlotChange from '../../shared/decorators/slot-change';
export class BsButtonGroup {
  constructor() {
    this.ariaLabel = undefined;
    this.size = undefined;
    this.role = 'group';
    this.vertical = false;
  }
  addSizeToButtons() {
    Array.from(this.__slot.slot.assignedNodes())
      .filter((el) => el.nodeName == 'BS-BUTTON')
      .forEach((el) => {
      el.size = this.size;
    });
  }
  render() {
    return (h(Host, { class: `
                    btn-group 
                    ${this.size ? `btn-group-${this.size}` : ''}
                    ${this.vertical ? 'btn-group-vertical' : ''}
                `, role: this.role, "aria-label": this.ariaLabel }, h("slot", null)));
  }
  static get is() { return "bs-button-group"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() {
    return {
      "$": ["bs-button-group.scss"]
    };
  }
  static get styleUrls() {
    return {
      "$": ["bs-button-group.css"]
    };
  }
  static get properties() {
    return {
      "ariaLabel": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "string",
          "resolved": "string",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": ""
        },
        "attribute": "aria-label",
        "reflect": false
      },
      "size": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "ButtonGroupSize",
          "resolved": "\"lg\" | \"sm\"",
          "references": {
            "ButtonGroupSize": {
              "location": "local",
              "path": "/Users/aadebayo/Repositories/stenciljs-bootstrap/src/components/bs-button-group/bs-button-group.tsx"
            }
          }
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": ""
        },
        "attribute": "size",
        "reflect": false
      },
      "role": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "ButtonGroupRole",
          "resolved": "\"group\" | \"toolbar\"",
          "references": {
            "ButtonGroupRole": {
              "location": "local",
              "path": "/Users/aadebayo/Repositories/stenciljs-bootstrap/src/components/bs-button-group/bs-button-group.tsx"
            }
          }
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": ""
        },
        "attribute": "role",
        "reflect": false,
        "defaultValue": "'group'"
      },
      "vertical": {
        "type": "boolean",
        "mutable": false,
        "complexType": {
          "original": "boolean",
          "resolved": "boolean",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": ""
        },
        "attribute": "vertical",
        "reflect": false,
        "defaultValue": "false"
      }
    };
  }
  static get elementRef() { return "el"; }
  static get watchers() {
    return [{
        "propName": "size",
        "methodName": "addSizeToButtons"
      }];
  }
}
__decorate([
  SlotChange()
], BsButtonGroup.prototype, "addSizeToButtons", null);
//# sourceMappingURL=bs-button-group.js.map
