text: var __extends = (this && this.__extends) || (function () {
      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);
      };
      return function (d, b) {
          extendStatics(d, b);
          function __() { this.constructor = d; }
          d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
  })();
  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 Vue from 'vue';
  import Component from 'vue-class-component';
  import { Prop, Watch } from 'vue-property-decorator';
  import MAccordionPlugin, { MAccordionSkin } from '../accordion/accordion';
  import { ACCORDION_GROUP_NAME } from '../component-names';
  import I18nPlugin from '../i18n/i18n';
  import LinkPlugin from '../link/link';
  import WithRender from './accordion-group.html?style=./accordion-group.scss';
  var MAccordionGroup = /** @class */ (function (_super) {
      __extends(MAccordionGroup, _super);
      function MAccordionGroup() {
          var _this = _super !== null && _super.apply(this, arguments) || this;
          _this.accordions = {};
          return _this;
      }
      MAccordionGroup.prototype.addAccordion = function (accordion) {
          accordion.$on('update:open', this.emitValueChange);
          this.$set(this.accordions, accordion.propId, accordion);
          if (this.openedIds && this.openedIds.find(function (v) { return v === accordion.propId; })) {
              accordion.propOpen = true;
          }
      };
      MAccordionGroup.prototype.removeAccordion = function (id) {
          this.accordions[id].$off('update:open', this.emitValueChange);
          this.$set(this.accordions, id, undefined);
      };
      MAccordionGroup.prototype.closeAllAccordions = function () {
          for (var id in this.accordions) {
              this.accordions[id].propOpen = false;
          }
      };
      Object.defineProperty(MAccordionGroup.prototype, "propAllOpen", {
          get: function () {
              var allOpened = true;
              for (var id in this.accordions) {
                  allOpened = this.accordions[id].propOpen;
                  if (!allOpened && !this.accordions[id].propDisabled) {
                      break;
                  }
              }
              return allOpened;
          },
          enumerable: true,
          configurable: true
      });
      Object.defineProperty(MAccordionGroup.prototype, "propAllClosed", {
          get: function () {
              var allClosed = true;
              for (var id in this.accordions) {
                  allClosed = !this.accordions[id].propOpen;
                  if (!allClosed && !this.accordions[id].propDisabled) {
                      break;
                  }
              }
              return allClosed;
          },
          enumerable: true,
          configurable: true
      });
      Object.defineProperty(MAccordionGroup.prototype, "propSkin", {
          get: function () {
              return this.skin === MAccordionSkin.Light || this.skin === MAccordionSkin.Plain || this.skin === MAccordionSkin.Default ? this.skin : MAccordionSkin.Default;
          },
          enumerable: true,
          configurable: true
      });
      Object.defineProperty(MAccordionGroup.prototype, "hasTitleSlot", {
          get: function () {
              return !!this.$slots['title'];
          },
          enumerable: true,
          configurable: true
      });
      MAccordionGroup.prototype.openAllAccordions = function () {
          for (var id in this.accordions) {
              this.accordions[id].propOpen = true;
          }
      };
      MAccordionGroup.prototype.emitValueChange = function () {
          var _this = this;
          var openedIds = Object.keys(this.accordions).filter(function (id) { return _this.accordions[id].propOpen; });
          this.$emit('update:openedIds', openedIds);
      };
      MAccordionGroup.prototype.applyValuePropChange = function (val) {
          var _loop_1 = function (id) {
              this_1.accordions[id].propOpen =
                  val.find(function (openedId) { return openedId === id; }) !== undefined;
          };
          var this_1 = this;
          for (var id in this.accordions) {
              _loop_1(id);
          }
      };
      __decorate([
          Prop({
              default: MAccordionSkin.Default,
              validator: function (value) {
                  return value === MAccordionSkin.Default ||
                      value === MAccordionSkin.Light ||
                      value === MAccordionSkin.Plain;
              }
          })
      ], MAccordionGroup.prototype, "skin", void 0);
      __decorate([
          Prop({
              default: false
          })
      ], MAccordionGroup.prototype, "concurrent", void 0);
      __decorate([
          Prop({
              default: false
          })
      ], MAccordionGroup.prototype, "disabled", void 0);
      __decorate([
          Prop()
      ], MAccordionGroup.prototype, "openedIds", void 0);
      __decorate([
          Watch('openedIds')
      ], MAccordionGroup.prototype, "applyValuePropChange", null);
      MAccordionGroup = __decorate([
          WithRender,
          Component
      ], MAccordionGroup);
      return MAccordionGroup;
  }(Vue));
  export { MAccordionGroup };
  var AccordionGroupPlugin = {
      install: function (v) {
          v.use(LinkPlugin);
          v.use(I18nPlugin);
          v.use(MAccordionPlugin);
          v.component(ACCORDION_GROUP_NAME, MAccordionGroup);
      }
  };
  export default AccordionGroupPlugin;
  //# sourceMappingURL=accordion-group.js.map