import { isJsx } from "../utils/assertion.js";
import { cs } from "../utils/styles.js";
import "../utils/index.js";
import { useStyleConfig } from "../core/theme.js";
import { vui } from "../core/vui.js";
import { Box } from "../box/box.js";
import "../box/index.js";
import "../core/index.js";
import { useDialogContext } from "./context.js";
import dialogCancelButton_default from "./dialogCancelButton.js";
import dialogSubmitButton_default from "./dialogSubmitButton.js";
import { Fragment, jsx, jsxs } from "react/jsx-runtime";

//#region src/dialog/dialogFooter.tsx
/** Shows control buttons below the Dialog Body. By default includes cancel and submit buttons. */
const DialogFooter = vui((props, ref) => {
	const { cancelButton, children, className, submitButton, ...rest } = props;
	const styles = useStyleConfig("Dialog", useDialogContext());
	return /* @__PURE__ */ jsx(Box, {
		className: cs("vui-dialogFooter", className),
		justifyContent: "flex-end",
		p: 3,
		pt: 2,
		ref,
		...styles.footer,
		...rest,
		children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [isJsx(cancelButton) ? cancelButton : cancelButton && /* @__PURE__ */ jsx(dialogCancelButton_default, { ...cancelButton }), isJsx(submitButton) ? submitButton : submitButton && /* @__PURE__ */ jsx(dialogSubmitButton_default, { ...submitButton })] })
	});
});
DialogFooter.displayName = "DialogFooter";
var dialogFooter_default = DialogFooter;

//#endregion
export { DialogFooter, dialogFooter_default as default };
globalThis.__vuiVersion__ = "4.0.0-beta.1"
//# sourceMappingURL=dialogFooter.js.map