import { SidebarMain } from "./Sidebar/Main/Main";
import { Desktop } from "./Desktop";

export function MainLayout<PropFormat>({
  title, 
  subtitle,
  backButton = false, 
  children,
  props,
  sidebar,
  currentPage
}:{
  title: string, 
  subtitle?: string,
  backButton?: boolean, 
  children: React.ReactNode,
  props?:PropFormat,
  sidebar?: (x:{ currentPage:string, props?:PropFormat }) => React.ReactNode,
  currentPage: string
}) {
  return <Desktop title={title} subtitle={subtitle} currentPage={currentPage} props={props} backButton={backButton} sidebar={sidebar ?? SidebarMain}>{children}</Desktop>
}