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, Host, Prop, h, State, Watch } from '@stencil/core';
import { sanitizeVegaComponent } from '../../../utils/component';
import { InjectVegaSlimmer, slotPlaceholder, methodPlaceholder, InjectVegaGlobalSlimmer, } from 'vega-slimmer/core';
import { VegaNavListRenderer } from '../slimmers/renderers/vega-nav-list-renderer';
import { VegaNavCardMaxHeightController } from './slimmers/controllers/vega-nav-card-max-height-controller';
import { VegaComponentUsageRuntimeMetricsSlimmer } from '../../../helpers/slimmers/component-usage-runtime-metrics';
import { VegaNavCardRuntimeMetricsPayloadDefinition } from '../../../constants/runtime-metrics-payload-definition/vega-nav-card/runtime-metrics-payload-definition';
/**
 * @vegaVersion 1.42.0
 */
export class VegaNavCard {
  constructor() {
    this.globalSlimmers = {};
    this.listRenderer = new VegaNavListRenderer();
    this.maxHeightController = new VegaNavCardMaxHeightController();
    this.vegaComponentUsageRuntimeMetricsSlimmer = new VegaComponentUsageRuntimeMetricsSlimmer(VegaNavCardRuntimeMetricsPayloadDefinition);
  }
  watchMaxHeight() {
    methodPlaceholder();
  }
  render() {
    slotPlaceholder(h("slot", null));
    return sanitizeVegaComponent(h(Host, { style: {
        maxHeight: this.currentMaxHeight,
      } }, this.listRenderer.render()), this.host);
  }
  static get is() { return "vega-nav-card"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() { return {
    "$": ["vega-nav-card.scss"]
  }; }
  static get styleUrls() { return {
    "$": ["vega-nav-card.css"]
  }; }
  static get properties() { return {
    "source": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "LeftNavSourceItem[]",
        "resolved": "LeftNavSourceItem[]",
        "references": {
          "LeftNavSourceItem": {
            "location": "import",
            "path": "../interface"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "1.42.0"
          }],
        "text": "Specifies the source data used to populate the list within\n   the `vega-nav-card` component."
      }
    },
    "maxHeight": {
      "type": "any",
      "mutable": false,
      "complexType": {
        "original": "ResponsiveType<MaxHeightType>",
        "resolved": "number | string | { S?: MaxHeightType; M?: MaxHeightType; L?: MaxHeightType; XL?: MaxHeightType; default?: MaxHeightType; }",
        "references": {
          "ResponsiveType": {
            "location": "import",
            "path": "../../../types/ui.type"
          },
          "MaxHeightType": {
            "location": "import",
            "path": "../../../types/ui.type"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "1.44.0"
          }],
        "text": "Specifies the maximum height for the scrollable list\n    within the `vega-nav-card` component.\nIt accepts values in both numeric and string formats.\nFor numeric values, use a number to indicate the height\n   in pixels, e.g., 100 will be translated to 100px.\nFor string values, you can use CSS units like 'vh' or 'calc' expressions.\n   For example, '100vh' sets the height to 100% of the viewport height,\n   and 'calc(100vh - 20px)' allows for more complex calculations to\n   determine the height."
      },
      "attribute": "max-height",
      "reflect": true
    }
  }; }
  static get states() { return {
    "currentMaxHeight": {}
  }; }
  static get elementRef() { return "host"; }
  static get watchers() { return [{
      "propName": "maxHeight",
      "methodName": "watchMaxHeight"
    }]; }
}
__decorate([
  InjectVegaGlobalSlimmer()
], VegaNavCard.prototype, "globalSlimmers", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaNavCard.prototype, "listRenderer", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaNavCard.prototype, "maxHeightController", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaNavCard.prototype, "vegaComponentUsageRuntimeMetricsSlimmer", void 0);
