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, Host, h, Element, Prop, State, Event, forceUpdate, Watch, } from '@stencil/core';
import { sanitizeVegaComponent } from '../../utils/component';
import { arrayToClassString } from '../../utils/ui';
import { formatAndValidBackgroundColor, formatAndValidResponsiveToken, formatAndValidTextColor, } from '../../utils/design-token';
import ResponsiveFormatFacade from '../../helpers/formatter/responsive-map-formatter/responsive-format-facade';
import { LogUtility } from '../../utils/log';
import { getCurrentBreakpoint } from '../../utils/breakpoints';
import { InjectVegaGlobalSlimmer, InjectVegaSlimmer } from 'vega-slimmer/core';
import { PageResizeObserverSlimmer } from '../../helpers/slimmers/page-resize-observer-slimmer';
import { ChildNodesEventPreventSlimmer } from '../../helpers/event-manager/slimmers/child-nodes-event-prevent-slimmer';
import { createEventEmitSlimmer, } from '../../helpers/event-manager/slimmers/event-emit-slimmer';
import { VegaClick, VegaDropdownClick, VegaDropdownSearch, VegaReset, } from '../../helpers/event-manager/event-id/vega-event-id';
import { VegaMenuArrowIconRenderer } from './slimmers/renderers/vega-menu-arrow-icon-renderer';
import { VegaComponentUsageRuntimeMetricsSlimmer } from '../../helpers/slimmers/component-usage-runtime-metrics';
import { VegaAppHeaderButtonDropdownRenderer } from './slimmers/renderers/vega-app-header-button-dropdown-renderer';
import { AriaAttributesValueMapper } from '../../helpers/slimmers/mutation-observer/aria-attributes-value-mapper';
/**
 * @vegaVersion 1.11.0
 */
export class VegaAppHeaderButton {
  constructor() {
    this.globalSlimmers = {};
    /**
     * The below method is e2e-test covered in
     * @see{module:vega-app-header-button-resize-e2e}
     */
    this.pageResizeObserverSlimmer = new PageResizeObserverSlimmer();
    this.dropdownEventPrevent = new ChildNodesEventPreventSlimmer([VegaClick, VegaDropdownClick, VegaReset, VegaDropdownSearch], () => this.dropdownRenderer.getDropdownRef(), {
      customPreventHandle: (e) => {
        e.stopPropagation();
      },
    });
    this.clickEventEmitter = createEventEmitSlimmer(VegaAppHeaderButton, VegaClick);
    this.dropdownClickEventEmitter = createEventEmitSlimmer(VegaAppHeaderButton, VegaDropdownClick);
    this.resetEventEmitter = createEventEmitSlimmer(VegaAppHeaderButton, VegaReset);
    this.searchEventEmitter = createEventEmitSlimmer(VegaAppHeaderButton, VegaDropdownSearch);
    this.vegaMenuArrowIconRenderer = new VegaMenuArrowIconRenderer();
    this.vegaComponentUsageRuntimeMetricsSlimmer = new VegaComponentUsageRuntimeMetricsSlimmer();
    this.dropdownRenderer = new VegaAppHeaderButtonDropdownRenderer();
    this.ariaAttributesValueMapper = new AriaAttributesValueMapper(() => {
      // the target element which we will apply the aria label to this button
      return this.host.shadowRoot.querySelector('button');
    }, {
      'aria-label': {
        // meaning if data-aria-label is defined, we will use it as the value of aria-label, otherwise we will use label as the value of aria-label
        dependency: ['data-aria-label', 'label'],
        // meaning if the all the values in the above array are all empty or undefined, the default value will be used as the final value of aria-label
        defaultValue: 'No label defined',
      },
    });
    /**
     * Used to determine whether the avatar image is loaded or not.
     */
    this.avatarImgLoaded = null;
    this.isDropdownShow = false;
    this.currentBreakpoint = getCurrentBreakpoint();
    /**
     * Specifies the configuration for the dropdown functionality
     *    of the app header button.
     *
     * @vegaVersion 1.11.0
     */
    this.dropdown = null;
    /**
     * Specifies the size of the app header button.
     *
     * @vegaVersion 1.11.0
     */
    this.size = 'default';
    /**
     * Specifies the display configuration of the app header button label.
     *
     * @vegaVersion 2.77.1
     */
    this.labelConfig = null;
    /**
     * Specifies the label or text content of the app header button.
     *
     * @vegaVersion 1.11.0
     */
    this.label = '';
    /**
     * Determines whether to display the label of the app header button
     *    directly on the button itself or in a tooltip
     *    when the user hovers over the button.
     *
     * @vegaVersion 1.11.0
     */
    this.showLabel = true;
    /**
     * Specifies the configuration for the avatar image or icon
     *    displayed in the app header button.
     *
     * @vegaVersion 1.11.0
     */
    this.avatar = {};
    /**
     * Specifies the position of the avatar in relation to the label
     *    within the app header button.
     *
     * @vegaVersion 1.11.0
     */
    this.avatarPosition = 'left';
    /**
     * Specifies whether to show a border around the app header button.
     *
     * @vegaVersion 1.11.0
     */
    this.showBorder = false;
    /**
     * Specifies whether to display a menu arrow icon in the app header button.
     *
     * @vegaVersion 1.11.0
     */
    this.showMenuArrowIcon = true;
    /**
     * Specifies whether the app header button is displayed in a selected state.
     *
     * @vegaVersion 1.15.0
     */
    this.selected = false;
    this.renderButton = (arrowDownIconVisible, labelVisible) => {
      const isIconBtnType = !this.avatar.src && !this.avatar.fallbackText;
      return (h("button", { type: "button", class: arrayToClassString([
          'vega-app-header-button-container',
          isIconBtnType && 'icon',
          this.showBorder && 'with-border',
          arrowDownIconVisible && 'with-menu-arrow-icon',
        ]), 
        /* eslint-disable-next-line react/jsx-no-bind */
        onClick: () => this.clickEventEmitter.emit() },
        this.avatarPosition === 'left' && this.renderAvatar(),
        (labelVisible || arrowDownIconVisible || this.avatarPosition === 'right') && (h("div", { class: "right-container" },
          labelVisible && this.renderButtonLabel(),
          this.avatarPosition === 'right' && this.renderAvatar(),
          arrowDownIconVisible && this.vegaMenuArrowIconRenderer.render()))));
    };
    this.renderButtonLabel = () => {
      var _a, _b;
      return (h("vega-text", Object.assign({ class: {
          label: true,
        }, overflow: (_a = this.labelConfig) === null || _a === void 0 ? void 0 : _a.displayRule }, (((_b = this.labelConfig) === null || _b === void 0 ? void 0 : _b.maxWidth)
        ? {
          style: {
            maxWidth: formatAndValidResponsiveToken(this.labelConfig.maxWidth, 'widthAndHeight'),
          },
        }
        : {})), this.label));
    };
    this.renderAvatar = () => {
      const isProfileType = !this.avatar.icon && (!!this.avatar.fallbackText || !!this.avatar.src);
      const shouldRenderFallbackTextAvatar = !this.avatar.src || this.avatarImgLoaded === false;
      if (isProfileType) {
        return shouldRenderFallbackTextAvatar ? this.renderFallbackTextAvatar() : this.renderImgAvatar();
      }
      else {
        return this.renderIconAvatar();
      }
    };
    this.renderFallbackTextAvatar = () => {
      var _a;
      let fallbackText = this.avatar.fallbackText;
      /**
       * The below method is e2e-test covered in
       * @see{module:only-render-avatar-fallbackBgColor-when-avatar-image-load-failure-and-fallbackText-is-empty}
       */
      /* istanbul ignore next */
      if (((_a = this.avatar.fallbackText) === null || _a === void 0 ? void 0 : _a.length) > 2) {
        LogUtility.warn('The fallback text for avatar should not be more than two letters.');
        fallbackText = this.avatar.fallbackText.slice(0, 2);
      }
      const defaultAvatarClass = arrayToClassString([
        'vega-avatar',
        this.avatar.fallbackBgColor
          ? formatAndValidBackgroundColor(this.avatar.fallbackBgColor, ['dark'])
          : 'v-bg-accent3-primary',
        this.avatar.fallbackTextColor
          ? formatAndValidTextColor(this.avatar.fallbackTextColor)
          : 'v-text-black',
      ]);
      return h("span", { class: defaultAvatarClass }, fallbackText);
    };
    /**
     * The below method is e2e-test covered in
     * @see{module:render-avatar-fallbackText-when-avatar-image-load-failure}
     */
    this.renderImgAvatar = () => {
      return (h("img", { class: "vega-avatar profile", src: this.avatar.src, alt: "", 
        /* eslint-disable-next-line react/jsx-no-bind */
        onError: /* istanbul ignore next */ () => this.handleImgAvatarLoadError(), 
        /* eslint-disable-next-line react/jsx-no-bind */
        onLoad: /* istanbul ignore next */ () => this.setAvatarImgLoaded(true) }));
    };
    this.renderIconAvatar = () => {
      if (!this.avatar.icon)
        return;
      const iconSize = this.size === 'small' ? 'size-16' : 'size-20';
      return (h("span", { class: "avatar-icon-wrapper" },
        h("vega-icon", { icon: this.avatar.icon, size: iconSize })));
    };
    this.renderDropdownContainer = (children) => {
      return this.dropdownRenderer.shouldRenderDropdown()
        ? this.dropdownRenderer.render(children)
        : children;
    };
    /**
     * The below method is e2e-test covered in
     * @see{module:render-avatar-fallbackText-when-avatar-image-load-failure}
     */
    /* istanbul ignore next */
    this.setAvatarImgLoaded = (avatarImgLoaded) => {
      this.avatarImgLoaded = avatarImgLoaded;
    };
    /**
     * The below method is e2e-test covered in
     * @see{module:render-avatar-fallbackText-when-avatar-image-load-failure}
     */
    /* istanbul ignore next */
    this.handleImgAvatarLoadError = () => {
      this.setAvatarImgLoaded(false);
      forceUpdate(this.host);
    };
  }
  /**
   * The below method is e2e-test covered in
   * @see{module:re-render-avatar-image-when-re-set-the-avatar-image-src}
   */
  /* istanbul ignore next */
  watchAvatar() {
    var _a;
    if (((_a = this.avatar) === null || _a === void 0 ? void 0 : _a.src) && this.avatarImgLoaded !== null) {
      this.avatarImgLoaded = null;
    }
  }
  render() {
    const arrowDownIconVisible = this.showMenuArrowIcon && this.dropdownRenderer.shouldRenderDropdown();
    const labelVisible = this.label && this.showLabel;
    const withTooltip = this.label && !this.showLabel;
    const classNames = arrayToClassString([
      ResponsiveFormatFacade.formatCustom(this.size),
      this.selected && 'selected',
    ].filter(Boolean));
    return sanitizeVegaComponent(h(Host, { class: classNames }, this.renderDropdownContainer(withTooltip ? (h("vega-tooltip", { text: this.label }, this.renderButton(arrowDownIconVisible, labelVisible))) : (this.renderButton(arrowDownIconVisible, labelVisible)))), this.host);
  }
  static get is() { return "vega-app-header-button"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() { return {
    "$": ["./vega-app-header-button.scss"]
  }; }
  static get styleUrls() { return {
    "$": ["vega-app-header-button.css"]
  }; }
  static get properties() { return {
    "dropdown": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "VegaAppHeaderButtonDropdownConfig",
        "resolved": "{ size?: ResponsiveType<SizeType>; trigger?: VegaEATriggerType; source?: VegaDropdownSourceItem[]; matchTargetWidth?: boolean; maxHeight?: number; positionRelativeTo?: string; minWidth?: ResponsiveType<SizeType>; maxWidth?: ResponsiveType<SizeType>; translocation?: ResponsiveType<TranslocationType>; virtualizationThreshold?: number; searchable?: boolean; itemDisplayRule?: \"ellipsis\" | \"newline\"; selectType?: \"none\" | \"single\" | \"multiple\"; selectedSourceKey?: string | string[]; resettable?: boolean; useDefaultFilter?: boolean; }",
        "references": {
          "VegaAppHeaderButtonDropdownConfig": {
            "location": "import",
            "path": "./types"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "1.11.0"
          }],
        "text": "Specifies the configuration for the dropdown functionality\n   of the app header button."
      },
      "defaultValue": "null"
    },
    "size": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "ResponsiveType<VegaAppHeaderButtonSize>",
        "resolved": "\"default\" | \"small\" | { S?: VegaAppHeaderButtonSize; M?: VegaAppHeaderButtonSize; L?: VegaAppHeaderButtonSize; XL?: VegaAppHeaderButtonSize; default?: VegaAppHeaderButtonSize; }",
        "references": {
          "ResponsiveType": {
            "location": "import",
            "path": "../../types/ui.type"
          },
          "VegaAppHeaderButtonSize": {
            "location": "import",
            "path": "./types"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "1.11.0"
          }],
        "text": "Specifies the size of the app header button."
      },
      "attribute": "size",
      "reflect": false,
      "defaultValue": "'default'"
    },
    "labelConfig": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "VegaAppHeaderLabelConfig",
        "resolved": "{ maxWidth?: ResponsiveType<SizeType>; displayRule?: \"ellipsis\" | \"newline\"; }",
        "references": {
          "VegaAppHeaderLabelConfig": {
            "location": "import",
            "path": "./types"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.77.1"
          }],
        "text": "Specifies the display configuration of the app header button label."
      },
      "defaultValue": "null"
    },
    "label": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "1.11.0"
          }],
        "text": "Specifies the label or text content of the app header button."
      },
      "attribute": "label",
      "reflect": true,
      "defaultValue": "''"
    },
    "showLabel": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "1.11.0"
          }],
        "text": "Determines whether to display the label of the app header button\n   directly on the button itself or in a tooltip\n   when the user hovers over the button."
      },
      "attribute": "show-label",
      "reflect": false,
      "defaultValue": "true"
    },
    "avatar": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "VegaAppHeaderAvatarConfig",
        "resolved": "{ src?: string; icon?: string; fallbackText?: string; fallbackBgColor?: \"bg-brand\" | \"bg-page\" | \"bg-primary\" | \"bg-secondary\" | \"bg-tertiary\" | \"bg-quaternary\" | \"bg-inverted-primary\" | \"bg-inverted-secondary\" | \"bg-inverted-tertiary\" | \"bg-inverted-quaternary\" | \"bg-action\" | \"bg-action-hover\" | \"bg-action-focus\" | \"bg-action-active\" | \"bg-action-quaternary\" | \"bg-action-quaternary-hover\" | \"bg-action-quaternary-active\" | \"bg-action-secondary\" | \"bg-action-secondary-hover\" | \"bg-action-secondary-active\" | \"bg-action-tertiary\" | \"bg-action-tertiary-hover\" | \"bg-action-tertiary-active\" | \"bg-app-header\" | \"bg-backdrop-modal\" | \"bg-backdrop-popover\" | \"bg-backdrop-sidebar\" | \"bg-chip\" | \"bg-chip-hover\" | \"bg-chip-active\" | \"bg-danger\" | \"bg-danger-hover\" | \"bg-danger-focus\" | \"bg-danger-active\" | \"bg-danger-tertiary\" | \"bg-danger-tertiary-hover\" | \"bg-danger-tertiary-active\" | \"bg-disabled\" | \"bg-divider\" | \"bg-divider-secondary\" | \"bg-keypad-btn-active\" | \"bg-loading-progress\" | \"bg-loading-track\" | \"bg-segment-hover\" | \"bg-segment-control\" | \"bg-selected\" | \"bg-sidebar\" | \"bg-sidebar-icon\" | \"bg-sidebar-icon-hover\" | \"bg-sidebar-icon-selected\" | \"bg-sidebar-item-hover\" | \"bg-sidebar-item-selected\" | \"bg-site-footer\" | \"bg-site-footer-action\" | \"bg-site-footer-action-hover\" | \"bg-site-footer-action-active\" | \"bg-site-footer-field\" | \"bg-slider-handle\" | \"bg-status-error\" | \"bg-status-info\" | \"bg-status-success\" | \"bg-status-warning\" | \"bg-tab\" | \"bg-tab-hover\" | \"bg-tab-selected\" | \"bg-table-alt-row\" | \"bg-table-header\" | \"bg-table-row-hover\" | \"bg-table-row-selected-expanded\" | \"bg-table-selected-row\" | \"bg-textarea-count\" | \"bg-tile\" | \"bg-tile-hover\" | \"bg-tile-selected\" | \"bg-tile-selected-hover\" | \"bg-toggle-switch\" | \"bg-toggle-switch-hover\" | \"bg-toggle-switch-selected-disabled\" | \"bg-transparent\" | \"bg-accent1-primary\" | \"bg-accent1-secondary\" | \"bg-accent1-tertiary\" | \"bg-accent2-primary\" | \"bg-accent2-secondary\" | \"bg-accent2-tertiary\" | \"bg-accent3-primary\" | \"bg-accent3-secondary\" | \"bg-accent3-tertiary\" | \"bg-accent4-primary\" | \"bg-accent4-secondary\" | \"bg-accent4-tertiary\" | \"bg-accent5-primary\" | \"bg-accent5-secondary\" | \"bg-accent5-tertiary\" | \"bg-accent6-primary\" | \"bg-accent6-secondary\" | \"bg-accent6-tertiary\" | \"bg-accent7-primary\" | \"bg-accent7-secondary\" | \"bg-accent7-tertiary\" | \"bg-accent8-primary\" | \"bg-accent8-secondary\" | \"bg-accent8-tertiary\" | \"bg-accent9-primary\" | \"bg-accent9-secondary\" | \"bg-accent9-tertiary\" | \"bg-accent10-primary\" | \"bg-accent10-secondary\" | \"bg-accent10-tertiary\" | \"bg-date-picker-range\"; fallbackTextColor?: \"text-primary\" | \"text-secondary\" | \"text-inverted-primary\" | \"text-inverted-secondary\" | \"text-black\" | \"text-white\" | \"text-brand\" | \"text-danger-link\" | \"text-danger-link-hover\" | \"text-danger-link-active\" | \"text-danger-link-focus\" | \"text-danger-link-visited\" | \"text-disabled\" | \"text-error\" | \"text-input-disabled\" | \"text-input-placeholder\" | \"text-link\" | \"text-link-hover\" | \"text-link-active\" | \"text-link-focus\" | \"text-link-visited\" | \"text-on-action\" | \"text-on-danger\" | \"text-on-disabled\" | \"text-sidebar-link\" | \"text-sidebar-link-hover\" | \"text-sidebar-link-selected\" | \"text-site-footer-link\" | \"text-site-footer-link-hover\" | \"text-site-footer-link-active\" | \"text-success\" | \"text-inverted-success\" | \"text-accent1-primary\" | \"text-accent2-primary\" | \"text-accent3-primary\" | \"text-accent4-primary\" | \"text-accent5-primary\" | \"text-accent6-primary\" | \"text-accent7-primary\" | \"text-accent8-primary\" | \"text-accent9-primary\" | \"text-accent10-primary\"; }",
        "references": {
          "VegaAppHeaderAvatarConfig": {
            "location": "import",
            "path": "./types"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "1.11.0"
          }],
        "text": "Specifies the configuration for the avatar image or icon\n   displayed in the app header button."
      },
      "defaultValue": "{}"
    },
    "avatarPosition": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "'right' | 'left'",
        "resolved": "\"left\" | \"right\"",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "1.11.0"
          }],
        "text": "Specifies the position of the avatar in relation to the label\n   within the app header button."
      },
      "attribute": "avatar-position",
      "reflect": false,
      "defaultValue": "'left'"
    },
    "showBorder": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "1.11.0"
          }],
        "text": "Specifies whether to show a border around the app header button."
      },
      "attribute": "show-border",
      "reflect": false,
      "defaultValue": "false"
    },
    "showMenuArrowIcon": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "1.11.0"
          }],
        "text": "Specifies whether to display a menu arrow icon in the app header button."
      },
      "attribute": "show-menu-arrow-icon",
      "reflect": false,
      "defaultValue": "true"
    },
    "selected": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "1.15.0"
          }],
        "text": "Specifies whether the app header button is displayed in a selected state."
      },
      "attribute": "selected",
      "reflect": false,
      "defaultValue": "false"
    }
  }; }
  static get states() { return {
    "isDropdownShow": {},
    "currentBreakpoint": {}
  }; }
  static get events() { return [{
      "method": "vegaClick",
      "name": "vegaClick",
      "bubbles": true,
      "cancelable": true,
      "composed": true,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "1.11.0"
          }],
        "text": "An event emitter notifying the click event of an app header button."
      },
      "complexType": {
        "original": "any",
        "resolved": "any",
        "references": {}
      }
    }, {
      "method": "click",
      "name": "click",
      "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 click event of an app header button."
      },
      "complexType": {
        "original": "any",
        "resolved": "any",
        "references": {}
      }
    }, {
      "method": "vegaDropdownClick",
      "name": "vegaDropdownClick",
      "bubbles": true,
      "cancelable": true,
      "composed": true,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "1.23.0"
          }],
        "text": "An event emitter notifying the click event of a dropdown item\n   in the app header."
      },
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      }
    }, {
      "method": "dropdownClick",
      "name": "dropdownClick",
      "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 click event of a dropdown item\n   in the app header."
      },
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      }
    }, {
      "method": "vegaReset",
      "name": "vegaReset",
      "bubbles": true,
      "cancelable": true,
      "composed": true,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.73.0"
          }],
        "text": "An event emitter notifying the reset event in the dropdown."
      },
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      }
    }, {
      "method": "reset",
      "name": "reset",
      "bubbles": true,
      "cancelable": true,
      "composed": true,
      "docs": {
        "tags": [{
            "name": "eventSemantics",
            "text": "namespace:native"
          }, {
            "name": "vegaVersion",
            "text": "2.73.0"
          }],
        "text": "An event emitter notifying the reset event in the dropdown."
      },
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      }
    }, {
      "method": "vegaSearch",
      "name": "vegaSearch",
      "bubbles": true,
      "cancelable": true,
      "composed": true,
      "docs": {
        "tags": [{
            "name": "vegaVersion",
            "text": "2.84.0"
          }],
        "text": "An event emitter notifying the search event in the dropdown,\n   but only if `useDefaultFilter` is set to `false`."
      },
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      }
    }, {
      "method": "dropdownSearch",
      "name": "dropdownSearch",
      "bubbles": true,
      "cancelable": true,
      "composed": true,
      "docs": {
        "tags": [{
            "name": "eventSemantics",
            "text": "namespace:native"
          }, {
            "name": "vegaVersion",
            "text": "2.84.0"
          }],
        "text": "An event emitter notifying the search event in the dropdown,\n   but only if `useDefaultFilter` is set to `false`."
      },
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      }
    }]; }
  static get elementRef() { return "host"; }
  static get watchers() { return [{
      "propName": "avatar",
      "methodName": "watchAvatar"
    }]; }
}
__decorate([
  InjectVegaGlobalSlimmer()
], VegaAppHeaderButton.prototype, "globalSlimmers", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaAppHeaderButton.prototype, "pageResizeObserverSlimmer", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaAppHeaderButton.prototype, "dropdownEventPrevent", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaAppHeaderButton.prototype, "clickEventEmitter", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaAppHeaderButton.prototype, "dropdownClickEventEmitter", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaAppHeaderButton.prototype, "resetEventEmitter", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaAppHeaderButton.prototype, "searchEventEmitter", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaAppHeaderButton.prototype, "vegaMenuArrowIconRenderer", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaAppHeaderButton.prototype, "vegaComponentUsageRuntimeMetricsSlimmer", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaAppHeaderButton.prototype, "dropdownRenderer", void 0);
__decorate([
  InjectVegaSlimmer()
], VegaAppHeaderButton.prototype, "ariaAttributesValueMapper", void 0);
