import React, {useState} from 'react'; import Link from "next/link"; import Image from "next/image"; import {useBronStore} from "@/store/useBronStore"; import styled from "styled-components"; type HeaderPageProps = { tg?: string; phone?: string; gis2?: string; } const Header = styled.header` margin: 0 auto; max-width: 1480px; height: 148px; display: flex; justify-content: space-between; align-items: center; position: relative; &::after{ content: ""; width: 100vw; height:100%; border-radius: 0 0 20px 20px; background-color: rgba(14,14,23,.7); backdrop-filter: blur(100%); position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: -1; } @media (max-width: 1500px) { height: 120px; padding: 0 40px; } @media (max-width: 480px) { height: 100px; } ` const HeaderSchedule = styled.div` display: flex; align-items: center; justify-content: center; gap: 14px; h3{ font-size: 48px; } p{ font-size: 20px; line-height: 1; } @media (max-width: 600px) { display: none; } ` const HeaderPhone = styled.div` display: flex; align-items: start; flex-direction: column; justify-content: start; margin-left: 33px; h4{ font-size: 18px; margin-top: 5px; cursor: pointer; font-weight: normal; } p{ font-size: 20px; line-height: 1; } ` const HeaderBlock = styled.div` display: flex; align-items: center; justify-content: center; .logo{ margin-right: 56px; } .gis2Link{ margin-right: 15px; } .tgLink{ margin: 0 12px 0 8px; } .vkLink{ margin: 0 6px 0 8px; } .maxLink{ margin: 0 8px 0 6px; } &.desktopOnly { @media (max-width: 900px) { display: none; } } .footerPhone{ h4{ text-align: center; font-size: 20px; } } @media (max-width: 1100px) { .headerImage img{ height: 40px; } .gis2Link{ margin-right: 2px; } .tgLink{ margin: 0 6px 0 -2px; } } @media (max-width: 900px) { width: 100%; justify-content:space-between; } @media (max-width: 1100px) { .headerImage img{ height: 40px; } .gis2Link{ margin-right: 2px; } .tgLink{ margin: 0 6px 0 -2px; } } @media (max-width: 480px) { .logo img{ width: 150px; } } ` const MenuButton = styled.button` display: none; background: none; border: none; cursor: pointer; @media (max-width: 900px) { display: flex; align-items: center; justify-content: center; } img { width: 40px; height: 40px; transition: transform 0.3s ease; } &:hover img { transform: scale(1.1); } ` const MobileMenu = styled.div<{ $isOpenMenu: boolean }>` position: fixed; top: 0; right: ${({ $isOpenMenu }) => ($isOpenMenu ? '0' : '-100%')}; width: 100%; height: 100vh; background: rgba(14, 14, 23, 0.95); backdrop-filter: blur(10px); z-index: 999; transition: right 0.3s ease-in-out; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; a { color: white; font-size: 28px; text-decoration: none; } button { position: absolute; top: 20px; right: 20px; background: none; border: none; } @media (min-width: 901px) { display: none; } `; const HeaderPage: React.FC = ({tg, gis2, phone}) => { const [isMenuOpen, setIsMenuOpen] = useState(false); const open = useBronStore((s) => s.open); return (
{'logo'}

24/7

Пиши нам
мы на связи

setIsMenuOpen(true)}> menu
{gis2 ? ( geo ) : ( geo )} {tg ? ( tg ) : ( tg )} vk max

{phone || '+7 775 260 85 59'}

open('zayvka-game')}>Заказать звонок

{gis2 && 2 ГИС} {tg && Telegram} VK Max {phone && {phone}}
); }; export default HeaderPage;