'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var normalizeComponent = require('./normalize-component-6fa50395.js');
var ThemeMixin = require('./ThemeMixin-a2f817cd.js');
require('./svg-atom-d2541b7d.js');
var iconButtonMolecule = require('./icon-button-molecule-33dc643e.js');

//
var script = {
  name: 'VAccordionItem',
  props: {
    hideIcon: {
      type: Boolean,
      default: false
    }
  },
  data: function data() {
    return {
      isOpened: false
    };
  },
  computed: {
    icon: function icon() {
      return this.isOpened ? 'chevron-up' : 'chevron-down';
    }
  },
  methods: {
    onClick: function onClick() {
      this.isOpened = !this.isOpened;
      this.$emit('click');
    },
    open: function open() {
      this.isOpened = true;
    },
    close: function close() {
      this.isOpened = false;
    }
  },
  mixins: [ThemeMixin.ThemeMixin],
  components: {
    IconButtonAtom: iconButtonMolecule.IconButtonAtom
  }
};

/* script */
const __vue_script__ = script;

/* template */
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"v-accordion-item",class:_vm.themeCssClass,attrs:{"tabindex":0,"data-opened":_vm.isOpened}},[_c('div',{staticClass:"v-accordion-header",on:{"click":_vm.onClick}},[_c('div',{staticClass:"v-accordion-title"},[_vm._t("title")],2),_vm._v(" "),(!_vm.hideIcon)?_c('icon-button-atom',{staticClass:"v-accordion-item-icon",attrs:{"icon":_vm.icon,"width":"20","tabindex":"-1"}}):_vm._e()],1),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isOpened),expression:"isOpened"}],staticClass:"v-accordion-content"},[_vm._t("default",null,{"open":_vm.open,"close":_vm.close})],2)])};
var __vue_staticRenderFns__ = [];

  /* style */
  const __vue_inject_styles__ = undefined;
  /* scoped */
  const __vue_scope_id__ = undefined;
  /* module identifier */
  const __vue_module_identifier__ = undefined;
  /* functional template */
  const __vue_is_functional_template__ = false;
  /* style inject */
  
  /* style inject SSR */
  

  
  var VAccordionItem = normalizeComponent.__vue_normalize__(
    { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
    __vue_inject_styles__,
    __vue_script__,
    __vue_scope_id__,
    __vue_is_functional_template__,
    __vue_module_identifier__,
    undefined,
    undefined
  );

exports.default = VAccordionItem;
