'use client'; import { useRef } from 'react'; import { motion, useInView } from 'framer-motion'; import { Phone, Mail, Clock, MapPin, Building, MessagesSquare, FileText, } from 'lucide-react'; const cityContacts = { Москва: { address: 'г. Москва, ул. Космонавта Волкова, д. 29к1', phone: '+7 (916) 830-58-58', email: 'ckeproekt@yandex.ru', workHours: 'ПН-ПТ: 8:00 - 20:00', mapLink: 'https://yandex.ru/maps/-/CCUzYXu7xC', coordinates: [37.539042, 55.74733], }, Чебоксары: { address: 'г. Чебоксары, пр. Тракторостроителей, д. 11', phone: '+7 (916) 830-58-58', email: 'ckeproekt@yandex.ru', workHours: 'ПН-ПТ: 8:00 - 20:00', mapLink: 'https://yandex.ru/maps/-/CCUzYXBpkD', coordinates: [47.290091, 56.107257], }, } as const; const features = [ { icon: MessagesSquare, title: 'Оперативная связь', description: 'Быстро отвечаем на звонки и сообщения в рабочее время', }, { icon: FileText, title: 'Документы онлайн', description: 'Возможность получить документы в электронном виде', }, { icon: Building, title: 'Удобное расположение', description: 'Офис в центре города с удобной транспортной доступностью', }, ]; interface ContactsProps { selectedCity: keyof typeof cityContacts; } const Contacts = ({ selectedCity }: ContactsProps) => { const cityData = cityContacts[selectedCity]; const ref = useRef(null); const isInView = useInView(ref, { once: true, margin: '-100px' }); const containerVariants = { hidden: { opacity: 0 }, visible: { opacity: 1, transition: { staggerChildren: 0.2, delayChildren: 0.3, }, }, }; const itemVariants = { hidden: { y: 20, opacity: 0 }, visible: { y: 0, opacity: 1, transition: { duration: 0.5, ease: [0.16, 1, 0.3, 1], }, }, }; const mapVariants = { hidden: { scale: 0.8, opacity: 0 }, visible: { scale: 1, opacity: 1, transition: { duration: 0.8, ease: [0.16, 1, 0.3, 1], }, }, }; return (

Контакты

Выберите удобный способ связи или посетите наш офис

Адрес

{cityData.address}

Открыть на карте

Телефон

{cityData.phone}

Email

{cityData.email}

Время работы

{cityData.workHours}

Сб-Вс: 8:00 - 18:00

{features.map((feature, index) => (

{feature.title}

{feature.description}

))}