import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
import { useState } from "react";

import Loader from "./components/Loader";
import Header from "./components/Header";
import FooterSection from "./components/FooterSection";

// Страницы/секции
import ScreenFirst from "./components/ScreenFirst";
import ScreenSecond from "./components/ScreenSecond";
import ScreenThree from "./components/ScreenThree";
import KeyBusinessSegments from "./components/KeyBusinessSegments";
import WhyChooseUs from "./components/WhyChooseUs";
import InnovationSection from "./components/InnovationSection";
import SolutionsSection from "./components/SolutionsSection";
import CountriesSection from "./components/CountriesSection";
import LeadershipSection from "./components/LeadershipSection";
import NewsSection from "./components/NewsSection";
import ContactFormSection from "./components/ContactFormSection";
import Privacy from "./components/Privacy";



function HomePage() {
  return (
    <>
      <Header />
      <ScreenFirst />
      <ScreenSecond />
      <ScreenThree />
      <KeyBusinessSegments />
      <WhyChooseUs />
      <InnovationSection />
      <SolutionsSection />
      <CountriesSection />
      <ContactFormSection />
      <FooterSection />
    </>
  );
}

function PrivacyPage() {
  return (
    <>
      <Header />
      <Privacy/>
      <FooterSection />
    </>
  );
}

function App() {
  const [loading, setLoading] = useState(false);

  if (loading) return <Loader />;

  return (
    <Router>
      <Routes>
        <Route path="/" element={<HomePage />} />
        <Route path="/privacy" element={<PrivacyPage />} />
      </Routes>
    </Router>
  );
}

export default App;
