import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import Providers from "./providers";
import { ScreenSizeProvider } from "../utils/providers/screenSizesContext";
import { ToastContainer, Slide } from "react-toastify";

const geistSans = Geist({
  variable: "--font-geist-sans",
  subsets: ["latin"],
});

const geistMono = Geist_Mono({
  variable: "--font-geist-mono",
  subsets: ["latin"],
});

export const metadata: Metadata = {
  title: "Happy homes",
  description: "Perfect matching website",
};


export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="en">
      <body
        className={`antialiased max-w-[1550px] m-auto overflow-x-hidden font-inter`}
      >
        <Providers>
          <ScreenSizeProvider mobileBreakpoint={767} tabletBreakpoint={1024}>
            {children}
            <ToastContainer
              hideProgressBar={false}
              autoClose={5000}
              transition={Slide}
            />
          </ScreenSizeProvider>
        </Providers>
      </body>
    </html>
  );
}
