import { CSSProperties, FC, ReactNode } from "react";
import classNames from "classnames";
import { Box } from "@mantine/core";
import styles from "./PageBlock.module.css";

type Props = {
    children: ReactNode;
    style?: CSSProperties;
    className?: string;
    fullHeight?: boolean;
    fullHeightFixed?: boolean;
    noBorderRadius?: boolean;
    fullScreenMobile?: boolean;
    transparent?: boolean;
};

const PageBlock: FC<Props> = ({
    children,
    style,
    className = "",
    fullHeight = false,
    noBorderRadius = false,
    fullScreenMobile = false,
    transparent = false,
}) => {
    return (
        <Box
            bdrs={"lg"}
            style={style}
            className={classNames(
                styles.container,
                fullHeight && styles["container-full-height"],
                noBorderRadius && styles["container-no-border-radius"],
                fullScreenMobile && styles["container-full-screen-mobile"],
                transparent && styles.transparent,
                styles[className]
            )}>
            {children}
        </Box>
    );
};
export default PageBlock;
