{"version":3,"file":"FrontLayout-bnCSpjEK.js","sources":["../../../resources/js/Layouts/Partials/Footer.tsx","../../../resources/js/Layouts/Partials/Header.tsx","../../../resources/js/Layouts/FrontLayout.tsx"],"sourcesContent":["import { InertiaPage } from \"@/types/inertia\";\nimport { Icon } from \"@iconify/react/dist/iconify.js\";\nimport { Link, usePage } from \"@inertiajs/react\";\n\nconst Footer = () => {\n return (\n <>\n \n

Wyślij zapytanie

\n
\n
\n \n \n )\n}\n\nexport default Footer;","import useIsServer from \"@/Hooks/useIsServer\";\nimport { Transition } from \"@headlessui/react\";\nimport { Icon } from \"@iconify/react/dist/iconify.js\";\nimport { Link, router } from \"@inertiajs/react\";\nimport { Fragment, useEffect, useRef, useState } from \"react\";\n\nconst Header = () => {\n const isServer = useIsServer();\n const [logoSize, setLogoSize] = useState(250);\n const [hideTopBar, setHideTopBar] = useState(false);\n const [showMobileMenu, setShowMobileMenu] = useState(false);\n const [showAdditionalMenu, setShowAdditionalMenu] = useState(false);\n const [showCompanyMobileMenu, setShowCompanyMobileMenu] = useState(false);\n const investmentRef = useRef(null);\n const locationRef = useRef(null);\n const investorRef = useRef(null);\n\n useEffect(() => {\n const throttle = void>(func: T, limit: number) => {\n let inThrottle: boolean;\n return function (this: any, ...args: Parameters) {\n const context = this;\n if (!inThrottle) {\n func.apply(context, args);\n inThrottle = true;\n setTimeout(() => (inThrottle = false), limit);\n }\n };\n };\n\n const handleScrollThrottled = throttle(() => {\n const scrollY = window.scrollY;\n const threshold = 300;\n\n if (scrollY > threshold) {\n if (logoSize !== 160) {\n setLogoSize(160);\n setHideTopBar(true);\n }\n } else {\n if (logoSize !== 250) {\n setLogoSize(250);\n setHideTopBar(false);\n }\n }\n }, 30);\n\n if (!isServer) {\n window.addEventListener('scroll', handleScrollThrottled);\n }\n\n return () => {\n if (!isServer) {\n window.removeEventListener('scroll', handleScrollThrottled);\n }\n };\n }, [logoSize, isServer]);\n\n const handleHrefLink = (location: string) => {\n if (!isServer) {\n investmentRef.current?.classList.remove('active-menu-item');\n locationRef.current?.classList.remove('active-menu-item');\n investorRef.current?.classList.remove('active-menu-item');\n\n\n switch (location) {\n case 'o-inwestycji':\n investmentRef.current?.classList.add('active-menu-item')\n break;\n case 'lokalizacja':\n locationRef.current?.classList.add('active-menu-item')\n break;\n case 'inwestor':\n investorRef.current?.classList.add('active-menu-item')\n break;\n }\n\n const scrollTo = document.getElementById(location);\n setShowMobileMenu(false)\n\n if (scrollTo) {\n scrollTo.scrollIntoView({\n behavior: 'smooth',\n block: 'start'\n })\n }\n\n history.pushState(null, '', `#${location}`);\n }\n }\n\n const resolveActiveHashLink = (expectedItem: string): string => {\n if (!isServer) {\n if (window.location.hash == expectedItem && expectedItem !== '#kontakt') {\n return 'active-menu-item'\n } else {\n return '';\n }\n }\n\n return ''\n }\n\n return (\n
\n \n
\n
\n
setShowAdditionalMenu(true)} onMouseLeave={() => setShowAdditionalMenu(false)}>\n
\n \n O firmie\n
\n \n
\n \n
\n \n
\n \n \n Relacje inwestorskie\n \n \n \n Odpowiedzialne budowanie\n \n \n \n \n \n \n \n
\n
\n
\n
\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n \n
\n \n \n \n Relacje inwestorskie\n \n \n \n Odpowiedzialne budowanie\n \n \n
\n \n
\n \n
\n \n
\n
\n \n
\n \n \"Logo\n \n
\n
\n \n \"Logo\n \n \n \n \"Logo\n \n
\n \n \n \n \n
\n )\n}\n\nexport default Header;","import { ReactNode, useEffect, useMemo, useState } from \"react\"\nimport Footer from \"./Partials/Footer\"\nimport Header from \"./Partials/Header\"\nimport { Head, router } from \"@inertiajs/react\"\nimport useIsServer from \"@/Hooks/useIsServer\";\n\nconst FrontLayout = ({ children }: { children: ReactNode }) => {\n const [transitioning, setTransitioning] = useState(false)\n const isServer = useIsServer();\n\n useEffect(() => {\n if (!isServer) {\n router.on('start', () => setTransitioning(true))\n router.on('finish', () => setTransitioning(false))\n }\n }, [])\n\n\n return (\n <>\n
\n
\n {children}\n
\n