import React, { useState } from 'react';
import { Navbar } from './components/Navbar';
import { Hero } from './components/Hero';
import { Features } from './components/Features';
import { AquaZone } from './components/AquaZone';
import { Apartments } from './components/Apartments';
import { Infrastructure } from './components/Infrastructure';
import { Gallery } from './components/Gallery';
import { HtmlBuilder } from './components/HtmlBuilder';
import { ContactSection } from './components/ContactSection';
import { Footer } from './components/Footer';
import { ContactModal } from './components/ContactModal';
export const App: React.FC = () => {
const [activeTab, setActiveTab] = useState<'site' | 'builder'>('site');
const [contactModalOpen, setContactModalOpen] = useState(false);
const [modalInitialMsg, setModalInitialMsg] = useState('');
const handleOpenModal = (msg?: string) => {
if (msg) setModalInitialMsg(msg);
else setModalInitialMsg('');
setContactModalOpen(true);
};
const handleExplore = () => {
const el = document.getElementById('apartments');
el?.scrollIntoView({ behavior: 'smooth' });
};
return (
{/* Top sticky navigation */}
handleOpenModal()}
/>
{/* Main content area */}
{activeTab === 'site' ? (
handleOpenModal('Запись на просмотр (Первый экран)')}
/> handleOpenModal(title)}
/>
) : (
)}
{/* Footer */}
{/* Quick popup contact window */}
setContactModalOpen(false)}
initialMessage={modalInitialMsg}
/>
);
};
export default App;