{"ast":null,"code":"import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Fragment as _Fragment } from \"react/jsx-runtime\";\nimport cn from 'classnames';\nimport CustomBlockContent from 'components/gui/CustomBlockContent';\nimport Slideshow, { SlideshowContained } from 'components/slideshow/Slideshow';\nimport { useIsDesktop } from 'hooks/useIsDevice';\nimport HTMLReactParser from 'html-react-parser';\nimport SliceIntro from 'slices/SliceIntro/SliceIntro';\nimport styles from './NeighborhoodSlice.module.scss';\nimport { imageBuilder } from '../../lib/sanity';\nimport SlideshowInline from 'components/slideshowInline/SlideshowInline'; // Mobile\n\nvar NeighborhoodSlideshow = function NeighborhoodSlideshow(_ref) {\n  var house = _ref.house;\n  var area = house.area,\n      areaText = house.areaText,\n      location = house.location,\n      areaImages = house.areaImages;\n  return /*#__PURE__*/_jsxs(_Fragment, {\n    children: [areaText && /*#__PURE__*/_jsx(\"div\", {\n      className: cn(styles.description),\n      children: /*#__PURE__*/_jsx(CustomBlockContent, {\n        className: cn('p--m'),\n        blocks: areaText\n      })\n    }), /*#__PURE__*/_jsx(SlideshowInline, {\n      pagination: true,\n      items: areaImages && areaImages.map(function (image) {\n        return imageBuilder.image(image).height(800).width(1000).url();\n      }),\n      renderItem: function renderItem(item, itemStyle, i) {\n        return /*#__PURE__*/_jsx(\"div\", {\n          className: cn(styles.slideshowItem, itemStyle),\n          children: /*#__PURE__*/_jsx(\"img\", {\n            src: item\n          })\n        });\n      }\n    })]\n  });\n}; // Desktop\n\n\nvar NeighborhoodGrid = function NeighborhoodGrid(_ref2) {\n  var house = _ref2.house;\n  var area = house.area,\n      areaText = house.areaText,\n      location = house.location,\n      areaImages = house.areaImages;\n  console.log('NeighborhoodSlice.js::24 areaImages', areaImages);\n  return /*#__PURE__*/_jsxs(\"div\", {\n    className: cn(styles.gridContainer),\n    children: [/*#__PURE__*/_jsx(\"div\", {\n      className: cn(styles.gridPart, styles.gridMapContainer),\n      children: areaImages && /*#__PURE__*/_jsx(Slideshow, {\n        fullScreen: false,\n        withArrows: true,\n        arrowsColor: \"black\",\n        pagination: true,\n        images: areaImages.map(function (image) {\n          return imageBuilder.image(image).height(800).width(1000).url();\n        })\n      })\n    }), /*#__PURE__*/_jsxs(\"div\", {\n      className: cn(styles.gridPart, styles.gridDescription),\n      children: [area && /*#__PURE__*/_jsx(\"h3\", {\n        className: cn('h--3'),\n        children: HTMLReactParser(area.replace('\\n', '<br/>'))\n      }), /*#__PURE__*/_jsxs(\"div\", {\n        className: cn(styles.gridColumns),\n        children: [areaText && /*#__PURE__*/_jsx(CustomBlockContent, {\n          className: cn('p--m'),\n          blocks: areaText\n        }), location && /*#__PURE__*/_jsx(\"p\", {\n          className: cn('p--m'),\n          children: HTMLReactParser(location.replace('\\n', '<br/>'))\n        })]\n      })]\n    })]\n  });\n}; //\n\n\nvar NeighborhoodSlice = function NeighborhoodSlice(_ref3) {\n  var house = _ref3.house,\n      introText = _ref3.introText;\n  var isDesktop = useIsDesktop();\n  return /*#__PURE__*/_jsxs(\"section\", {\n    className: cn(styles.neighborhoodSlice),\n    children: [/*#__PURE__*/_jsx(SliceIntro, {\n      text: introText\n    }), isDesktop ? /*#__PURE__*/_jsx(NeighborhoodGrid, {\n      house: house\n    }) : /*#__PURE__*/_jsx(NeighborhoodSlideshow, {\n      house: house\n    })]\n  });\n};\n\nexport default NeighborhoodSlice;","map":null,"metadata":{},"sourceType":"module"}