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,iEAAeC,cAAc","sources":["webpack:///./Scripts/Components/LightboxImages.js"],"sourcesContent":["import React, { Fragment, useCallback } from 'react';\nimport Modal from 'react-modal';\nimport 'react-responsive-carousel/lib/styles/carousel.min.css';\nimport { Carousel as Lightbox } from 'react-responsive-carousel';\nimport { useSelector, useDispatch } from 'react-redux';\nimport { show, setCurrentIndex } from '../Actions/LightboxImages.action';\n\nconst customStyles = {\n content: {\n background: 'none',\n padding: 0,\n border: 'none',\n },\n overlay: {\n background: 'rgba(0, 0, 0, 0.8)',\n zIndex: 2003,\n },\n};\nconst LightboxSettings = {\n showStatus: false,\n showIndicators: false,\n useKeyboardArrows: true,\n thumbWidth: 50,\n autoPlay: false,\n autoFocus: true,\n};\n\nconst renderThumbnails = (children) => {\n const images = children.map((item, index) => {\n if (!item || !item.props || !item.props.children) {\n return undefined;\n }\n\n // find img to get source\n const imageElement = item.props.children.find(\n (ele) => ele.type === 'img'\n );\n if (!imageElement || !imageElement.props || !imageElement.props.src) {\n return undefined;\n }\n\n return (\n
\n );\n });\n\n return images;\n};\n\nconst LightboxImages = (props) => {\n const dispatch = useDispatch();\n const { visible, index } = useSelector((state) => state.lightboxImages);\n const onClose = useCallback(() => dispatch(show(false)), [dispatch]);\n const onClickThumbnail = (index) => {\n dispatch(show(true));\n dispatch(setCurrentIndex(index));\n };\n\n return !props.images || props.images.length < 1 ? (\n