this.primevue = this.primevue || {};
this.primevue.panel = (function (MinusIcon, PlusIcon, Ripple, utils, BaseComponent, PanelStyle, vue) {
    'use strict';

    function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

    var MinusIcon__default = /*#__PURE__*/_interopDefaultLegacy(MinusIcon);
    var PlusIcon__default = /*#__PURE__*/_interopDefaultLegacy(PlusIcon);
    var Ripple__default = /*#__PURE__*/_interopDefaultLegacy(Ripple);
    var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
    var PanelStyle__default = /*#__PURE__*/_interopDefaultLegacy(PanelStyle);

    var script$1 = {
      name: 'BasePanel',
      "extends": BaseComponent__default["default"],
      props: {
        header: String,
        toggleable: Boolean,
        collapsed: Boolean,
        size: {
          type: String,
          "default": null
        },
        toggleButtonProps: {
          type: null,
          "default": null
        }
      },
      style: PanelStyle__default["default"],
      provide: function provide() {
        return {
          $parentInstance: this
        };
      }
    };

    var script = {
      name: 'Panel',
      "extends": script$1,
      inheritAttrs: false,
      emits: ['update:collapsed', 'toggle'],
      data: function data() {
        return {
          id: this.$attrs.id,
          d_collapsed: this.collapsed
        };
      },
      watch: {
        '$attrs.id': function $attrsId(newValue) {
          this.id = newValue || utils.UniqueComponentId();
        },
        collapsed: function collapsed(newValue) {
          this.d_collapsed = newValue;
        }
      },
      mounted: function mounted() {
        this.id = this.id || utils.UniqueComponentId();
      },
      methods: {
        toggle: function toggle(event) {
          this.d_collapsed = !this.d_collapsed;
          this.$emit('update:collapsed', this.d_collapsed);
          this.$emit('toggle', {
            originalEvent: event,
            value: this.d_collapsed
          });
        },
        onKeyDown: function onKeyDown(event) {
          if (event.code === 'Enter' || event.code === 'NumpadEnter' || event.code === 'Space') {
            this.toggle(event);
            event.preventDefault();
          }
        }
      },
      computed: {
        buttonAriaLabel: function buttonAriaLabel() {
          return this.toggleButtonProps && this.toggleButtonProps.ariaLabel ? this.toggleButtonProps.ariaLabel : this.header;
        }
      },
      components: {
        PlusIcon: PlusIcon__default["default"],
        MinusIcon: MinusIcon__default["default"]
      },
      directives: {
        ripple: Ripple__default["default"]
      }
    };

    function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
    function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
    function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
    function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
    function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
    function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
    var _hoisted_1 = ["id"];
    var _hoisted_2 = ["id", "aria-label", "aria-controls", "aria-expanded"];
    var _hoisted_3 = ["id", "aria-labelledby"];
    function render(_ctx, _cache, $props, $setup, $data, $options) {
      var _directive_ripple = vue.resolveDirective("ripple");
      return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
        "class": _ctx.cx('root')
      }, _ctx.ptmi('root')), [vue.createElementVNode("div", vue.mergeProps({
        "class": _ctx.cx('header')
      }, _ctx.ptm('header')), [vue.renderSlot(_ctx.$slots, "header", {
        id: $data.id + '_header',
        "class": vue.normalizeClass(_ctx.cx('title'))
      }, function () {
        return [_ctx.header ? (vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({
          key: 0,
          id: $data.id + '_header',
          "class": _ctx.cx('title')
        }, _ctx.ptm('title')), vue.toDisplayString(_ctx.header), 17, _hoisted_1)) : vue.createCommentVNode("", true)];
      }), vue.createElementVNode("div", vue.mergeProps({
        "class": _ctx.cx('icons')
      }, _ctx.ptm('icons')), [vue.renderSlot(_ctx.$slots, "icons"), _ctx.toggleable ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", vue.mergeProps({
        key: 0,
        id: $data.id + '_header',
        type: "button",
        role: "button",
        "class": _ctx.cx('toggler'),
        "aria-label": $options.buttonAriaLabel,
        "aria-controls": $data.id + '_content',
        "aria-expanded": !$data.d_collapsed,
        onClick: _cache[0] || (_cache[0] = function () {
          return $options.toggle && $options.toggle.apply($options, arguments);
        }),
        onKeydown: _cache[1] || (_cache[1] = function () {
          return $options.onKeyDown && $options.onKeyDown.apply($options, arguments);
        })
      }, _objectSpread(_objectSpread({}, _ctx.toggleButtonProps), _ctx.ptm('toggler'))), [vue.renderSlot(_ctx.$slots, "togglericon", {
        collapsed: $data.d_collapsed
      }, function () {
        return [(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($data.d_collapsed ? 'PlusIcon' : 'MinusIcon'), vue.normalizeProps(vue.guardReactiveProps(_ctx.ptm('togglericon'))), null, 16))];
      })], 16, _hoisted_2)), [[_directive_ripple]]) : vue.createCommentVNode("", true)], 16)], 16), vue.createVNode(vue.Transition, vue.mergeProps({
        name: "p-toggleable-content"
      }, _ctx.ptm('transition')), {
        "default": vue.withCtx(function () {
          return [vue.withDirectives(vue.createElementVNode("div", vue.mergeProps({
            id: $data.id + '_content',
            "class": _ctx.cx('toggleablecontent'),
            role: "region",
            "aria-labelledby": $data.id + '_header'
          }, _ctx.ptm('toggleablecontent')), [vue.createElementVNode("div", vue.mergeProps({
            "class": _ctx.cx('content')
          }, _ctx.ptm('content')), [vue.renderSlot(_ctx.$slots, "default")], 16), _ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
            key: 0,
            "class": _ctx.cx('footer')
          }, _ctx.ptm('footer')), [vue.renderSlot(_ctx.$slots, "footer")], 16)) : vue.createCommentVNode("", true)], 16, _hoisted_3), [[vue.vShow, !$data.d_collapsed]])];
        }),
        _: 3
      }, 16)], 16);
    }

    script.render = render;

    return script;

})(primevue.icons.minus, primevue.icons.plus, primevue.ripple, primevue.utils, primevue.basecomponent, primevue.panel.style, Vue);
