/** * @license * Copyright 2023 Aglyn LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { ButtonProps } from '@mui/material/Button'; import { DialogProps } from '@mui/material/Dialog'; import { DialogContentTextProps } from '@mui/material/DialogContentText'; import { DialogTitleProps } from '@mui/material/DialogTitle'; export interface DialogConfirmOptions { cancellationText?: ButtonProps['children']; confirmationText?: ButtonProps['children']; cancellationButtonProps?: Partial; confirmationButtonProps?: Partial; dialogProps?: Partial; title?: DialogTitleProps['children']; description?: DialogContentTextProps['children']; /** The confirm button is held until this settles (see `ConfirmationContextConfig`). */ confirmationHeldUntil?: PromiseLike; } /** * Whether `work` is still running. Settled work is remembered by identity, so * a dialog opened with new work is held from its first frame, never enabled * for one frame and then switched off. */ export declare function useHeldUntil(work: PromiseLike | undefined): boolean; export interface DialogConfirmProps extends DialogProps { options?: DialogConfirmOptions; onConfirm?: ButtonProps['onClick']; onCancel?: ButtonProps['onClick']; } export declare const DialogConfirm: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; export default DialogConfirm;