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 { Component, Element, Prop, Event, h } from '@stencil/core';
import { sanitizeVegaComponent } from '../../../utils/component';
import { InjectVegaGlobalSlimmer, InjectVegaSlimmer, slotPlaceholder, } from 'vega-slimmer/core';
import { VegaLeftNavLinkRenderer } from './slimmers/renderers/vega-left-nav-link-renderer';
import { VegaLeftNavLinkController } from './slimmers/controllers/vega-left-nav-link-controller';
import { createEventEmitSlimmer, } from '../../../helpers/event-manager/slimmers/event-emit-slimmer';
import { VegaMenuClick } from '../../../helpers/event-manager/event-id/vega-event-id';
import { createDeprecatedPropertySlimmer, } from '../../../helpers/slimmers/deprecated-property-slimmer';
import { VegaComponentUsageRuntimeMetricsSlimmer } from '../../../helpers/slimmers/component-usage-runtime-metrics';
import { VegaLeftNavHierarchyController } from '../slimmers/vega-left-nav-group-hierarchy-controller';
/**
 * @vegaVersion 1.31.0
 */
export class VegaLeftNavLink {
  constructor() {
    this.globalSlimmers = {};
    this.renderer = new VegaLeftNavLinkRenderer();
    this.vegaLeftNavHierarchyController = new VegaLeftNavHierarchyController();
    this.controller = new VegaLeftNavLinkController();
    this.menuClickEventEmitter = createEventEmitSlimmer(VegaLeftNavLink, VegaMenuClick);
    this.deprecatedPropertySlimmer = createDeprecatedPropertySlimmer(VegaLeftNavLink, 'counterBadge.count', 'counterBadge.counter', undefined);
    this.vegaComponentUsageRuntimeMetricsSlimmer = new VegaComponentUsageRuntimeMetricsSlimmer();
    /**
     * A boolean that indicates whether the current link item is selected.
     *
     * @VegaWarning Note: Ensure that the `custom-selection-enabled` property is set to `true` before modifying this value, as modifying it without this setting may lead to unexpected behavior.
     * @vegaVersion 1.31.0
     */
    /* eslint-disable-next-line @stencil/strict-mutable */
    this.selected = false;
    /**
     * Specifies whether the link's selected state can be customized. When enabled, it prevents the default automatic selection on click, allowing users to manually control the link’s selection behavior.
     *
     * @vegaVersion 2.37.0
     */
    this.customSelectionEnabled = false;
    /**
     * Specifies where to open the URL linked in the left navigation item.
     *    Common values include _self (default) to open in the same tab, or _blank to open in a new tab.
     *
     * @vegaVersion 2.53.0
     */
    this.target = '_self';
  }
  render() {
    slotPlaceholder(h("slot", null));
    return sanitizeVegaComponent(this.renderer.render(), this.host);
  }
  static get is() { return "vega-left-nav-link"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() { return {
    "$": ["vega-left-nav-link.scss"]
  }; }
  static get styleUrls() { return {
    "$": ["vega-left-nav-link.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 link items **"
      },
      "attribute": "icon",
      "reflect": false
    },
    "selected": {
      "type": "boolean",
      "mutable": true,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "VegaWarning",
            "text": "Note: Ensure that the `custom-selection-enabled` property is set to `true` before modifying this value, as modifying it without this setting may lead to unexpected behavior."
          }, {
            "name": "vegaVersion",
            "text": "1.31.0"
          }],
        "text": "A boolean that indicates whether the current link item is selected."
      },
      "attribute": "selected",
      "reflect": true,
      "defaultValue": "false"
    },
    "customSelectionEnabled": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.37.0"
          }],
        "text": "Specifies whether the link's selected state can be customized. When enabled, it prevents the default automatic selection on click, allowing users to manually control the link\u2019s selection behavior."
      },
      "attribute": "custom-selection-enabled",
      "reflect": false,
      "defaultValue": "false"
    },
    "url": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "1.31.0"
          }],
        "text": "url attached to the left nav link item **"
      },
      "attribute": "url",
      "reflect": false
    },
    "counterBadge": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "LeftNavCounterBadgeConfig",
        "resolved": "{ color?: \"bg-action\" | \"bg-danger\"; counter?: number; count?: number; }",
        "references": {
          "LeftNavCounterBadgeConfig": {
            "location": "import",
            "path": "../interface"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "deprecatedAttribute",
            "text": "[counter] The 'counter' attribute is deprecated and will be removed soon. Please use 'count' instead."
          }, {
            "name": "vegaVersion",
            "text": "1.31.0"
          }],
        "text": "config the counter badge for left nav link items"
      }
    },
    "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 link item."
      },
      "attribute": "item-key",
      "reflect": false
    },
    "target": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "'_blank' | '_self'",
        "resolved": "\"_blank\" | \"_self\"",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.53.0"
          }],
        "text": "Specifies where to open the URL linked in the left navigation item.\n   Common values include _self (default) to open in the same tab, or _blank to open in a new tab."
      },
      "attribute": "target",
      "reflect": false,
      "defaultValue": "'_self'"
    }
  }; }
  static get events() { return [{
      "method": "vegaMenuClick",
      "name": "vegaMenuClick",
      "bubbles": true,
      "cancelable": true,
      "composed": true,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "1.31.0"
          }],
        "text": "An event emitter notifying the link click event. *"
      },
      "complexType": {
        "original": "any",
        "resolved": "any",
        "references": {}
      }
    }, {
      "method": "menuClick",
      "name": "menuClick",
      "bubbles": true,
      "cancelable": true,
      "composed": true,
      "docs": {
        "tags": [{
            "name": "eventSemantics",
            "text": "namespace:native"
          }, {
            "name": "vegaVersion",
            "text": "2.0.0"
          }],
        "text": "An event emitter notifying the link click event."
      },
      "complexType": {
        "original": "any",
        "resolved": "any",
        "references": {}
      }
    }]; }
  static get elementRef() { return "host"; }
}
__decorate([
  InjectVegaGlobalSlimmer()
], VegaLeftNavLink.prototype, "globalSlimmers", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaLeftNavLink.prototype, "renderer", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaLeftNavLink.prototype, "vegaLeftNavHierarchyController", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaLeftNavLink.prototype, "controller", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaLeftNavLink.prototype, "menuClickEventEmitter", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaLeftNavLink.prototype, "deprecatedPropertySlimmer", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaLeftNavLink.prototype, "vegaComponentUsageRuntimeMetricsSlimmer", void 0);
