import { default as React } from 'react'; import { TooltipProps } from '../Tooltip/Tooltip'; import { ConfirmationItem } from '../Button/ButtonComponents/ConfirmationButton'; import { ButtonProps } from '../Button/Button.models'; type FormButtonProps = { /** Required callout for each button */ onClick: React.MouseEventHandler; /** Optionally disable a button */ disabled?: ButtonProps['disabled']; /** Optionally pass in children for a button */ children?: React.ReactNode; /** Optionally style the button */ styleType?: ButtonProps['styleType']; /** Optionally style the Button as destructive */ destructive?: ButtonProps['destructive']; /** Optionally pass in a tooltip content for the button */ tooltip?: Omit; /** Optional prop to add a test id to the FormFooter buttons for QA testing */ qaTestId?: string; }; type ButtonWithConfirmationProps = Omit & { confirmation: ConfirmationItem; }; type ButtonWithoutConfirmationProps = FormButtonProps & { confirmation?: never; }; type CancelButtonProps = FormButtonProps & { /** Optional prop to add a data-dd-action-name to the FormFooter buttons for DD testing */ dataDDActionName?: string; }; type DetermineConfirmationButtonProps = ButtonWithoutConfirmationProps | ButtonWithConfirmationProps; export type FormFooterProps = { /** Cancel button props */ cancelButtonProps?: CancelButtonProps; /** Save button props */ saveButtonProps: DetermineConfirmationButtonProps; /** Reset button props */ resetButtonProps?: DetermineConfirmationButtonProps; /** Optional prop to add a test id to the FormFooter for QA testing */ qaTestId?: string; }; declare const FormFooter: ({ cancelButtonProps, saveButtonProps, resetButtonProps, qaTestId, }: FormFooterProps) => React.JSX.Element; export default FormFooter;