{"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 { Arrow, ArrowDownButton } from 'components/gui/Arrow';\nimport BoxButton from 'components/gui/BoxButton';\nimport Button from 'components/gui/Button';\nimport VideoLoop from 'components/VideoLoop/VideoLoop';\nimport { useIsDesktop } from 'hooks/useIsDevice';\nimport HTMLReactParser from 'html-react-parser';\nimport MapSlice from 'slices/MapSlice/MapSlice';\nimport NewsListSlice from 'slices/NewsListSlice/NewsListSlice';\nimport SliceIntro from 'slices/SliceIntro/SliceIntro';\nimport TextImageSlice from 'slices/TextSlideshowSlice/TextImageSlice';\nimport styles from './Home.module.scss';\n\nvar Home = function Home(_ref) {\n  var lang = _ref.lang,\n      introTitle = _ref.introTitle,\n      introButton = _ref.introButton,\n      videos = _ref.videos,\n      slices = _ref.slices,\n      cities = _ref.cities,\n      mapIntro = _ref.mapIntro,\n      listTab = _ref.listTab,\n      mapTab = _ref.mapTab,\n      searchPlaceholderShort = _ref.searchPlaceholderShort,\n      searchPlaceholderLong = _ref.searchPlaceholderLong,\n      loadMoreCities = _ref.loadMoreCities,\n      newsIntro = _ref.newsIntro;\n  var news = [{\n    _id: 'a',\n    title: \"Un appartement se libe\\u0300re dans l\\u2019habitation VERNE \\xE0 Nantes.\"\n  }, {\n    _id: 'b',\n    title: 'Explorez votre nouvelle ville entre habitants en toute simplicité ce week-end !'\n  }, {\n    _id: 'c',\n    title: 'Le potager partagé de Cinq prend forme à Bordeaux.'\n  }, {\n    _id: 'd',\n    title: 'Cinq ouvre très prochainement à Bordeaux ! 11 logements sont disponibles.'\n  }, {\n    _id: 'aa',\n    title: \"Un appartement se libe\\u0300re dans l\\u2019habitation VERNE \\xE0 Nantes.\"\n  }, {\n    _id: 'bb',\n    title: 'Explorez votre nouvelle ville entre habitants en toute simplicité ce week-end !'\n  }, {\n    _id: 'cc',\n    title: 'Le potager partagé de Cinq prend forme à Bordeaux.'\n  }, {\n    _id: 'dd',\n    title: 'Cinq ouvre très prochainement à Bordeaux ! 11 logements sont disponibles.'\n  }];\n  var isDesktop = useIsDesktop();\n  var mapIntroStr = isDesktop ? mapIntro : mapIntro ? mapIntro.replace(':', '').trim() : '';\n  var newsIntroStr = isDesktop ? newsIntro : newsIntro ? newsIntro.replace(':', '').trim() : '';\n  var searchPlaceholder = isDesktop ? searchPlaceholderLong : searchPlaceholderShort;\n  var introAnchor = 'intro'; //lang == 'fr' ? 'intro' : 'intro'\n\n  var mapAnchor = lang == 'fr' ? 'nos-villes' : 'our-cities';\n  return /*#__PURE__*/_jsxs(_Fragment, {\n    children: [/*#__PURE__*/_jsxs(\"section\", {\n      className: cn(styles.firstSlice),\n      style: {//backgroundImage: backgroundImageURL ? `url(${backgroundImageURL})` : undefined,\n      },\n      children: [/*#__PURE__*/_jsx(VideoLoop, {\n        videos: videos\n      }), /*#__PURE__*/_jsxs(\"div\", {\n        className: styles.firstSliceContent,\n        children: [/*#__PURE__*/_jsx(\"h1\", {\n          className: cn('h--1'),\n          children: HTMLReactParser(introTitle ? introTitle.split('\\n').join('<br/>') : '')\n        }), /*#__PURE__*/_jsx(BoxButton, {\n          className: cn(styles.button),\n          label: introButton,\n          href: '#' + mapAnchor,\n          white: true,\n          fullWidth: !isDesktop,\n          icon: \"right\"\n        })]\n      }), /*#__PURE__*/_jsx(ArrowDownButton, {\n        htmlText: 'Découvrir <strong>compose</strong>',\n        className: cn(styles.arrowDownCont),\n        href: '#' + introAnchor,\n        color: 'white'\n      })]\n    }), slices && /*#__PURE__*/_jsx(TextImageSlice, {\n      slides: slices,\n      id: introAnchor\n    }), /*#__PURE__*/_jsx(MapSlice, {\n      introText: mapIntroStr,\n      cities: cities,\n      searchPlaceholder: searchPlaceholder,\n      loadMoreCities: loadMoreCities,\n      listTab: listTab,\n      mapTab: mapTab,\n      id: mapAnchor\n    }), /*#__PURE__*/_jsx(NewsListSlice, {\n      introText: newsIntroStr,\n      news: news\n    }), isDesktop && /*#__PURE__*/_jsx(SliceIntro, {\n      mobileColor: \"blue\"\n    })]\n  });\n};\n\nexport var __N_SSG = true;\nexport default Home;","map":null,"metadata":{},"sourceType":"module"}