import { ReactEventHandler, SyntheticEvent } from 'react';
import { UseDeleteControllerParams, UseDeleteControllerReturn } from "..//index.js";
import { RaRecord } from "../../types.js";
/**
* Prepare a set of callbacks for a delete button guarded by confirmation dialog
* @deprecated prefer the useDeleteController hook instead
*
* @example
*
* const DeleteButton = ({
* resource,
* record,
* redirect,
* onClick,
* ...rest
* }) => {
* const {
* open,
* isPending,
* handleDialogOpen,
* handleDialogClose,
* handleDelete,
* } = useDeleteWithConfirmController({
* resource,
* record,
* redirect,
* onClick,
* });
*
* return (
*
*
*
*
* );
* };
*/
declare const useDeleteWithConfirmController: (props: UseDeleteWithConfirmControllerParams) => UseDeleteWithConfirmControllerReturn;
export interface UseDeleteWithConfirmControllerParams extends UseDeleteControllerParams {
onClick?: ReactEventHandler;
}
export interface UseDeleteWithConfirmControllerReturn extends Omit {
open: boolean;
handleDialogOpen: (e: SyntheticEvent) => void;
handleDialogClose: (e: SyntheticEvent) => void;
handleDelete: ReactEventHandler;
}
export default useDeleteWithConfirmController;
//# sourceMappingURL=useDeleteWithConfirmController.d.ts.map