"use client";

import "./globals.css";
import "../i18n";
import TitleBar from "@/components/titlebar";
import Footer from "@/components/footer";
import InaccessabilityPopup from "@/components/inacessability/inaccessabilityPopup";
import Glasses from "@/components/inacessability/glasses";
import CookieConsent from "@/components/cookie-consent";
import Nudge from "@/components/inacessability/nudge";
import { useState } from "react";


export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  const [nudgeOpen, setNudgeOpen] = useState(false);

  return (
        <>
          <CookieConsent />
          <Nudge open={nudgeOpen} setOpen={setNudgeOpen} />
          <div className="main">
            <TitleBar />

            <div className="px-6">
              {children}
            </div>
            <Footer />
          </div>
          <Glasses setNudgeOpen={setNudgeOpen} size={200} />
        </>
  );
}
