{"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\nconst ExploreSquare = ({\n  label,\n  href,\n  color,\n  icon,\n  white\n}) => {\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\nconst colors = ['3B5CBC', 'AFB8A6', 'B8D6C0', 'BCC8CC']; //\n\nconst ExploreSlice = ({\n  introText,\n  house,\n  shareHouse,\n  cityLink,\n  cityURL,\n  citiesLink,\n  joinUs\n}) => {\n  const locale = useLocale();\n  const lang = useLang();\n  const isDesktop = useIsDesktop();\n  const 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: () => {\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"}