import { Breakpoint, Container, SxProps, Theme } from "@mui/material";
import React, { ElementType } from "react";


interface Props {
    component?: ElementType;
    sx?: SxProps<Theme>;
    innerSx: SxProps<Theme>;
    maxWidth?: false | Breakpoint;
    children?: React.ReactNode;
}

export default function SectionWrapper({ component, sx, innerSx, children, maxWidth }: Props) {

    return (
        <Container
            component={component || "div"}
            maxWidth={false}
            disableGutters
            sx={sx}
        >
            <Container
                disableGutters
                maxWidth={maxWidth}
                sx={innerSx}
            >
                {children}
            </Container>
        </Container>
    );
}