{"ast":null,"code":"import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport { 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\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\nvar DesktopMapSlice = function DesktopMapSlice(_ref) {\n  var accommodations = _ref.accommodations,\n      house = _ref.house;\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\nvar MobileMapSlice = function MobileMapSlice(_ref2) {\n  var accommodations = _ref2.accommodations,\n      house = _ref2.house;\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: function render() {\n        return /*#__PURE__*/_jsx(\"div\", {\n          className: cn(styles.listContainer),\n          children: /*#__PURE__*/_jsx(ApartmentsList, {\n            house: house,\n            accommodations: accommodations\n          })\n        }, 'list');\n      }\n    }, {\n      label: 'Plans',\n      key: 'map',\n      render: function render() {\n        return /*#__PURE__*/_jsx(\"div\", {\n          className: cn(styles.mapContainer),\n          children: \"TODO\"\n        }, 'map');\n      }\n    }]\n  });\n};\n\nvar ApartmentsSlice = function ApartmentsSlice(props) {\n  var id = props.id,\n      introText = props.introText,\n      rest = _objectWithoutProperties(props, [\"id\", \"introText\"]);\n\n  var 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"}