import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
import { Box } from '../box';
import { useStyleConfig, vui } from '../core';
import { cs, isJsx } from '../utils';
import { useDialogContext } from './context';
import DialogCancelButton from './dialogCancelButton';
import DialogSubmitButton from './dialogSubmitButton';
/** Shows control buttons below the Dialog Body. By default includes cancel and submit buttons. */
export const DialogFooter = vui((props, ref) => {
    const { cancelButton, children, className, submitButton, ...rest } = props;
    const styles = useStyleConfig('Dialog', useDialogContext());
    return (_jsx(Box, { className: cs('vui-dialogFooter', className), justifyContent: "flex-end", p: 3, pt: 2, ref: ref, ...styles.footer, ...rest, children: children ?? (_jsxs(_Fragment, { children: [isJsx(cancelButton) ? cancelButton : cancelButton && _jsx(DialogCancelButton, { ...cancelButton }), isJsx(submitButton) ? submitButton : submitButton && _jsx(DialogSubmitButton, { ...submitButton })] })) }));
});
DialogFooter.displayName = 'DialogFooter';
export default DialogFooter;
//# sourceMappingURL=dialogFooter.js.map