"use client";

import Box from "@mui/material/Box";

/**
 * Segment layout for `/po/workbench`: constrains children to the main content height
 * established by `MainContentArea` (viewport minus the AppBar toolbar) and prevents
 * overflow from propagating to the document scroll.
 *
 * Document `overflow: hidden` for this route is set in `global.css` via
 * `html:has([data-po-workbench-layout])` (no per-route `useEffect` on `html`/`body`).
 */
export default function PoWorkbenchLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <Box
      data-po-workbench-layout=""
      sx={{
        boxSizing: "border-box",
        flex: 1,
        height: "100%",
        minHeight: 0,
        overflow: "hidden",
      }}
    >
      {children}
    </Box>
  );
}
