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, Prop, Element, Event, State, Host } from '@stencil/core';
import { sanitizeVegaComponent } from '../../../utils/component';
import { InjectVegaGlobalSlimmer, InjectVegaSlimmer, slotPlaceholder, } from 'vega-slimmer/core';
import { VegaLeftNavGroupRenderer } from './slimmers/renderers/vega-left-nav-group-renderer';
import { VegaLeftNavGroupForLeftNavLinkClickObserver } from './slimmers/controllers/vega-left-nav-group-link-click-controller';
import { createEventEmitSlimmer, } from '../../../helpers/event-manager/slimmers/event-emit-slimmer';
import { VegaGroupClick } from '../../../helpers/event-manager/event-id/vega-event-id';
import { VegaComponentUsageRuntimeMetricsSlimmer } from '../../../helpers/slimmers/component-usage-runtime-metrics';
import { VegaLeftNavGroupForOtherGroupsClickObserver } from './slimmers/controllers/vega-left-nav-group-other-groups-click-controller';
import { VegaLeftNavGroupStateController } from './slimmers/controllers/vega-left-nav-group-state-controller';
import { VegaLeftNavGroupOpenStateController } from './slimmers/controllers/vega-left-nav-group-open-state-controller';
import { VegaLeftNavHierarchyController } from '../slimmers/vega-left-nav-group-hierarchy-controller';
import { VegaLeftNavGroupForInitializeSelectedObserver } from './slimmers/controllers/vega-left-nav-group-initialize-selected-controller';
/**
 * @vegaVersion 1.31.0
 */
export class VegaLeftNavGroup {
  constructor() {
    this.globalSlimmers = {};
    this.renderer = new VegaLeftNavGroupRenderer();
    this.vegaLeftNavHierarchyController = new VegaLeftNavHierarchyController();
    this.linkClickObserverController = new VegaLeftNavGroupForLeftNavLinkClickObserver();
    this.otherGroupsClickObserverController = new VegaLeftNavGroupForOtherGroupsClickObserver();
    this.groupClickEventEmitter = createEventEmitSlimmer(VegaLeftNavGroup, VegaGroupClick);
    this.vegaComponentUsageRuntimeMetricsSlimmer = new VegaComponentUsageRuntimeMetricsSlimmer();
    this.vegaLeftNavGroupStateController = new VegaLeftNavGroupStateController();
    this.vegaLeftNavGroupOpenStateController = new VegaLeftNavGroupOpenStateController();
    this.vegaLeftNavGroupForInitializeSelectedController = new VegaLeftNavGroupForInitializeSelectedObserver();
    this.autoCollapseGroups = false;
    /** label attached to the left nav group items **
     * @vegaVersion 1.31.0
     */
    this.label = '';
    /** Specifies whether the navigation group is expanded by default **
     * @vegaVersion 2.44.0
     */
    this.openByDefault = false;
  }
  render() {
    slotPlaceholder(h("slot", null));
    return (h(Host, { "data-key": this.itemKey }, sanitizeVegaComponent(this.renderer.render(), this.host)));
  }
  static get is() { return "vega-left-nav-group"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() { return {
    "$": ["vega-left-nav-group.scss"]
  }; }
  static get styleUrls() { return {
    "$": ["vega-left-nav-group.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": "1.31.0"
          }],
        "text": "icon attached to the left nav group items **"
      },
      "attribute": "icon",
      "reflect": false
    },
    "label": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "1.31.0"
          }],
        "text": "label attached to the left nav group items **"
      },
      "attribute": "label",
      "reflect": false,
      "defaultValue": "''"
    },
    "openByDefault": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.44.0"
          }],
        "text": "Specifies whether the navigation group is expanded by default **"
      },
      "attribute": "open-by-default",
      "reflect": false,
      "defaultValue": "false"
    },
    "itemKey": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.45.0"
          }],
        "text": "Defines a unique key for the left nav group item."
      },
      "attribute": "item-key",
      "reflect": false
    }
  }; }
  static get states() { return {
    "autoCollapseGroups": {}
  }; }
  static get events() { return [{
      "method": "vegaGroupClick",
      "name": "vegaGroupClick",
      "bubbles": true,
      "cancelable": true,
      "composed": true,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "1.41.0"
          }],
        "text": "event emitter used for notifying consumers the click event *"
      },
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      }
    }, {
      "method": "groupClick",
      "name": "groupClick",
      "bubbles": true,
      "cancelable": true,
      "composed": true,
      "docs": {
        "tags": [{
            "name": "eventSemantics",
            "text": "namespace:native"
          }, {
            "name": "vegaVersion",
            "text": "2.0.0"
          }],
        "text": "An event emitter used for notifying consumers the click event"
      },
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      }
    }]; }
  static get elementRef() { return "host"; }
}
__decorate([
  InjectVegaGlobalSlimmer()
], VegaLeftNavGroup.prototype, "globalSlimmers", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaLeftNavGroup.prototype, "renderer", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaLeftNavGroup.prototype, "vegaLeftNavHierarchyController", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaLeftNavGroup.prototype, "linkClickObserverController", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaLeftNavGroup.prototype, "otherGroupsClickObserverController", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaLeftNavGroup.prototype, "groupClickEventEmitter", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaLeftNavGroup.prototype, "vegaComponentUsageRuntimeMetricsSlimmer", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaLeftNavGroup.prototype, "vegaLeftNavGroupStateController", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaLeftNavGroup.prototype, "vegaLeftNavGroupOpenStateController", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaLeftNavGroup.prototype, "vegaLeftNavGroupForInitializeSelectedController", void 0);
