{"version":3,"sources":["webpack:///./Scripts/Components/LightBoxModal.js","webpack:///./Scripts/Containers/LightBoxModal.container.js"],"names":["LightBoxModal","props","state","classString","this","images","length","setState","image","index","className","key","onClick","onClickThumbnail","setVisibility","dangerouslySetInnerHTML","__html","imageHtml","showThumbnails","showImageCount","isOpen","isVisible","onClose","currentImage","activeIndex","Component","LightBoxModalContainer","connect","lightboxImages","visible","dispatch","show","onClickNext","next","onClickPrev","previous","setCurrentIndex"],"mappings":"0oBAuCeA,E,gCAnCX,WAAYC,GAAO,0BACf,cAAMA,IACDC,MAAQ,CACTC,YAAa,4DAHF,E,wDAOiB,IAA7BC,KAAKH,MAAMI,OAAOC,QACjBF,KAAKG,SAAS,CACVJ,YAAa,yD,+BAMhB,aACL,OACQ,kBAAC,WAAD,KACKC,KAAKH,MAAMI,QAAU,MAAAD,KAAKH,MAAMI,QAAX,QAAsB,SAACG,EAAOC,GAAR,OACxC,yBAAKC,UAAW,EAAKR,MAAMC,YAAaQ,IAAKF,EAAOG,QAAS,WAAO,EAAKX,MAAMY,iBAAiBJ,GAAO,EAAKR,MAAMa,cAAcL,KAC5H,uBAAGM,wBAAyB,CAAEC,OAAQR,EAAMS,iBAGpD,kBAAC,IAAD,KACIC,gBAAgB,EAChBC,gBAAgB,EAChBC,OAAQhB,KAAKH,MAAMoB,UACnBC,QAASlB,KAAKH,MAAMqB,QACpBC,aAAcnB,KAAKH,MAAMuB,aACrBpB,KAAKH,a,GA9BLwB,a,6XCEtBC,E,gCACF,WAAYzB,GAAO,0BACf,cAAMA,IACDC,MAAQ,CACTmB,WAAW,EACXG,YAAc,GAJH,E,kDAQLf,GACVL,KAAKG,SAAS,CACVc,WAAYjB,KAAKF,MAAMmB,UACvBG,YAAaf,M,gCAIjBL,KAAKG,SAAS,CACVc,WAAW,M,+BAGV,WACL,OAAO,kBAAC,EAAD,OAAmBjB,KAAKH,MAAxB,CAA+BmB,OAAQhB,KAAKF,MAAMmB,UAAWP,cAAe,SAACL,GAAD,OAAW,EAAKK,cAAcL,IAASa,QAAS,kBAAM,EAAKA,WAAWE,YAAapB,KAAKF,MAAMsB,mB,GArBpJC,aA0CtBE,uBAlBS,SAACzB,GACrB,MAAO,CACHkB,OAAQlB,EAAM0B,eAAeC,QAC7BN,aAAcrB,EAAM0B,eAAenB,UAIhB,SAAAqB,GACvB,MAAO,CACHR,QAAS,kBAAMQ,EAASC,aAAK,KAC7BC,YAAa,kBAAMF,EAASG,gBAC5BC,YAAa,kBAAMJ,EAASK,gBAC5BtB,iBAAkB,SAACJ,GACfqB,EAASM,YAAgB3B,QAKtBkB,CAA6CD","file":"13.07710928173a133a74b3.js","sourcesContent":["import React, { Fragment, Component, } from 'react';\r\nimport Lightbox from 'react-images';\r\n\r\nclass LightBoxModal extends Component {\r\n constructor(props) {\r\n super(props)\r\n this.state = {\r\n classString: \"columns small-12 medium-6 large-6 dual-block-image__item\"\r\n };\r\n }\r\n componentDidMount() {\r\n if(this.props.images.length === 1) {\r\n this.setState({\r\n classString: \"small-12 medium-12 large-12 dual-block-image__item\"\r\n });\r\n }\r\n }\r\n\r\n\r\n render() {\r\n return (\r\n \r\n {this.props.images && this.props.images.map((image, index) => \r\n {this.props.onClickThumbnail(index);this.props.setVisibility(index)} }>\r\n \r\n \r\n )}\r\n \r\n \r\n )\r\n }\r\n}\r\nexport default LightBoxModal\r\n","import React, { Component } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport LightBoxModal from '../Components/LightBoxModal';\r\nimport { setCurrentIndex, show, previous, next } from '../Actions/LightboxImages.action';\r\n\r\nclass LightBoxModalContainer extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n isVisible: false,\r\n activeIndex : 0\r\n };\r\n }\r\n\r\n setVisibility(index) {\r\n this.setState({\r\n isVisible: !this.state.isVisible,\r\n activeIndex: index,\r\n });\r\n }\r\n onClose() {\r\n this.setState({\r\n isVisible: false,\r\n });\r\n }\r\n render() {\r\n return this.setVisibility(index)} onClose={() => this.onClose()} activeIndex={this.state.activeIndex} />;\r\n }\r\n}\r\nconst mapStateToProps = (state) => {\r\n return {\r\n isOpen: state.lightboxImages.visible,\r\n currentImage: state.lightboxImages.index,\r\n }\r\n}\r\n\r\nconst mapDispatchToProps = dispatch => {\r\n return {\r\n onClose: () => dispatch(show(false)),\r\n onClickNext: () => dispatch(next()),\r\n onClickPrev: () => dispatch(previous()),\r\n onClickThumbnail: (index) => {\r\n dispatch(setCurrentIndex(index));\r\n },\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(LightBoxModalContainer);\r\n"],"sourceRoot":""}