import { cs } from "../utils/styles.js";
import "../utils/index.js";
import { useStyleConfig } from "../core/theme.js";
import { vui } from "../core/vui.js";
import { CloseButton } from "../button/buttons.js";
import "../button/index.js";
import "../core/index.js";
import { useDialogContext } from "./context.js";
import { jsx } from "react/jsx-runtime";

//#region src/dialog/dialogCloseButton.tsx
/** Shows a CloseButton in the Dialog Header, which by default closes the Dialog. */
const DialogCloseButton = vui((props, ref) => {
	const { className, size = "md", ...rest } = props;
	const { onClose } = useDialogContext() ?? {};
	const styles = useStyleConfig("Dialog", useDialogContext());
	return /* @__PURE__ */ jsx(CloseButton, {
		className: cs("vui-dialogCloseButton", className),
		onClick: onClose,
		position: "absolute",
		ref,
		right: 16,
		size,
		top: 16,
		variant: "tertiaryDark",
		...styles.closeButton,
		...rest
	});
});
DialogCloseButton.displayName = "DialogCloseButton";
var dialogCloseButton_default = DialogCloseButton;

//#endregion
export { DialogCloseButton, dialogCloseButton_default as default };
globalThis.__vuiVersion__ = "4.0.0-beta.1"
//# sourceMappingURL=dialogCloseButton.js.map