import { Component, Element, h, Host, Prop } from '@stencil/core';
export class DvnMenuItem {
  constructor() {
    this.highlighted = false;
    this.highlightTint = 'background-secondary';
    this.pushSubOptions = false;
    this.scale = 'medium';
  }
  componentWillLoad() {
    this.hasSubMenu = !!this.el.querySelector('[slot="sub-menu"]');
  }
  render() {
    return (h(Host, { class: {
        [this.scale]: true,
        highlighted: this.highlighted,
        [`highlight-${this.highlightTint}`]: true,
        leaned: this.leaned,
        'with-options': this.hasSubMenu,
      } },
      h("slot", null),
      h("div", { class: {
          'sub-option-container': true,
          expanded: this.highlighted,
          pushed: this.pushSubOptions,
        } },
        h("slot", { name: "sub-menu" }))));
  }
  static get is() { return "dvn-menu-item"; }
  static get originalStyleUrls() { return {
    "$": ["dvn-menu-item.css"]
  }; }
  static get styleUrls() { return {
    "$": ["dvn-menu-item.css"]
  }; }
  static get properties() { return {
    "highlighted": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "highlighted",
      "reflect": false,
      "defaultValue": "false"
    },
    "highlightTint": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "'background-secondary' | 'background-card' | Tint",
        "resolved": "\"background-card\" | \"background-secondary\" | \"danger\" | \"neutral\" | \"primary\" | \"secondary\" | \"warning\"",
        "references": {
          "Tint": {
            "location": "import",
            "path": "../../theme"
          }
        }
      },
      "required": false,
      "optional": true,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "highlight-tint",
      "reflect": false,
      "defaultValue": "'background-secondary'"
    },
    "leaned": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": true,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "leaned",
      "reflect": false
    },
    "pushSubOptions": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "push-sub-options",
      "reflect": false,
      "defaultValue": "false"
    },
    "scale": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "Scale",
        "resolved": "\"large\" | \"medium\" | \"small\"",
        "references": {
          "Scale": {
            "location": "import",
            "path": "../../theme"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "scale",
      "reflect": false,
      "defaultValue": "'medium'"
    }
  }; }
  static get elementRef() { return "el"; }
}
