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, Component, Element, Host, Prop, State } from '@stencil/core';
import { sanitizeVegaComponent } from '../../../utils/component';
import { InjectVegaGlobalSlimmer, InjectVegaSlimmer } from 'vega-slimmer/core';
import { VegaButtonGroupItemSubStateController } from './slimmers/controllers/vega-button-group-item-sub-state-controller';
import { VegaButtonGroupItemRenderer } from './slimmers/renderers/vega-button-group-item-renderer';
import { VegaComponentUsageRuntimeMetricsSlimmer } from '../../../helpers/slimmers/component-usage-runtime-metrics';
/**
 * @vegaVersion 2.5.0
 */
export class VegaButtonGroupItem {
  constructor() {
    this.globalSlimmers = {};
    this.subStateObserverSlimmer = new VegaButtonGroupItemSubStateController();
    this.buttonGroupItemRenderer = new VegaButtonGroupItemRenderer();
    this.vegaComponentUsageRuntimeMetricsSlimmer = new VegaComponentUsageRuntimeMetricsSlimmer();
    this.variant = 'primary';
    this.size = 'default';
    this.iconAlign = 'left';
    this.parentDisabled = false;
    this.allItemsDisabled = false;
    /**
     * Specifies whether to display the icon only.
     *
     * @vegaVersion 2.5.0
     */
    this.iconOnly = false;
    /**
     * Specifies whether the button group item is disabled.
     *
     * @vegaVersion 2.72.0
     */
    this.disabled = false;
  }
  render() {
    return sanitizeVegaComponent(h(Host, { class: "vega-button-group-item" }, this.buttonGroupItemRenderer.render()), this.host);
  }
  static get is() { return "vega-button-group-item"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() { return {
    "$": ["./vega-button-group-item.scss"]
  }; }
  static get styleUrls() { return {
    "$": ["vega-button-group-item.css"]
  }; }
  static get properties() { return {
    "icon": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.5.0"
          }],
        "text": "Specifies the icon to be displayed on the button item,\n   which can be selected from a list of predefined icon tokens\n   or specified using a Font Awesome class."
      },
      "attribute": "icon",
      "reflect": false
    },
    "label": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.5.0"
          }],
        "text": "Specifies the text displayed on the button item."
      },
      "attribute": "label",
      "reflect": false
    },
    "iconOnly": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.5.0"
          }],
        "text": "Specifies whether to display the icon only."
      },
      "attribute": "icon-only",
      "reflect": false,
      "defaultValue": "false"
    },
    "disabled": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.72.0"
          }],
        "text": "Specifies whether the button group item is disabled."
      },
      "attribute": "disabled",
      "reflect": true,
      "defaultValue": "false"
    },
    "itemKey": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": true,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.5.0"
          }],
        "text": "Specifies the unique key for the button item."
      },
      "attribute": "item-key",
      "reflect": false
    },
    "dropdownProps": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "DropdownPropsForButtonGroup",
        "resolved": "{ matchContainerHeight?: boolean; matchTargetWidth?: boolean; maxHeight?: number; positionRelativeTo?: string; trigger: \"click\" | \"hover\" | \"none\"; }",
        "references": {
          "DropdownPropsForButtonGroup": {
            "location": "import",
            "path": "../types"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.5.0"
          }],
        "text": "Specifies the properties for the dropdown menu that appears when the button group contains more than one button item."
      }
    },
    "dropdownSource": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "(DropdownSourceGroup | DropdownSourceItem)[]",
        "resolved": "(DropdownSourceItem | DropdownSourceGroup)[]",
        "references": {
          "DropdownSourceGroup": {
            "location": "import",
            "path": "../../vega-dropdown/types"
          },
          "DropdownSourceItem": {
            "location": "import",
            "path": "../../vega-dropdown/types"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.5.0"
          }],
        "text": "Defines the data source used to populate the dropdown menu when the button group contains more than one button item."
      }
    }
  }; }
  static get states() { return {
    "variant": {},
    "size": {},
    "iconAlign": {},
    "parentDisabled": {},
    "allItemsDisabled": {}
  }; }
  static get elementRef() { return "host"; }
}
__decorate([
  InjectVegaGlobalSlimmer()
], VegaButtonGroupItem.prototype, "globalSlimmers", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaButtonGroupItem.prototype, "subStateObserverSlimmer", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaButtonGroupItem.prototype, "buttonGroupItemRenderer", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaButtonGroupItem.prototype, "vegaComponentUsageRuntimeMetricsSlimmer", void 0);
