import { jsx as _jsx } from "react/jsx-runtime";
import { LineButton } from '../button';
import { useStyleConfig, vui } from '../core';
import { cs } from '../utils';
import { useDialogContext } from './context';
/** Shows an outlined Button in the Dialog Footer, which by default closes the Dialog. */
export const DialogCancelButton = vui((props, ref) => {
    const { className, ...rest } = props;
    const { onClose } = useDialogContext() ?? {};
    const styles = useStyleConfig('Dialog', useDialogContext());
    return (_jsx(LineButton, { className: cs('vui-dialogCancelButton', className), onClick: onClose, ref: ref, ...styles.cancelButton, ...rest }));
});
DialogCancelButton.displayName = 'DialogCancelButton';
export default DialogCancelButton;
//# sourceMappingURL=dialogCancelButton.js.map