import { ReactElement } from 'react'; import { default as PropTypes } from 'prop-types'; import { SxProps } from '@mui/material/styles'; import { DeleteManyParams, MutationMode, RaRecord } from 'ra-core'; import { BulkActionProps, ButtonProps } from 'react-admin'; import { UseMutationOptions } from 'react-query'; import * as React from 'react'; /** * BulkDeleteWithConfirmButton component allows you to delete multiple records with a confirmation dialog. * * This component extends the functionality of the react-admin BulkDeleteWithConfirmButton by adding * two optional methods, `onSuccess` and `onError`, to the props. These methods allow users * to extend what happens in the `onSuccess` and `onError` methods of the `useDeleteMany` hook. * * @example * { * // Custom success logic * }} * onError={() => { * // Custom error logic * }} * /> */ declare function BulkDeleteWithConfirmButton(props: BulkDeleteWithConfirmButtonProps): import("react/jsx-runtime").JSX.Element; declare namespace BulkDeleteWithConfirmButton { var propTypes: { confirmTitle: PropTypes.Requireable; confirmContent: PropTypes.Requireable; confirmColor: PropTypes.Requireable; dialogSx: PropTypes.Requireable; icon: PropTypes.Requireable; label: PropTypes.Requireable; mutationMode: PropTypes.Requireable; resource: PropTypes.Requireable; selectedIds: PropTypes.Requireable; onSuccess: PropTypes.Requireable<(...args: any[]) => any>; onError: PropTypes.Requireable<(...args: any[]) => any>; }; } interface BulkDeleteWithConfirmButtonProps extends BulkActionProps, ButtonProps { confirmContent?: React.ReactNode; confirmTitle?: React.ReactNode; confirmColor?: 'primary' | 'warning'; dialogSx?: SxProps; icon?: ReactElement; mutationMode: MutationMode; mutationOptions?: UseMutationOptions> & { meta?: any; }; /** * Optional custom success logic to be executed after the default onSuccess logic. * This method allows users to extend what happens in the onSuccess method of the useDeleteMany hook. */ onSuccess?: () => void; /** * Optional custom error logic to be executed after the default onError logic. * This method allows users to extend what happens in the onError method of the useDeleteMany hook. */ onError?: () => void; } export { BulkDeleteWithConfirmButton }; export type { BulkDeleteWithConfirmButtonProps }; //# sourceMappingURL=BulkDeleteWithConfirmButton.d.ts.map