/*! For license information please see dll.Accordion.js.LICENSE.txt */
(window.webpackJsonp_name_dll=window.webpackJsonp_name_dll||[]).push([[18],{1031:function(e,t,r){"use strict";r.r(t);var n=r(13),a=r.n(n),c=r(12),i=r.n(c),s=r(6),o=r.n(s),l=r(14),u=r.n(l),h=r(15),d=r.n(h),p=r(8),v=r.n(p),f=r(5),y=r.n(f),m=r(0),k=r.n(m),g=r(1),w=r.n(g),S=r(25),b=r.n(S),C=r(19),R=r.n(C),N=r(292),_=r(530);function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=v()(e);if(t){var a=v()(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return d()(this,r)}}var D=b()("isle:accordion"),F=function(e){u()(r,e);var t=A(r);function r(e){var n;return a()(this,r),n=t.call(this,e),y()(o()(n),"clickFactory",(function(e,t){return function(){var r=n.state.active===t?(t+1)%e:t;D("Open accordion element at index ".concat(r,"...")),n.setState({active:r})}})),n.state={active:e.active,prevActive:e.active},n}return i()(r,[{key:"render",value:function(){if(!R()(this.props.children))return k.a.createElement(N.default,{variant:"danger"},"The accordion requires at least two child elements for it to be rendered.");for(var e=[],t=this.props.headers||[],r=0;r<this.props.children.length;r++){var n=this.props.children[r],a=k.a.createElement(_.default,{key:r,visible:r===this.state.active,header:t[r]||"Header ".concat(r+1),headerClassName:this.props.headerClassName,headerStyle:this.props.headerStyle,onClick:this.clickFactory(this.props.children.length,r)},n);e.push(a)}return e}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.active!==t.prevActive?{active:e.active,prevActive:e.active}:null}}]),r}(m.Component);F.defaultProps={active:0,headers:null,headerClassName:null,headerStyle:null},F.propTypes={active:w.a.number,headers:w.a.arrayOf(w.a.string),headerStyle:w.a.object,headerClassName:w.a.string},t.default=F}}]);