import { cs } from "../utils/styles.js";
import { omitThemingProps, useStyleConfig } from "../core/theme.js";
import vui from "../core/vui.js";
import Box from "../box/box.js";
import Dialog from "../dialog/dialog.js";
import { jsx } from "react/jsx-runtime";

//#region src/drawer/drawer.tsx
/** Drawer component based on Dialog. */
const Drawer = vui((props, ref) => {
	const { children, className, dialogProps, isLeft, isOpen, onClose } = omitThemingProps(props);
	const styles = useStyleConfig("Drawer", props);
	return /* @__PURE__ */ jsx(Dialog, {
		isOpen,
		onClose,
		placement: isLeft ? "left" : "right",
		ref,
		...dialogProps,
		children: /* @__PURE__ */ jsx(Box, {
			className: cs("vui-drawer", className),
			column: true,
			p: 3,
			...styles,
			h: "100vh",
			overflow: "hidden",
			children
		})
	});
});
Drawer.displayName = "Drawer";

//#endregion
export { Drawer as default };
globalThis.__vuiVersion__ = "4.0.0"
//# sourceMappingURL=drawer.js.map