import React from "react";
import NavBar from "./NavBar";
import SideBar from "./SideBar";
import ProtectedRouteProvider from "../../lib/ProtectedRouteProvider";

const Layout = ({
  children,
  className = "",
}: {
  children: React.ReactNode;
  className?: string;
}) => {
  return (
    <ProtectedRouteProvider className="Layout">
      <main className={`${className} Layout_Body`}>
        <NavBar />
        <div className="Layout_Children">{children}</div>
      </main>
      <SideBar />
    </ProtectedRouteProvider>
  );
};

export default Layout;
