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 { sanitizeVegaComponent } from "../../../utils/component";
import { InjectVegaGlobalSlimmer, InjectVegaSlimmer } from "../../../../../../vega-slimmer/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."
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "icon"
            },
            "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."
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "label"
            },
            "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."
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "icon-only",
                "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."
                },
                "getter": false,
                "setter": false,
                "reflect": true,
                "attribute": "disabled",
                "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."
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "item-key"
            },
            "dropdownProps": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "DropdownPropsForButtonGroup",
                    "resolved": "{ matchContainerHeight?: boolean; matchTargetWidth?: boolean; maxHeight?: number; positionRelativeTo?: string; trigger: \"none\" | \"click\" | \"hover\"; }",
                    "references": {
                        "DropdownPropsForButtonGroup": {
                            "location": "import",
                            "path": "../types",
                            "id": "src/components/vega-button-group/types.d.ts::DropdownPropsForButtonGroup",
                            "referenceLocation": "DropdownPropsForButtonGroup"
                        }
                    }
                },
                "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."
                },
                "getter": false,
                "setter": false
            },
            "dropdownSource": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "(DropdownSourceGroup | DropdownSourceItem)[]",
                    "resolved": "(DropdownSourceItem | DropdownSourceGroup)[]",
                    "references": {
                        "DropdownSourceGroup": {
                            "location": "import",
                            "path": "../../vega-dropdown/types",
                            "id": "src/components/vega-dropdown/types.d.ts::DropdownSourceGroup",
                            "referenceLocation": "DropdownSourceGroup"
                        },
                        "DropdownSourceItem": {
                            "location": "import",
                            "path": "../../vega-dropdown/types",
                            "id": "src/components/vega-dropdown/types.d.ts::DropdownSourceItem",
                            "referenceLocation": "DropdownSourceItem"
                        }
                    }
                },
                "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."
                },
                "getter": false,
                "setter": false
            }
        };
    }
    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);
