import Stack from '@mui/material/Stack';

import CollapsibleNavSidebar from './components/CollapsibleNavSidebar';
import { type SidebarContentLayoutProps } from './types';

const SidebarContentLayout = ({
  children,
  loading = false,
  slotProps,
}: SidebarContentLayoutProps) => {
  return (
    <Stack
      {...slotProps.root}
      sx={{
        height: '100%',
        width: '100%',
        flexDirection: 'row',
        ...slotProps.root?.sx,
      }}
    >
      <CollapsibleNavSidebar
        {...slotProps.sidebar}
        loading={loading}
      />
      {children}
    </Stack>
  );
};

export default SidebarContentLayout;
