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

//#region src/dialog/dialogCancelButton.tsx
/** Shows an outlined Button in the Dialog Footer, which by default closes the Dialog. */
const DialogCancelButton = vui((props, ref) => {
	const { className, ...rest } = props;
	const { onClose } = useDialogContext() ?? {};
	const styles = useStyleConfig("Dialog", useDialogContext());
	return /* @__PURE__ */ jsx(LineButton, {
		className: cs("vui-dialogCancelButton", className),
		onClick: onClose,
		ref,
		...styles.cancelButton,
		...rest
	});
});
DialogCancelButton.displayName = "DialogCancelButton";

//#endregion
export { DialogCancelButton as default };
globalThis.__vuiVersion__ = "4.0.0-beta.1"
//# sourceMappingURL=dialogCancelButton.js.map