import React from 'react';
import { FloatingMain, SiziableMain } from './styled.main';

export interface MainLayoutProps {
    sideMenuOpen?: boolean,
    children?: React.ReactNode | React.ReactNode[] | any
}

export const MainLayout: React.FC<MainLayoutProps> = ({ sideMenuOpen, children }) => {

    return (
        sideMenuOpen
            ? (
                <SiziableMain>
                    {children}
                </SiziableMain>
            )
            : (
                <FloatingMain>
                    {children}
                </FloatingMain>
            )
    );
}