"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Drawer = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const box_1 = __importDefault(require("../box"));
const core_1 = require("../core");
const dialog_1 = require("../dialog");
const utils_1 = require("../utils");
/** Drawer component based on Dialog. */
exports.Drawer = (0, core_1.vui)((props, ref) => {
    const { children, className, dialogProps, isLeft, isOpen, onClose } = (0, core_1.omitThemingProps)(props);
    const styles = (0, core_1.useStyleConfig)('Drawer', props);
    const placement = isLeft ? 'left' : 'right';
    return ((0, jsx_runtime_1.jsx)(dialog_1.Dialog, Object.assign({ isOpen: isOpen, onClose: onClose, placement: placement, ref: ref }, dialogProps, { children: (0, jsx_runtime_1.jsx)(box_1.default, Object.assign({ className: (0, utils_1.cs)('vui-drawer', className), column: true, p: 3 }, styles, { h: "100vh", overflow: "hidden", children: children })) })));
});
exports.Drawer.displayName = 'Drawer';
exports.default = exports.Drawer;
//# sourceMappingURL=drawer.js.map