import React, { PropsWithChildren } from 'react'; export interface ActionDialogProps { actionButtonText: string; actionButtonClass?: string; actionButtonEnabled?: boolean; cancelButtonText?: string; action(): void; actionInProgress: boolean; title: React.ReactNode; onOpen?(): void; onClose(): void; modalClass?: string; onCancel?(): void; focusFirst?: boolean; showFooter?: boolean; closeRef?: React.MutableRefObject<() => void>; } /** * A [[`Dialog`]] that has an action button and a cancel button. */ export declare function ActionDialog({ actionButtonText, actionButtonClass, cancelButtonText, action, actionInProgress, title, modalClass, onOpen, onClose, children, focusFirst, actionButtonEnabled, showFooter, onCancel, closeRef: propsCloseRef, }: PropsWithChildren): React.ReactElement; export interface FocusFirstOptions { additionalTagNames: string[]; } export interface DialogProps { title: React.ReactNode; onOpen?(): void; onClose(): void; dialogClassName?: string; footer?: React.ReactNode; focusFirst?: boolean; allowDismiss?: boolean; /** * If you need to close the dialog, call this function rather than simply * no longer returning the dialog from your render method. This is necessary for * the fade out animation to play. */ closeRef?: React.MutableRefObject<() => void>; } /** * Wrapper around the Bootstrap dialog component. * * - **DO NOT** unmount the dialog except in the `onClose` function. This will cause * the dialog to be abruptly removed without an animation. * - Use `closeRef` to close the dialog from the parent component. * - The first input element is automatically focused when the dialog opens. This can be * controlled with the `focusFirst` and `focusFirstOptions` props. */ export declare function Dialog({ title, onOpen, onClose, footer, children, closeRef, dialogClassName, focusFirst, allowDismiss, }: PropsWithChildren): React.ReactElement;