import { PropsWithChildren } from "react"; import { BaseKey, DeleteOneResponse, IQueryKeys, MetaDataQuery, MutationMode, SuccessErrorNotification } from "@pankod/refine-core"; export declare type RefineButtonCommonProps = PropsWithChildren<{ /** * Whether should hide the text and show only the icon or not. */ hideText?: boolean; }>; export declare type RefineButtonResourceProps = { /** * Resource name for API data interactions * @default Reads `:resource` from the URL */ resourceNameOrRouteName?: string; /** * Whether to skip access control for the resource and the delete action or not * @deprecated `ignoreAccessControlProvider` deprecated. Use `accessControl.enabled` instead. */ ignoreAccessControlProvider?: boolean; /** * Access Control configuration for the button * @default `{ enabled: true }` */ accessControl?: { enabled?: boolean; hideIfUnauthorized?: boolean; }; }; export declare type RefineButtonLinkingProps = { /** * Sets the handler to handle click event */ onClick?: React.PointerEventHandler; }; export declare type RefineButtonSingleProps = { /** * Data item identifier for the actions with the API * @default Reads `:id` from the URL */ recordItemId?: BaseKey; }; export declare type RefineButtonDataProps = { dataProviderName?: string; }; export declare type RefineCloneButtonProps, TExtraProps extends {} = {}> = RefineButtonCommonProps & RefineButtonResourceProps & RefineButtonLinkingProps & RefineButtonSingleProps & TComponentProps & TExtraProps & {}; export declare type RefineCreateButtonProps, TExtraProps extends {} = {}> = RefineButtonCommonProps & RefineButtonResourceProps & RefineButtonLinkingProps & TComponentProps & TExtraProps & {}; export declare type RefineDeleteButtonProps, TExtraProps extends {} = {}> = RefineButtonCommonProps & RefineButtonResourceProps & RefineButtonSingleProps & SuccessErrorNotification & TComponentProps & TExtraProps & { /** * Callback function to be called after the delete action is successful */ onSuccess?: (value: DeleteOneResponse) => void; /** * Mutation mode for the delete action * @default `mutationMode` setting from the `Refine` component */ mutationMode?: MutationMode; /** * Additional meta data to pass to the delete mutation from the data provider */ metaData?: MetaDataQuery; /** * Target data provider name for API call to be made * @default `"default"` */ dataProviderName?: string; /** * Text to be displayed in the confirmation popup * @default `"Are you sure?"` or `"buttons.confirm"` from the i18n provider */ confirmTitle?: string; /** * Confirmation button text to be displayed in the confirmation popup * @default `"Delete"` or `"buttons.delete"` from the i18n provider */ confirmOkText?: string; /** * Cancel button text to be displayed in the confirmation popup * @default `"Cancel"` or `"buttons.cancel"` from the i18n provider */ confirmCancelText?: string; /** * Query keys to be invalidated after the delete action is successful * @default `["list", "many"]` */ invalidates?: Array; }; export declare type RefineEditButtonProps, TExtraProps extends {} = {}> = RefineButtonCommonProps & RefineButtonResourceProps & RefineButtonLinkingProps & RefineButtonSingleProps & TComponentProps & TExtraProps & {}; export declare type RefineExportButtonProps, TExtraProps extends {} = {}> = RefineButtonCommonProps & RefineButtonLinkingProps & TComponentProps & TExtraProps & { /** * Set the loading status of button */ loading?: boolean; }; export declare type RefineImportButtonProps, TExtraProps extends {} = {}> = RefineButtonCommonProps & TComponentProps & TExtraProps & { /** * Set the loading status of button */ loading?: boolean; }; export declare type RefineListButtonProps, TExtraProps extends {} = {}> = RefineButtonCommonProps & RefineButtonResourceProps & RefineButtonLinkingProps & TComponentProps & TExtraProps & {}; export declare type RefineRefreshButtonProps, TExtraProps extends {} = {}> = RefineButtonCommonProps & RefineButtonResourceProps & RefineButtonSingleProps & RefineButtonDataProps & RefineButtonLinkingProps & TComponentProps & TExtraProps & { metaData?: MetaDataQuery; }; export declare type RefineSaveButtonProps, TExtraProps extends {} = {}> = RefineButtonCommonProps & RefineButtonLinkingProps & TComponentProps & TExtraProps & {}; export declare type RefineShowButtonProps, TExtraProps extends {} = {}> = RefineButtonCommonProps & RefineButtonResourceProps & RefineButtonSingleProps & RefineButtonLinkingProps & TComponentProps & TExtraProps & {}; //# sourceMappingURL=button.d.ts.map