import { jsx as _jsx } from "react/jsx-runtime";
import { useCallback } from 'react';
import MuiGlobalStyles from '@mui/material/GlobalStyles';
import { getScrollbarStyles } from './utils';
const BASE_STYLES = {
    '*': {
        boxSizing: 'border-box',
        margin: 0,
        padding: 0,
    },
    html: {
        WebkitFontSmoothing: 'antialiased',
        MozOsxFontSmoothing: 'grayscale',
        height: '100%',
        width: '100%',
    },
    body: {
        height: '100%',
        width: '100%',
    },
    '#root': {
        height: '100%',
        width: '100%',
    },
};
const GlobalStyles = ({ additionalStyles }) => {
    const getStyles = useCallback((theme) => {
        const extra = typeof additionalStyles === 'function'
            ? additionalStyles(theme)
            : additionalStyles;
        return [
            BASE_STYLES,
            getScrollbarStyles(theme),
            ...(extra ? [extra] : []),
        ];
    }, [additionalStyles]);
    return _jsx(MuiGlobalStyles, { styles: getStyles });
};
export default GlobalStyles;
