{"ast":null,"code":"import { jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport cn from 'classnames';\nimport BoxButton from 'components/gui/BoxButton';\nimport Button from 'components/gui/Button';\nimport CircleButton from 'components/gui/CircleButton';\nimport useHrefFromSlugKey from 'contexts/useHrefFromSlug';\nimport useLang from 'contexts/useLang';\nimport useLocale from 'contexts/useLocale';\nimport globalData from 'global/globalData';\nimport { useIsDesktop } from 'hooks/useIsDevice';\nimport SliceIntro from 'slices/SliceIntro/SliceIntro';\nimport styles from './ExploreSlice.module.scss';\n\nvar ExploreSquare = function ExploreSquare(_ref) {\n  var label = _ref.label,\n      href = _ref.href,\n      color = _ref.color,\n      icon = _ref.icon,\n      white = _ref.white;\n  return /*#__PURE__*/_jsx(\"div\", {\n    className: cn(styles.gridPart),\n    style: color ? {\n      backgroundColor: '#' + color\n    } : {},\n    children: /*#__PURE__*/_jsx(BoxButton, {\n      className: cn(styles.button),\n      href: href,\n      label: label,\n      fullWidth: true,\n      icon: icon,\n      white: white\n    })\n  });\n};\n\nvar colors = ['3B5CBC', 'AFB8A6', 'B8D6C0', 'BCC8CC']; //\n\nvar ExploreSlice = function ExploreSlice(_ref2) {\n  var introText = _ref2.introText,\n      house = _ref2.house,\n      shareHouse = _ref2.shareHouse,\n      cityLink = _ref2.cityLink,\n      cityURL = _ref2.cityURL,\n      citiesLink = _ref2.citiesLink,\n      joinUs = _ref2.joinUs;\n  var locale = useLocale();\n  var lang = useLang();\n  var isDesktop = useIsDesktop();\n  var joinUsHref = useHrefFromSlugKey('identity');\n  return /*#__PURE__*/_jsxs(\"section\", {\n    className: cn(styles.exploreSlice),\n    children: [isDesktop && /*#__PURE__*/_jsx(SliceIntro, {\n      text: introText\n    }), /*#__PURE__*/_jsxs(\"div\", {\n      className: cn(styles.gridContainer),\n      children: [isDesktop ? /*#__PURE__*/_jsx(ExploreSquare, {\n        label: locale('share'),\n        color: isDesktop && colors[0],\n        white: true,\n        icon: 'share'\n      }) : /*#__PURE__*/_jsxs(Button, {\n        className: styles.shareButton,\n        onClick: function onClick() {\n          if (navigator && navigator.share) navigator.share({\n            title: document.title,\n            text: window.location.href,\n            url: window.location.href\n          });\n        },\n        children: [/*#__PURE__*/_jsx(CircleButton, {\n          icon: \"share\"\n        }), /*#__PURE__*/_jsx(\"span\", {\n          children: shareHouse.replace('{house}', house.title)\n        })]\n      }), /*#__PURE__*/_jsx(ExploreSquare, {\n        label: cityLink.replace('{city}', house.city.title),\n        href: cityURL,\n        color: isDesktop && colors[1],\n        white: true,\n        icon: 'right'\n      }), /*#__PURE__*/_jsx(ExploreSquare, {\n        label: citiesLink,\n        href: globalData.hrefs.ourCities[lang],\n        color: isDesktop && colors[2],\n        white: true,\n        icon: 'right'\n      }), /*#__PURE__*/_jsx(ExploreSquare, {\n        label: joinUs,\n        href: joinUsHref,\n        color: isDesktop && colors[3],\n        white: true,\n        icon: 'right'\n      })]\n    })]\n  });\n};\n\nexport default ExploreSlice;","map":null,"metadata":{},"sourceType":"module"}