import { Drawer } from "@mui/material";
import DrawerContainer, {
  DrawerContainerProps,
} from "../../components/DrawerContainer";

interface DrawProps extends DrawerContainerProps {
  visible: boolean;
  anchor?: React.ComponentProps<typeof Drawer>["anchor"];
}
export default function SaturnDrawer({
  visible,
  width = 500,
  anchor = "right",
  children,
  ...containerProps
}: DrawProps) {
  return (
    <Drawer anchor={anchor} open={visible} onClose={containerProps.onCancel}>
      <DrawerContainer
        width={width}
        style={{ height: "100%" }}
        {...containerProps}
      >
        {children}
      </DrawerContainer>
    </Drawer>
  );
}
