// AdminLayout.tsx
import { Outlet } from "react-router-dom";
import { Box, CssBaseline, styled } from "@mui/material";
import AdminAppBar from "./adminappbar";
import AdminSidebar from "./adminsidebar";

const MainContent = styled(Box)(({ theme }) => ({
  flexGrow: 1,
  padding: theme.spacing(3),
  backgroundColor: "#f5f7fa",
  minHeight: "100vh",
}));

const AdminLayout = () => {
  return (
    <Box sx={{ display: "flex", bgcolor: "background.default" }}>
      <CssBaseline />
      <AdminAppBar />
      <AdminSidebar />
      <MainContent>
        <Outlet />
      </MainContent>
    </Box>
  );
};

export default AdminLayout;
