{"ast":null,"code":"import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport cn from 'classnames';\nimport MapContainer from 'components/mapContainer/MapContainer';\nimport { useIsDesktop } from 'hooks/useIsDevice';\nimport { useState } from 'react';\nimport SliceIntro from 'slices/SliceIntro/SliceIntro';\nimport TabsSlice from 'slices/TabsSlice/TabsSlice';\nimport styles from './ApartmentsSlice.module.scss';\nimport ApartmentsList, { ApartmentItem } from './ApartmentsList';\n\nconst DesktopMapSlice = ({\n  accommodations,\n  house\n}) => {\n  // const [highlightCity, setHighlightCity] = useState('')\n  // const handleMouseEvent = (type, slug) => {\n  //    setHighlightCity(type == 'mouseover' ? slug : '')\n  // }\n  return /*#__PURE__*/_jsxs(\"div\", {\n    className: cn(styles.tabsContainer),\n    children: [/*#__PURE__*/_jsx(\"div\", {\n      className: cn(styles.listContainer),\n      children: /*#__PURE__*/_jsx(ApartmentsList, {\n        house: house,\n        accommodations: accommodations // handleMouseEvent={handleMouseEvent}\n\n      })\n    }), /*#__PURE__*/_jsx(\"div\", {\n      className: cn(styles.mapContainer),\n      children: \"TODO\"\n    })]\n  });\n};\n\nconst MobileMapSlice = ({\n  accommodations,\n  house\n}) => {\n  // const [highlightHouse, setHighlightHouse] = useState(null)\n  // const handleMouseEvent = (type, slug) => {\n  //    if(type == 'click') {\n  //       setHighlightHouse(highlightHouse == slug ? null : slug)\n  //    }\n  //    if(type == 'mapClick') {\n  //       setHighlightHouse(null)\n  //    }\n  // }\n  return /*#__PURE__*/_jsx(TabsSlice, {\n    tabs: [{\n      label: 'Les appartements',\n      key: 'list',\n      render: () => /*#__PURE__*/_jsx(\"div\", {\n        className: cn(styles.listContainer),\n        children: /*#__PURE__*/_jsx(ApartmentsList, {\n          house: house,\n          accommodations: accommodations\n        })\n      }, 'list')\n    }, {\n      label: 'Plans',\n      key: 'map',\n      render: () => /*#__PURE__*/_jsx(\"div\", {\n        className: cn(styles.mapContainer),\n        children: \"TODO\"\n      }, 'map')\n    }]\n  });\n};\n\nconst ApartmentsSlice = props => {\n  const {\n    id,\n    introText\n  } = props,\n        rest = _objectWithoutProperties(props, [\"id\", \"introText\"]);\n\n  const isDesktop = useIsDesktop();\n  return /*#__PURE__*/_jsxs(\"section\", {\n    id: id,\n    className: cn(styles.apartmentsSlice),\n    children: [isDesktop && /*#__PURE__*/_jsx(SliceIntro, {\n      text: introText,\n      left: true\n    }), isDesktop ? /*#__PURE__*/_jsx(DesktopMapSlice, _objectSpread({}, rest)) : /*#__PURE__*/_jsx(MobileMapSlice, _objectSpread({}, rest))]\n  });\n};\n\nexport default ApartmentsSlice;","map":null,"metadata":{},"sourceType":"module"}