import { jsx as _jsx } from "react/jsx-runtime";
import Box from '../box';
import { omitThemingProps, useStyleConfig, vui } from '../core';
import { Dialog } from '../dialog';
import { cs } from '../utils';
/** Drawer component based on Dialog. */
export const Drawer = vui((props, ref) => {
    const { children, className, dialogProps, isLeft, isOpen, onClose } = omitThemingProps(props);
    const styles = useStyleConfig('Drawer', props);
    const placement = isLeft ? 'left' : 'right';
    return (_jsx(Dialog, { isOpen: isOpen, onClose: onClose, placement: placement, ref: ref, ...dialogProps, children: _jsx(Box, { className: cs('vui-drawer', className), column: true, p: 3, ...styles, h: "100vh", overflow: "hidden", children: children }) }));
});
Drawer.displayName = 'Drawer';
export default Drawer;
//# sourceMappingURL=drawer.js.map