text: (function (global, factory) {
      typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('@angular/core'),require('@angular/common'),exports, require('@angular/core'), require('@angular/animations'), require('@angular/common')) :
      typeof define === 'function' && define.amd ? define('ng2-material-dropdown', ['@angular/core','@angular/common','exports', '@angular/core', '@angular/animations', '@angular/common'], factory) :
      (global = global || self, factory(global.ng.core,global.ng.common,global['ng2-material-dropdown'] = {}, global.ng.core, global.ng.animations, global.ng.common));
  }(this, function (ɵngcc0,ɵngcc1,exports, core, animations, common) { 
  function Ng2DropdownButton_span_3_Template(rf, ctx) { if (rf & 1) {
      ɵngcc0.ɵɵelementStart(0, "span", 3);
      ɵngcc0.ɵɵnamespaceSVG();
      ɵngcc0.ɵɵelementStart(1, "svg", 4);
      ɵngcc0.ɵɵelement(2, "path", 5);
      ɵngcc0.ɵɵelement(3, "g");
      ɵngcc0.ɵɵelement(4, "g");
      ɵngcc0.ɵɵelement(5, "g");
      ɵngcc0.ɵɵelement(6, "g");
      ɵngcc0.ɵɵelement(7, "g");
      ɵngcc0.ɵɵelement(8, "g");
      ɵngcc0.ɵɵelementEnd();
      ɵngcc0.ɵɵelementEnd();
  } }
  var _c0 = ["*"];
  function Ng2DropdownMenu_div_3_Template(rf, ctx) { if (rf & 1) {
      var _r2 = ɵngcc0.ɵɵgetCurrentView();
      ɵngcc0.ɵɵelementStart(0, "div", 2);
      ɵngcc0.ɵɵlistener("click", function Ng2DropdownMenu_div_3_Template_div_click_0_listener() { ɵngcc0.ɵɵrestoreView(_r2); var ctx_r1 = ɵngcc0.ɵɵnextContext(); return ctx_r1.hide(); });
      ɵngcc0.ɵɵelementEnd();
  } }
  var _c1 = [[["ng2-dropdown-button"]], [["ng2-dropdown-menu"]]];
  var _c2 = ["ng2-dropdown-button", "ng2-dropdown-menu"];
  'use strict';
  
      /*! *****************************************************************************
      Copyright (c) Microsoft Corporation. All rights reserved.
      Licensed under the Apache License, Version 2.0 (the "License"); you may not use
      this file except in compliance with the License. You may obtain a copy of the
      License at http://www.apache.org/licenses/LICENSE-2.0
  
      THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
      KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
      WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
      MERCHANTABLITY OR NON-INFRINGEMENT.
  
      See the Apache Version 2.0 License for specific language governing permissions
      and limitations under the License.
      ***************************************************************************** */
      /* global Reflect, Promise */
  
      var extendStatics = function(d, b) {
          extendStatics = Object.setPrototypeOf ||
              ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
              function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
          return extendStatics(d, b);
      };
  
      function __extends(d, b) {
          extendStatics(d, b);
          function __() { this.constructor = d; }
          d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      }
  
      var __assign = function() {
          __assign = Object.assign || function __assign(t) {
              for (var s, i = 1, n = arguments.length; i < n; i++) {
                  s = arguments[i];
                  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
              }
              return t;
          };
          return __assign.apply(this, arguments);
      };
  
      function __rest(s, e) {
          var t = {};
          for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
              t[p] = s[p];
          if (s != null && typeof Object.getOwnPropertySymbols === "function")
              for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
                  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
                      t[p[i]] = s[p[i]];
              }
          return t;
      }
  
      function __decorate(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;
      }
  
      function __param(paramIndex, decorator) {
          return function (target, key) { decorator(target, key, paramIndex); }
      }
  
      function __metadata(metadataKey, metadataValue) {
          if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
      }
  
      function __awaiter(thisArg, _arguments, P, generator) {
          return new (P || (P = Promise))(function (resolve, reject) {
              function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
              function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
              function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
              step((generator = generator.apply(thisArg, _arguments || [])).next());
          });
      }
  
      function __generator(thisArg, body) {
          var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
          return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
          function verb(n) { return function (v) { return step([n, v]); }; }
          function step(op) {
              if (f) throw new TypeError("Generator is already executing.");
              while (_) try {
                  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
                  if (y = 0, t) op = [op[0] & 2, t.value];
                  switch (op[0]) {
                      case 0: case 1: t = op; break;
                      case 4: _.label++; return { value: op[1], done: false };
                      case 5: _.label++; y = op[1]; op = [0]; continue;
                      case 7: op = _.ops.pop(); _.trys.pop(); continue;
                      default:
                          if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                          if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                          if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                          if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                          if (t[2]) _.ops.pop();
                          _.trys.pop(); continue;
                  }
                  op = body.call(thisArg, _);
              } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
              if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
          }
      }
  
      function __exportStar(m, exports) {
          for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
      }
  
      function __values(o) {
          var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
          if (m) return m.call(o);
          return {
              next: function () {
                  if (o && i >= o.length) o = void 0;
                  return { value: o && o[i++], done: !o };
              }
          };
      }
  
      function __read(o, n) {
          var m = typeof Symbol === "function" && o[Symbol.iterator];
          if (!m) return o;
          var i = m.call(o), r, ar = [], e;
          try {
              while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
          }
          catch (error) { e = { error: error }; }
          finally {
              try {
                  if (r && !r.done && (m = i["return"])) m.call(i);
              }
              finally { if (e) throw e.error; }
          }
          return ar;
      }
  
      function __spread() {
          for (var ar = [], i = 0; i < arguments.length; i++)
              ar = ar.concat(__read(arguments[i]));
          return ar;
      }
  
      function __spreadArrays() {
          for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
          for (var r = Array(s), k = 0, i = 0; i < il; i++)
              for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
                  r[k] = a[j];
          return r;
      };
  
      function __await(v) {
          return this instanceof __await ? (this.v = v, this) : new __await(v);
      }
  
      function __asyncGenerator(thisArg, _arguments, generator) {
          if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
          var g = generator.apply(thisArg, _arguments || []), i, q = [];
          return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
          function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
          function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
          function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
          function fulfill(value) { resume("next", value); }
          function reject(value) { resume("throw", value); }
          function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
      }
  
      function __asyncDelegator(o) {
          var i, p;
          return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
          function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
      }
  
      function __asyncValues(o) {
          if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
          var m = o[Symbol.asyncIterator], i;
          return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
          function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
          function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
      }
  
      function __makeTemplateObject(cooked, raw) {
          if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
          return cooked;
      };
  
      function __importStar(mod) {
          if (mod && mod.__esModule) return mod;
          var result = {};
          if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
          result.default = mod;
          return result;
      }
  
      function __importDefault(mod) {
          return (mod && mod.__esModule) ? mod : { default: mod };
      }
  
      var Ng2DropdownButton = /** @class */ (function () {
          function Ng2DropdownButton(element) {
              this.element = element;
              this.onMenuToggled = new core.EventEmitter();
              this.showCaret = true;
          }
          /**
           * @name toggleMenu
           * @desc emits event to toggle menu
           */
          Ng2DropdownButton.prototype.toggleMenu = function () {
              this.onMenuToggled.emit(true);
          };
          /**
           * @name getPosition
           * @desc returns position of the button
           */
          Ng2DropdownButton.prototype.getPosition = function () {
              return this.element.nativeElement.getBoundingClientRect();
          };
          Ng2DropdownButton.ctorParameters = function () { return [
              { type: core.ElementRef }
          ]; };
          __decorate([
              core.Output()
          ], Ng2DropdownButton.prototype, "onMenuToggled", void 0);
          __decorate([
              core.Input()
          ], Ng2DropdownButton.prototype, "showCaret", void 0);
  Ng2DropdownButton.ɵfac = function Ng2DropdownButton_Factory(t) { return new (t || Ng2DropdownButton)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef)); };
  Ng2DropdownButton.ɵcmp = ɵngcc0.ɵɵdefineComponent({ type: Ng2DropdownButton, selectors: [["ng2-dropdown-button"]], inputs: { showCaret: "showCaret" }, outputs: { onMenuToggled: "onMenuToggled" }, ngContentSelectors: _c0, decls: 4, vars: 1, consts: [["type", "button", "tabindex", "0s", 1, "ng2-dropdown-button", 3, "click"], [1, "ng2-dropdown-button__label"], ["class", "ng2-dropdown-button__caret", 4, "ngIf"], [1, "ng2-dropdown-button__caret"], ["enable-background", "new 0 0 32 32", "height", "16px", "id", "\u0421\u043B\u043E\u0439_1", "version", "1.1", "viewBox", "0 0 32 32", "width", "16px", 0, "xml", "space", "preserve", "xmlns", "http://www.w3.org/2000/svg", 0, "xmlns", "xlink", "http://www.w3.org/1999/xlink"], ["d", "M24.285,11.284L16,19.571l-8.285-8.288c-0.395-0.395-1.034-0.395-1.429,0  c-0.394,0.395-0.394,1.035,0,1.43l8.999,9.002l0,0l0,0c0.394,0.395,1.034,0.395,1.428,0l8.999-9.002  c0.394-0.395,0.394-1.036,0-1.431C25.319,10.889,24.679,10.889,24.285,11.284z", "fill", "#121313", "id", "Expand_More"]], template: function Ng2DropdownButton_Template(rf, ctx) { if (rf & 1) {
          ɵngcc0.ɵɵprojectionDef();
          ɵngcc0.ɵɵelementStart(0, "button", 0);
          ɵngcc0.ɵɵlistener("click", function Ng2DropdownButton_Template_button_click_0_listener() { return ctx.toggleMenu(); });
          ɵngcc0.ɵɵelementStart(1, "span", 1);
          ɵngcc0.ɵɵprojection(2);
          ɵngcc0.ɵɵelementEnd();
          ɵngcc0.ɵɵtemplate(3, Ng2DropdownButton_span_3_Template, 9, 0, "span", 2);
          ɵngcc0.ɵɵelementEnd();
      } if (rf & 2) {
          ɵngcc0.ɵɵadvance(3);
          ɵngcc0.ɵɵproperty("ngIf", ctx.showCaret);
      } }, directives: [ɵngcc1.NgIf], styles: [".ng2-dropdown-button[_ngcontent-%COMP%]{font-family:Roboto,\"Helvetica Neue\",Helvetica,Arial;background:#fff;padding:.45rem .25rem;font-size:14px;letter-spacing:.08rem;color:#444;outline:0;cursor:pointer;font-weight:400;border:none;border-bottom:1px solid #efefef;text-align:left;min-width:100px;width:100%;display:flex;flex-direction:row;max-width:150px}.ng2-dropdown-button[_ngcontent-%COMP%]:hover{color:#222}.ng2-dropdown-button[_ngcontent-%COMP%]:active, .ng2-dropdown-button[_ngcontent-%COMP%]:focus{color:#222;border-bottom:2px solid #2196f3}.ng2-dropdown-button__label[_ngcontent-%COMP%]{flex:1 1 95%}.ng2-dropdown-button__caret[_ngcontent-%COMP%]{width:12px;height:12px;display:flex;flex:1 1 6%}.ng2-dropdown-button--icon[_nghost-%COMP%]   .ng2-dropdown-button[_ngcontent-%COMP%], .ng2-dropdown-button--icon   [_nghost-%COMP%]   .ng2-dropdown-button[_ngcontent-%COMP%]{border:none;min-width:40px;width:40px;border-radius:100%;transition:.2s;text-align:center;height:40px;padding:.5em}.ng2-dropdown-button--icon[_nghost-%COMP%]   .ng2-dropdown-button[_ngcontent-%COMP%]:active, .ng2-dropdown-button--icon   [_nghost-%COMP%]   .ng2-dropdown-button[_ngcontent-%COMP%]:active{background:rgba(0,0,0,.2)}"] });
  /*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(Ng2DropdownButton, [{
          type: core.Component,
          args: [{
                  selector: 'ng2-dropdown-button',
                  template: "<button class='ng2-dropdown-button' type=\"button\" (click)=\"toggleMenu()\" tabindex=\"0s\">\n    <span class=\"ng2-dropdown-button__label\">\n        <ng-content></ng-content>\n    </span>\n\n    <span class=\"ng2-dropdown-button__caret\" *ngIf=\"showCaret\">\n        <svg enable-background=\"new 0 0 32 32\" height=\"16px\" id=\"\u0421\u043B\u043E\u0439_1\" version=\"1.1\" viewBox=\"0 0 32 32\" width=\"16px\" xml:space=\"preserve\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"><path d=\"M24.285,11.284L16,19.571l-8.285-8.288c-0.395-0.395-1.034-0.395-1.429,0  c-0.394,0.395-0.394,1.035,0,1.43l8.999,9.002l0,0l0,0c0.394,0.395,1.034,0.395,1.428,0l8.999-9.002  c0.394-0.395,0.394-1.036,0-1.431C25.319,10.889,24.679,10.889,24.285,11.284z\" fill=\"#121313\" id=\"Expand_More\"/><g/><g/><g/><g/><g/><g/></svg>\n    </span>\n</button>\n",
                  styles: [".ng2-dropdown-button{font-family:Roboto,\"Helvetica Neue\",Helvetica,Arial;background:#fff;padding:.45rem .25rem;font-size:14px;letter-spacing:.08rem;color:#444;outline:0;cursor:pointer;font-weight:400;border:none;border-bottom:1px solid #efefef;text-align:left;min-width:100px;width:100%;display:flex;flex-direction:row;max-width:150px}.ng2-dropdown-button:hover{color:#222}.ng2-dropdown-button:active,.ng2-dropdown-button:focus{color:#222;border-bottom:2px solid #2196f3}.ng2-dropdown-button__label{flex:1 1 95%}.ng2-dropdown-button__caret{width:12px;height:12px;display:flex;flex:1 1 6%}:host-context(.ng2-dropdown-button--icon) .ng2-dropdown-button{border:none;min-width:40px;width:40px;border-radius:100%;transition:.2s;text-align:center;height:40px;padding:.5em}:host-context(.ng2-dropdown-button--icon) .ng2-dropdown-button:active{background:rgba(0,0,0,.2)}"]
              }]
      }], function () { return [{ type: ɵngcc0.ElementRef }]; }, { onMenuToggled: [{
              type: core.Output
          }], showCaret: [{
              type: core.Input
          }] }); })();
          return Ng2DropdownButton;
      }());
  
      var _a;
      var KEYS = {
          BACKSPACE: 9,
          PREV: 38,
          NEXT: 40,
          ENTER: 13,
          ESCAPE: 27
      };
      /**
       * @name onSwitchNext
       * @param index
       * @param items
       * @param state
       */
      var onSwitchNext = function (index, items, state) {
          if (index < items.length - 1) {
              state.select(items[index + 1], true);
          }
      };
      var ɵ0 = onSwitchNext;
      /**
       * @name onSwitchPrev
       * @param index
       * @param items
       * @param state
       */
      var onSwitchPrev = function (index, items, state) {
          if (index > 0) {
              state.select(items[index - 1], true);
          }
      };
      var ɵ1 = onSwitchPrev;
      /**
       * @name onBackspace
       * @param index
       * @param items
       * @param state
       */
      var onBackspace = function (index, items, state) {
          if (index < items.length - 1) {
              state.select(items[index + 1], true);
          }
          else {
              state.select(items[0], true);
          }
      };
      var ɵ2 = onBackspace;
      function onEscape() {
          this.hide();
      }
      ;
      /**
       * @name onItemClicked
       * @param index
       * @param items
       * @param state
       */
      var onItemClicked = function (index, items, state) {
          return state.selectedItem ? state.selectedItem.click() : undefined;
      };
      var ɵ3 = onItemClicked;
      var ACTIONS = (_a = {},
          _a[KEYS.BACKSPACE] = onBackspace,
          _a[KEYS.PREV] = onSwitchPrev,
          _a[KEYS.NEXT] = onSwitchNext,
          _a[KEYS.ENTER] = onItemClicked,
          _a[KEYS.ESCAPE] = onEscape,
          _a);
      function arrowKeysHandler(event) {
          if ([38, 40].indexOf(event.keyCode) > -1) {
              event.preventDefault();
          }
      }
  
      var Ng2DropdownState = /** @class */ (function () {
          function Ng2DropdownState() {
              this.onItemSelected = new core.EventEmitter();
              this.onItemClicked = new core.EventEmitter();
              this.onItemDestroyed = new core.EventEmitter();
          }
          Object.defineProperty(Ng2DropdownState.prototype, "selectedItem", {
              /**
               * @name selectedItem
               * @desc getter for _selectedItem
               */
              get: function () {
                  return this._selectedItem;
              },
              enumerable: true,
              configurable: true
          });
          /**
           * @name selects a menu item and emits event
           * @param item
           */
          Ng2DropdownState.prototype.select = function (item, dispatchEvent) {
              if (dispatchEvent === void 0) { dispatchEvent = true; }
              this._selectedItem = item;
              if (!dispatchEvent || !item) {
                  return;
              }
              item.focus();
              this.onItemSelected.emit(item);
          };
          /**
           * @name unselect
           * @desc sets _selectedItem as undefined
           */
          Ng2DropdownState.prototype.unselect = function () {
              this._selectedItem = undefined;
          };
          return Ng2DropdownState;
      }());
  
      var DropdownStateService = /** @class */ (function () {
          function DropdownStateService() {
              this.menuState = {
                  isVisible: false,
                  toString: function () {
                      return this.isVisible === true ? 'visible' : 'hidden';
                  }
              };
              this.dropdownState = new Ng2DropdownState();
          }
  DropdownStateService.ɵfac = function DropdownStateService_Factory(t) { return new (t || DropdownStateService)(); };
  DropdownStateService.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: DropdownStateService, factory: function (t) { return DropdownStateService.ɵfac(t); } });
  /*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(DropdownStateService, [{
          type: core.Injectable
      }], function () { return []; }, null); })();
          return DropdownStateService;
      }());
  
      var Ng2MenuItem = /** @class */ (function () {
          function Ng2MenuItem(state, element) {
              this.state = state;
              this.element = element;
              /**
               * @preventClose
               * @desc if true, clicking on the item won't close the dropdown
               */
              this.preventClose = false;
          }
          Ng2MenuItem.prototype.ngOnDestroy = function () {
              this.state.dropdownState.onItemDestroyed.emit(this);
          };
          Object.defineProperty(Ng2MenuItem.prototype, "isSelected", {
              /**
               * @name isSelected
               * @desc returns current selected item
               */
              get: function () {
                  return this === this.state.dropdownState.selectedItem;
              },
              enumerable: true,
              configurable: true
          });
          /**
           * @name click
           * @desc emits select event
           */
          Ng2MenuItem.prototype.select = function ($event) {
              this.state.dropdownState.select(this, true);
              if ($event) {
                  $event.stopPropagation();
                  $event.preventDefault();
              }
          };
          /**
           * @name click
           * @desc emits click event
           */
          Ng2MenuItem.prototype.click = function () {
              this.state.dropdownState.onItemClicked.emit(this);
          };
          /**
           * @name focus
           */
          Ng2MenuItem.prototype.focus = function () {
              this.element.nativeElement.children[0].focus();
          };
          Ng2MenuItem.ctorParameters = function () { return [
              { type: DropdownStateService },
              { type: core.ElementRef }
          ]; };
          __decorate([
              core.Input()
          ], Ng2MenuItem.prototype, "preventClose", void 0);
          __decorate([
              core.Input()
          ], Ng2MenuItem.prototype, "value", void 0);
  Ng2MenuItem.ɵfac = function Ng2MenuItem_Factory(t) { return new (t || Ng2MenuItem)(ɵngcc0.ɵɵdirectiveInject(DropdownStateService), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef)); };
  Ng2MenuItem.ɵcmp = ɵngcc0.ɵɵdefineComponent({ type: Ng2MenuItem, selectors: [["ng2-menu-item"]], inputs: { preventClose: "preventClose", value: "value" }, ngContentSelectors: _c0, decls: 2, vars: 2, consts: [["role", "button", "tabindex", "0", 1, "ng2-menu-item", 3, "keydown.enter", "click", "mouseover"]], template: function Ng2MenuItem_Template(rf, ctx) { if (rf & 1) {
          ɵngcc0.ɵɵprojectionDef();
          ɵngcc0.ɵɵelementStart(0, "div", 0);
          ɵngcc0.ɵɵlistener("keydown.enter", function Ng2MenuItem_Template_div_keydown_enter_0_listener() { return ctx.click(); })("click", function Ng2MenuItem_Template_div_click_0_listener() { return ctx.click(); })("mouseover", function Ng2MenuItem_Template_div_mouseover_0_listener() { return ctx.select(); });
          ɵngcc0.ɵɵprojection(1);
          ɵngcc0.ɵɵelementEnd();
      } if (rf & 2) {
          ɵngcc0.ɵɵclassProp("ng2-menu-item--selected", ctx.isSelected);
      } }, styles: [".ng2-menu-item[_ngcontent-%COMP%]{font-family:Roboto,\"Helvetica Neue\",Helvetica,Arial;background:#fff;color:rgba(0,0,0,.87);cursor:pointer;font-size:.9em;text-transform:none;font-weight:400;letter-spacing:.03em;height:48px;line-height:48px;padding:.3em 1.25rem;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;transition:background .25s}.ng2-menu-item--selected[_ngcontent-%COMP%]{background:rgba(158,158,158,.2);outline:0}.ng2-menu-item[_ngcontent-%COMP%]:focus{outline:0}.ng2-menu-item[_ngcontent-%COMP%]:active{background:rgba(158,158,158,.4)}ng2-menu-item[_nghost-%COMP%]     [ng2-menu-item-icon]{vertical-align:middle;font-size:28px;width:1.5em;height:30px;color:rgba(0,0,0,.44)}"] });
  /*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(Ng2MenuItem, [{
          type: core.Component,
          args: [{
                  selector: 'ng2-menu-item',
                  template: "\n        <div\n            class=\"ng2-menu-item\"\n            role=\"button\"\n            tabindex=\"0\"\n            [class.ng2-menu-item--selected]=\"isSelected\"\n            (keydown.enter)=\"click()\"\n            (click)=\"click()\"\n            (mouseover)=\"select()\"\n        >\n            <ng-content></ng-content>\n        </div>\n    ",
                  styles: [".ng2-menu-item{font-family:Roboto,\"Helvetica Neue\",Helvetica,Arial;background:#fff;color:rgba(0,0,0,.87);cursor:pointer;font-size:.9em;text-transform:none;font-weight:400;letter-spacing:.03em;height:48px;line-height:48px;padding:.3em 1.25rem;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;transition:background .25s}.ng2-menu-item--selected{background:rgba(158,158,158,.2);outline:0}.ng2-menu-item:focus{outline:0}.ng2-menu-item:active{background:rgba(158,158,158,.4)}:host(ng2-menu-item) ::ng-deep [ng2-menu-item-icon]{vertical-align:middle;font-size:28px;width:1.5em;height:30px;color:rgba(0,0,0,.44)}"]
              }]
      }], function () { return [{ type: DropdownStateService }, { type: ɵngcc0.ElementRef }]; }, { preventClose: [{
              type: core.Input
          }], value: [{
              type: core.Input
          }] }); })();
          return Ng2MenuItem;
      }());
  
      var Ng2DropdownMenu = /** @class */ (function () {
          function Ng2DropdownMenu(dropdownState, element, renderer) {
              this.dropdownState = dropdownState;
              this.element = element;
              this.renderer = renderer;
              /**
               * @name width
               */
              this.width = 4;
              /**
               * @description if set to true, the first element of the dropdown will be automatically focused
               * @name focusFirstElement
               */
              this.focusFirstElement = true;
              /**
               * @name appendToBody
               */
              this.appendToBody = true;
              /**
               * @name zIndex
               */
              this.zIndex = 1000;
              this.listeners = {
                  arrowHandler: undefined,
                  handleKeypress: undefined
              };
          }
          /**
           * @name show
           * @shows menu and selects first item
           */
          Ng2DropdownMenu.prototype.show = function (position, dynamic) {
              if (dynamic === void 0) { dynamic = true; }
              var dc = typeof document !== 'undefined' ? document : undefined;
              var wd = typeof window !== 'undefined' ? window : undefined;
              if (!this.dropdownState.menuState.isVisible) {
                  // setting handlers
                  this.listeners.handleKeypress = this.renderer.listen(dc.body, 'keydown', this.handleKeypress.bind(this));
                  this.listeners.arrowHandler = this.renderer.listen(wd, 'keydown', arrowKeysHandler);
              }
              // update state
              this.dropdownState.menuState.isVisible = true;
              if (position) {
                  this.updatePosition(position, dynamic);
              }
          };
          /**
           * @name hide
           * @desc hides menu
           */
          Ng2DropdownMenu.prototype.hide = function () {
              this.dropdownState.menuState.isVisible = false;
              // reset selected item state
              this.dropdownState.dropdownState.unselect();
              // call function to unlisten
              this.listeners.arrowHandler && this.listeners.arrowHandler();
              this.listeners.handleKeypress && this.listeners.handleKeypress();
          };
          /**
           * @name updatePosition
           * @desc updates the menu position every time it is toggled
           * @param position {ClientRect}
           * @param dynamic {boolean}
           */
          Ng2DropdownMenu.prototype.updatePosition = function (position, dynamic) {
              this.position = position;
              this.updateOnChange(dynamic);
          };
          /**
           * @name handleKeypress
           * @desc executes functions on keyPress based on the key pressed
           * @param $event
           */
          Ng2DropdownMenu.prototype.handleKeypress = function ($event) {
              var key = $event.keyCode;
              var items = this.items.toArray();
              var index = items.indexOf(this.dropdownState.dropdownState.selectedItem);
              if (!ACTIONS.hasOwnProperty(key)) {
                  return;
              }
              ACTIONS[key].call(this, index, items, this.dropdownState.dropdownState);
          };
          /**
           * @name getMenuElement
           */
          Ng2DropdownMenu.prototype.getMenuElement = function () {
              return this.element.nativeElement.children[0];
          };
          /**
           * @name calcPositionOffset
           * @param position
           */
          Ng2DropdownMenu.prototype.calcPositionOffset = function (position) {
              var wd = typeof window !== 'undefined' ? window : undefined;
              var dc = typeof document !== 'undefined' ? document : undefined;
              if (!wd || !dc || !position) {
                  return;
              }
              var element = this.getMenuElement();
              var supportPageOffset = wd.pageXOffset !== undefined;
              var isCSS1Compat = (dc.compatMode || '') === 'CSS1Compat';
              var x = supportPageOffset
                  ? wd.pageXOffset
                  : isCSS1Compat
                      ? dc.documentElement.scrollLeft
                      : dc.body.scrollLeft;
              var y = supportPageOffset
                  ? wd.pageYOffset
                  : isCSS1Compat
                      ? dc.documentElement.scrollTop
                      : dc.body.scrollTop;
              var _a = this.applyOffset(position.top + (this.appendToBody ? y - 15 : 0) + "px", position.left + x - 5 + "px"), top = _a.top, left = _a.left;
              var clientWidth = element.clientWidth;
              var clientHeight = element.clientHeight;
              var marginFromBottom = parseInt(top) + clientHeight + (this.appendToBody ? 0 : y - 15);
              var marginFromRight = parseInt(left) + clientWidth;
              var windowScrollHeight = wd.innerHeight + wd.scrollY;
              var windowScrollWidth = wd.innerWidth + wd.scrollX;
              if (marginFromBottom >= windowScrollHeight) {
                  top = parseInt(top.replace('px', '')) - clientHeight + "px";
              }
              if (marginFromRight >= windowScrollWidth) {
                  var marginRight = marginFromRight - windowScrollWidth + 30;
                  left = parseInt(left.replace('px', '')) - marginRight + "px";
              }
              return { top: top, left: left };
          };
          Ng2DropdownMenu.prototype.applyOffset = function (top, left) {
              if (!this.offset) {
                  return { top: top, left: left };
              }
              var offset = this.offset.split(' ');
              if (!offset[1]) {
                  offset[1] = '0';
              }
              top = parseInt(top.replace('px', '')) + parseInt(offset[0]) + "px";
              left = parseInt(left.replace('px', '')) + parseInt(offset[1]) + "px";
              return { top: top, left: left };
          };
          Ng2DropdownMenu.prototype.ngOnInit = function () {
              var dc = typeof document !== 'undefined' ? document : undefined;
              if (this.appendToBody) {
                  // append menu element to the body
                  dc.body.appendChild(this.element.nativeElement);
              }
          };
          Ng2DropdownMenu.prototype.updateOnChange = function (dynamic) {
              if (dynamic === void 0) { dynamic = true; }
              var element = this.getMenuElement();
              var position = this.calcPositionOffset(this.position);
              if (position) {
                  this.renderer.setStyle(element, 'top', position.top.toString());
                  this.renderer.setStyle(element, 'left', position.left.toString());
              }
              // select first item unless user disabled this option
              if (this.focusFirstElement &&
                  this.items.first &&
                  !this.dropdownState.dropdownState.selectedItem) {
                  this.dropdownState.dropdownState.select(this.items.first, false);
              }
          };
          Ng2DropdownMenu.prototype.ngOnDestroy = function () {
              var elem = this.element.nativeElement;
              elem.parentNode.removeChild(elem);
              if (this.listeners.handleKeypress) {
                  this.listeners.handleKeypress();
              }
          };
          Ng2DropdownMenu.ctorParameters = function () { return [
              { type: DropdownStateService },
              { type: core.ElementRef },
              { type: core.Renderer2 }
          ]; };
          __decorate([
              core.Input()
          ], Ng2DropdownMenu.prototype, "width", void 0);
          __decorate([
              core.Input()
          ], Ng2DropdownMenu.prototype, "focusFirstElement", void 0);
          __decorate([
              core.Input()
          ], Ng2DropdownMenu.prototype, "offset", void 0);
          __decorate([
              core.Input()
          ], Ng2DropdownMenu.prototype, "appendToBody", void 0);
          __decorate([
              core.Input()
          ], Ng2DropdownMenu.prototype, "zIndex", void 0);
          __decorate([
              core.ContentChildren(Ng2MenuItem, { descendants: true })
          ], Ng2DropdownMenu.prototype, "items", void 0);
  Ng2DropdownMenu.ɵfac = function Ng2DropdownMenu_Factory(t) { return new (t || Ng2DropdownMenu)(ɵngcc0.ɵɵdirectiveInject(DropdownStateService), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2)); };
  Ng2DropdownMenu.ɵcmp = ɵngcc0.ɵɵdefineComponent({ type: Ng2DropdownMenu, selectors: [["ng2-dropdown-menu"]], contentQueries: function Ng2DropdownMenu_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
          ɵngcc0.ɵɵcontentQuery(dirIndex, Ng2MenuItem, true);
      } if (rf & 2) {
          var _t;
          ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.items = _t);
      } }, inputs: { width: "width", focusFirstElement: "focusFirstElement", appendToBody: "appendToBody", zIndex: "zIndex", offset: "offset" }, ngContentSelectors: _c0, decls: 4, vars: 12, consts: [[1, "ng2-dropdown-menu__options-container"], ["class", "ng2-dropdown-backdrop", 3, "click", 4, "ngIf"], [1, "ng2-dropdown-backdrop", 3, "click"]], template: function Ng2DropdownMenu_Template(rf, ctx) { if (rf & 1) {
          ɵngcc0.ɵɵprojectionDef();
          ɵngcc0.ɵɵelementStart(0, "div");
          ɵngcc0.ɵɵelementStart(1, "div", 0);
          ɵngcc0.ɵɵprojection(2);
          ɵngcc0.ɵɵelementEnd();
          ɵngcc0.ɵɵelementEnd();
          ɵngcc0.ɵɵtemplate(3, Ng2DropdownMenu_div_3_Template, 1, 0, "div", 1);
      } if (rf & 2) {
          ɵngcc0.ɵɵclassMapInterpolate1("ng2-dropdown-menu ng2-dropdown-menu---width--", ctx.width, "");
          ɵngcc0.ɵɵstyleProp("z-index", ctx.zIndex);
          ɵngcc0.ɵɵclassProp("ng2-dropdown-menu--inside-element", !ctx.appendToBody)("ng2-dropdown-menu--open", ctx.dropdownState.menuState.isVisible);
          ɵngcc0.ɵɵproperty("@fade", ctx.dropdownState.menuState.toString());
          ɵngcc0.ɵɵadvance(1);
          ɵngcc0.ɵɵproperty("@opacity", ctx.dropdownState.menuState.toString());
          ɵngcc0.ɵɵadvance(2);
          ɵngcc0.ɵɵproperty("ngIf", ctx.dropdownState.menuState.isVisible);
      } }, directives: [ɵngcc1.NgIf], styles: ["[_nghost-%COMP%]{display:block}.ng2-dropdown-menu[_ngcontent-%COMP%]{overflow-y:auto;box-shadow:0 1px 2px 0 rgba(0,0,0,.3);position:absolute;padding:.5em 0;background:#fff;border-radius:1px;max-height:400px;width:260px;min-height:0;display:block}.ng2-dropdown-menu.ng2-dropdown-menu--inside-element[_ngcontent-%COMP%]{position:fixed}.ng2-dropdown-menu.ng2-dropdown-menu--width--2[_ngcontent-%COMP%]{width:200px}.ng2-dropdown-menu.ng2-dropdown-menu--width--4[_ngcontent-%COMP%]{width:260px}.ng2-dropdown-menu.ng2-dropdown-menu--width--6[_ngcontent-%COMP%]{width:320px}.ng2-dropdown-backdrop[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1;overflow:hidden}[_nghost-%COMP%]     .ng2-menu-divider{height:1px;min-height:1px;max-height:1px;width:100%;display:block;background:#f9f9f9}"], data: { animation: [
              animations.trigger('fade', [
                  animations.state('visible', animations.style({ opacity: 1, height: '*', width: '*' })),
                  animations.state('hidden', animations.style({ opacity: 0, overflow: 'hidden', height: 0, width: 0 })),
                  animations.transition('hidden => visible', [
                      animations.animate('250ms ease-in', animations.style({ opacity: 1, height: '*', width: '*' }))
                  ]),
                  animations.transition('visible => hidden', [
                      animations.animate('350ms ease-out', animations.style({ opacity: 0, width: 0, height: 0 }))
                  ])
              ]),
              animations.trigger('opacity', [
                  animations.transition('hidden => visible', [
                      animations.animate('450ms ease-in', animations.keyframes([
                          animations.style({ opacity: 0, offset: 0 }),
                          animations.style({ opacity: 1, offset: 1 })
                      ]))
                  ]),
                  animations.transition('visible => hidden', [
                      animations.animate('250ms ease-out', animations.keyframes([
                          animations.style({ opacity: 1, offset: 0 }),
                          animations.style({ opacity: 0.5, offset: 0.3 }),
                          animations.style({ opacity: 0, offset: 1 })
                      ]))
                  ])
              ])
          ] } });
  /*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(Ng2DropdownMenu, [{
          type: core.Component,
          args: [{
                  selector: 'ng2-dropdown-menu',
                  template: "\n        <!-- MENU -->\n        <div\n            class=\"ng2-dropdown-menu ng2-dropdown-menu---width--{{ width }}\"\n            [class.ng2-dropdown-menu--inside-element]=\"!appendToBody\"\n            [class.ng2-dropdown-menu--open]=\"dropdownState.menuState.isVisible\"\n            [style.z-index]=\"zIndex\"\n            [@fade]=\"dropdownState.menuState.toString()\"\n        >\n            <div\n                class=\"ng2-dropdown-menu__options-container\"\n                [@opacity]=\"dropdownState.menuState.toString()\"\n            >\n                <ng-content></ng-content>\n            </div>\n        </div>\n\n        <!-- BACKDROP -->\n        <div\n            class=\"ng2-dropdown-backdrop\"\n            *ngIf=\"dropdownState.menuState.isVisible\"\n            (click)=\"hide()\"\n        ></div>\n    ",
                  animations: [
                      animations.trigger('fade', [
                          animations.state('visible', animations.style({ opacity: 1, height: '*', width: '*' })),
                          animations.state('hidden', animations.style({ opacity: 0, overflow: 'hidden', height: 0, width: 0 })),
                          animations.transition('hidden => visible', [
                              animations.animate('250ms ease-in', animations.style({ opacity: 1, height: '*', width: '*' }))
                          ]),
                          animations.transition('visible => hidden', [
                              animations.animate('350ms ease-out', animations.style({ opacity: 0, width: 0, height: 0 }))
                          ])
                      ]),
                      animations.trigger('opacity', [
                          animations.transition('hidden => visible', [
                              animations.animate('450ms ease-in', animations.keyframes([
                                  animations.style({ opacity: 0, offset: 0 }),
                                  animations.style({ opacity: 1, offset: 1 })
                              ]))
                          ]),
                          animations.transition('visible => hidden', [
                              animations.animate('250ms ease-out', animations.keyframes([
                                  animations.style({ opacity: 1, offset: 0 }),
                                  animations.style({ opacity: 0.5, offset: 0.3 }),
                                  animations.style({ opacity: 0, offset: 1 })
                              ]))
                          ])
                      ])
                  ],
                  styles: [":host{display:block}.ng2-dropdown-menu{overflow-y:auto;box-shadow:0 1px 2px 0 rgba(0,0,0,.3);position:absolute;padding:.5em 0;background:#fff;border-radius:1px;max-height:400px;width:260px;min-height:0;display:block}.ng2-dropdown-menu.ng2-dropdown-menu--inside-element{position:fixed}.ng2-dropdown-menu.ng2-dropdown-menu--width--2{width:200px}.ng2-dropdown-menu.ng2-dropdown-menu--width--4{width:260px}.ng2-dropdown-menu.ng2-dropdown-menu--width--6{width:320px}.ng2-dropdown-backdrop{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1;overflow:hidden}:host ::ng-deep .ng2-menu-divider{height:1px;min-height:1px;max-height:1px;width:100%;display:block;background:#f9f9f9}"]
              }]
      }], function () { return [{ type: DropdownStateService }, { type: ɵngcc0.ElementRef }, { type: ɵngcc0.Renderer2 }]; }, { width: [{
              type: core.Input
          }], focusFirstElement: [{
              type: core.Input
          }], appendToBody: [{
              type: core.Input
          }], zIndex: [{
              type: core.Input
          }], offset: [{
              type: core.Input
          }], items: [{
              type: core.ContentChildren,
              args: [Ng2MenuItem, { descendants: true }]
          }] }); })();
          return Ng2DropdownMenu;
      }());
  
      var Ng2Dropdown = /** @class */ (function () {
          function Ng2Dropdown(state) {
              this.state = state;
              this.dynamicUpdate = true;
              // outputs
              this.onItemClicked = new core.EventEmitter();
              this.onItemSelected = new core.EventEmitter();
              this.onShow = new core.EventEmitter();
              this.onHide = new core.EventEmitter();
          }
          Ng2Dropdown.prototype.ngOnInit = function () {
              var _this = this;
              this.state.dropdownState.onItemClicked.subscribe(function (item) {
                  _this.onItemClicked.emit(item);
                  if (item.preventClose) {
                      return;
                  }
                  _this.hide.call(_this);
              });
              if (this.button) {
                  this.button.onMenuToggled.subscribe(function () {
                      _this.toggleMenu();
                  });
              }
              this.state.dropdownState.onItemSelected.subscribe(function (item) {
                  _this.onItemSelected.emit(item);
              });
              this.state.dropdownState.onItemDestroyed.subscribe(function (item) {
                  var newSelectedItem;
                  var items = _this.menu.items.toArray();
                  if (item !== _this.state.dropdownState.selectedItem) {
                      return;
                  }
                  if (_this.menu.focusFirstElement) {
                      newSelectedItem =
                          item === items[0] && items.length > 1
                              ? items[1]
                              : items[0];
                  }
                  _this.state.dropdownState.select(newSelectedItem);
              });
          };
          /**
           * @name toggleMenu
           * @desc toggles menu visibility
           */
          Ng2Dropdown.prototype.toggleMenu = function (position) {
              if (position === void 0) { position = this.button.getPosition(); }
              this.state.menuState.isVisible ? this.hide() : this.show(position);
          };
          /**
           * - hides dropdown
           * @name hide
           */
          Ng2Dropdown.prototype.hide = function () {
              this.menu.hide();
              this.onHide.emit(this);
          };
          /**
           * - shows dropdown
           * @name show
           * @param position
           */
          Ng2Dropdown.prototype.show = function (position) {
              if (position === void 0) { position = this.button.getPosition(); }
              this.menu.show(position, this.dynamicUpdate);
              this.onShow.emit(this);
          };
          /**
           * @name scrollListener
           */
          Ng2Dropdown.prototype.scrollListener = function () {
              if (this.button && this.dynamicUpdate) {
                  this.menu.updatePosition(this.button.getPosition(), true);
              }
          };
          Ng2Dropdown.ctorParameters = function () { return [
              { type: DropdownStateService }
          ]; };
          __decorate([
              core.ContentChild(Ng2DropdownButton, { static: true })
          ], Ng2Dropdown.prototype, "button", void 0);
          __decorate([
              core.ContentChild(Ng2DropdownMenu, { static: true })
          ], Ng2Dropdown.prototype, "menu", void 0);
          __decorate([
              core.Input()
          ], Ng2Dropdown.prototype, "dynamicUpdate", void 0);
          __decorate([
              core.Output()
          ], Ng2Dropdown.prototype, "onItemClicked", void 0);
          __decorate([
              core.Output()
          ], Ng2Dropdown.prototype, "onItemSelected", void 0);
          __decorate([
              core.Output()
          ], Ng2Dropdown.prototype, "onShow", void 0);
          __decorate([
              core.Output()
          ], Ng2Dropdown.prototype, "onHide", void 0);
          __decorate([
              core.HostListener('window:scroll')
          ], Ng2Dropdown.prototype, "scrollListener", null);
  Ng2Dropdown.ɵfac = function Ng2Dropdown_Factory(t) { return new (t || Ng2Dropdown)(ɵngcc0.ɵɵdirectiveInject(DropdownStateService)); };
  Ng2Dropdown.ɵcmp = ɵngcc0.ɵɵdefineComponent({ type: Ng2Dropdown, selectors: [["ng2-dropdown"]], contentQueries: function Ng2Dropdown_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
          ɵngcc0.ɵɵstaticContentQuery(dirIndex, Ng2DropdownButton, true);
          ɵngcc0.ɵɵstaticContentQuery(dirIndex, Ng2DropdownMenu, true);
      } if (rf & 2) {
          var _t;
          ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.button = _t.first);
          ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.menu = _t.first);
      } }, hostBindings: function Ng2Dropdown_HostBindings(rf, ctx) { if (rf & 1) {
          ɵngcc0.ɵɵlistener("scroll", function Ng2Dropdown_scroll_HostBindingHandler() { return ctx.scrollListener(); }, false, ɵngcc0.ɵɵresolveWindow);
      } }, inputs: { dynamicUpdate: "dynamicUpdate" }, outputs: { onItemClicked: "onItemClicked", onItemSelected: "onItemSelected", onShow: "onShow", onHide: "onHide" }, features: [ɵngcc0.ɵɵProvidersFeature([DropdownStateService])], ngContentSelectors: _c2, decls: 3, vars: 0, consts: [[1, "ng2-dropdown-container"]], template: function Ng2Dropdown_Template(rf, ctx) { if (rf & 1) {
          ɵngcc0.ɵɵprojectionDef(_c1);
          ɵngcc0.ɵɵelementStart(0, "div", 0);
          ɵngcc0.ɵɵprojection(1);
          ɵngcc0.ɵɵprojection(2, 1);
          ɵngcc0.ɵɵelementEnd();
      } }, encapsulation: 2 });
  /*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(Ng2Dropdown, [{
          type: core.Component,
          args: [{
                  selector: 'ng2-dropdown',
                  template: "\n        <div class=\"ng2-dropdown-container\">\n            <ng-content select=\"ng2-dropdown-button\"></ng-content>\n            <ng-content select=\"ng2-dropdown-menu\"></ng-content>\n        </div>\n    ",
                  providers: [DropdownStateService]
              }]
      }], function () { return [{ type: DropdownStateService }]; }, { dynamicUpdate: [{
              type: core.Input
          }], onItemClicked: [{
              type: core.Output
          }], onItemSelected: [{
              type: core.Output
          }], onShow: [{
              type: core.Output
          }], onHide: [{
              type: core.Output
          }], scrollListener: [{
              type: core.HostListener,
              args: ['window:scroll']
          }], button: [{
              type: core.ContentChild,
              args: [Ng2DropdownButton, { static: true }]
          }], menu: [{
              type: core.ContentChild,
              args: [Ng2DropdownMenu, { static: true }]
          }] }); })();
          return Ng2Dropdown;
      }());
  
      var Ng2DropdownModule = /** @class */ (function () {
          function Ng2DropdownModule() {
          }
  Ng2DropdownModule.ɵmod = ɵngcc0.ɵɵdefineNgModule({ type: Ng2DropdownModule });
  Ng2DropdownModule.ɵinj = ɵngcc0.ɵɵdefineInjector({ factory: function Ng2DropdownModule_Factory(t) { return new (t || Ng2DropdownModule)(); }, imports: [[
              common.CommonModule
          ]] });
  (function () { (typeof ngJitMode === "undefined" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(Ng2DropdownModule, { declarations: [Ng2Dropdown, Ng2MenuItem, Ng2DropdownButton, Ng2DropdownMenu], imports: [ɵngcc1.CommonModule], exports: [Ng2MenuItem, Ng2DropdownButton, Ng2DropdownMenu, Ng2Dropdown] }); })();
  /*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(Ng2DropdownModule, [{
          type: core.NgModule,
          args: [{
                  exports: [
                      Ng2MenuItem,
                      Ng2DropdownButton,
                      Ng2DropdownMenu,
                      Ng2Dropdown
                  ],
                  declarations: [
                      Ng2Dropdown,
                      Ng2MenuItem,
                      Ng2DropdownButton,
                      Ng2DropdownMenu,
                  ],
                  imports: [
                      common.CommonModule
                  ]
              }]
      }], function () { return []; }, null); })();
          return Ng2DropdownModule;
      }());
  
      exports.DropdownStateService = DropdownStateService;
      exports.Ng2Dropdown = Ng2Dropdown;
      exports.Ng2DropdownButton = Ng2DropdownButton;
      exports.Ng2DropdownMenu = Ng2DropdownMenu;
      exports.Ng2DropdownModule = Ng2DropdownModule;
      exports.Ng2MenuItem = Ng2MenuItem;
  
      Object.defineProperty(exports, '__esModule', { value: true });
  
  }));
  
  //# sourceMappingURL=ng2-material-dropdown.umd.js.map