import { createMultiStyleConfigHelpers } from '@chakra-ui/react';
import { drawerAnatomy } from '@chakra-ui/anatomy';

var definePartsStyle = createMultiStyleConfigHelpers(drawerAnatomy.keys).definePartsStyle;
var getSize = function (value) {
    if (value === 'full') {
        return definePartsStyle({
            dialog: { maxW: '100vw', h: '100vh' },
        });
    }
    return definePartsStyle({
        dialog: { maxW: value },
    });
};
var baseStyleOverlay = {
    zIndex: 'overlay',
};
var baseStyleDialogContainer = {
    display: 'flex',
    zIndex: 'modal',
    justifyContent: 'center',
};
var baseStyleDialog = function () {
    return {
        zIndex: 'modal',
        bg: 'white',
        color: 'inherit',
        boxShadow: 'xs',
        borderBottom: '1px',
        borderBottomColor: 'gray.200',
    };
};
var baseStyleBody = {
    flex: 1,
    overflow: 'auto',
};
var baseStyle = function () { return ({
    overlay: baseStyleOverlay,
    dialogContainer: baseStyleDialogContainer,
    dialog: baseStyleDialog(),
    body: baseStyleBody,
}); };
var sizes = {
    xl: getSize('4xl'),
    half: getSize('50vw'),
    full: getSize('full'),
};
var Drawer = {
    baseStyle: baseStyle,
    parts: drawerAnatomy.keys,
    sizes: sizes,
    defaultProps: {
        size: 'xl',
    },
};

export { Drawer as default };
//# sourceMappingURL=drawer.js.map
