import "./Home.scss";
import Header from "@/widgets/Header/Header";
import StatisticsSection from "@/widgets/StatisticsSection/StatisticsSection";
import MapSection from "@/widgets/MapSection/MapSection";
import RatingSection from "@/widgets/RatingSection/RatingSection";
import NewsSection from "@/widgets/NewsSection/NewsSection";

const Home = ({
  searchParams,
}: {
  searchParams: {
    "тип-дороги": string;
    "поиск-на-карте": string;
    "поиск-рейтинг": string;
  };
}) => {
  return (
    <div className="home">
      <Header />
      <StatisticsSection />
      <MapSection
        categories={searchParams["тип-дороги"]}
        queryMap={searchParams["поиск-на-карте"]}
        queryRating={searchParams["поиск-рейтинг"]}
      />
      <RatingSection
        categories={searchParams["тип-дороги"]}
        queryMap={searchParams["поиск-на-карте"]}
        queryRating={searchParams["поиск-рейтинг"]}
      />
      <NewsSection />
    </div>
  );
};

export default Home;
