import { GlobalNewMessagesBanner } from "@/components/domains/chat";
import { DrawerProvider, Header, NavigationBar } from "@/components/layout";
import { ChatStoreProvider } from "@/providers/chat-store-provider";

import styles from "./layout.module.scss";

export default function CoreLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <DrawerProvider>
      <ChatStoreProvider>
        <Header className={styles.navBar} />
        <GlobalNewMessagesBanner />
        <main className={styles.main}>{children}</main>
        <NavigationBar />
      </ChatStoreProvider>
    </DrawerProvider>
  );
}
