{"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\nconst NeighborhoodSlideshow = ({\n  house\n}) => {\n  const {\n    area,\n    areaText,\n    location,\n    areaImages\n  } = house;\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(image => imageBuilder.image(image).height(800).width(1000).url()),\n      renderItem: (item, itemStyle, i) => /*#__PURE__*/_jsx(\"div\", {\n        className: cn(styles.slideshowItem, itemStyle),\n        children: /*#__PURE__*/_jsx(\"img\", {\n          src: item\n        })\n      })\n    })]\n  });\n}; // Desktop\n\n\nconst NeighborhoodGrid = ({\n  house\n}) => {\n  const {\n    area,\n    areaText,\n    location,\n    areaImages\n  } = house;\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(image => imageBuilder.image(image).height(800).width(1000).url())\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\nconst NeighborhoodSlice = ({\n  house,\n  introText\n}) => {\n  const 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"}