import { ReactNode } from 'react'; import { NativeElementPropsWithoutKeyAndRef } from '../utils/jsx-types'; import { ButtonProps } from '../Button/Button'; interface ModalFooterBaseProps extends NativeElementPropsWithoutKeyAndRef<'div'> { /** * Layout of action buttons. * - 'fixed': Buttons maintain fixed width * - 'fill': Buttons expand to fill available space equally * @default 'fixed' */ actionsButtonLayout?: 'fill' | 'fixed'; /** * Text to display as annotation on the left side. * Only used when auxiliaryContentType is 'annotation'. */ annotation?: ReactNode; /** * Props for the auxiliary content button. * Only used when auxiliaryContentType is 'button'. */ auxiliaryContentButtonProps?: ButtonProps; /** * Text for the auxiliary content button. * Only used when auxiliaryContentType is 'button'. */ auxiliaryContentButtonText?: ReactNode; /** * Whether the auxiliary content control (checkbox/toggle) is checked. * Only used when auxiliaryContentType is 'checkbox' or 'toggle'. */ auxiliaryContentChecked?: boolean; /** * Label text for the auxiliary content control (checkbox/toggle). * Only used when auxiliaryContentType is 'checkbox' or 'toggle'. */ auxiliaryContentLabel?: string; /** * Change handler for auxiliary content control (checkbox/toggle). * Only used when auxiliaryContentType is 'checkbox' or 'toggle'. */ auxiliaryContentOnChange?: (checked: boolean) => void; /** * Click handler for the auxiliary content button. * Only used when auxiliaryContentType is 'button'. */ auxiliaryContentOnClick?: ButtonProps['onClick']; /** * Type of auxiliary content to show on the left side of the footer. * - 'annotation': Display text annotation * - 'button': Display a button * - 'checkbox': Display a checkbox control * - 'toggle': Display a toggle control * - 'password': Display password-specific controls (remember me + forgot password) * @default undefined (no auxiliary content) */ auxiliaryContentType?: 'annotation' | 'button' | 'checkbox' | 'toggle' | 'password'; /** * Additional props for the cancel button. */ cancelButtonProps?: ButtonProps; /** * Additional props for the confirm button. */ confirmButtonProps?: ButtonProps; /** * Text content of the confirm button. */ confirmText?: ReactNode; /** * Whether confirm button is loading and cancel button is disabled. */ loading?: boolean; /** * Click handler for the cancel button. */ onCancel?: ButtonProps['onClick']; /** * Click handler for the confirm button. */ onConfirm?: ButtonProps['onClick']; /** * Props for the password auxiliary button. * Only used when auxiliaryContentType is 'password'. */ passwordButtonProps?: ButtonProps; /** * Text for the password auxiliary button (e.g., "Forgot password?"). * Only used when auxiliaryContentType is 'password'. */ passwordButtonText?: ReactNode; /** * Whether the password checkbox is checked (e.g., "Remember me"). * Only used when auxiliaryContentType is 'password'. */ passwordChecked?: boolean; /** * Label for the password checkbox (e.g., "Remember me"). * Only used when auxiliaryContentType is 'password'. */ passwordCheckedLabel?: string; /** * Change handler for the password checkbox. * Only used when auxiliaryContentType is 'password'. */ passwordCheckedOnChange?: (checked: boolean) => void; /** * Click handler for the password auxiliary button. * Only used when auxiliaryContentType is 'password'. */ passwordOnClick?: ButtonProps['onClick']; } interface ModalFooterWithCancelButtonProps extends ModalFooterBaseProps { /** * Text content of the cancel button. * Required when cancel button is shown (showCancelButton is true or not provided). */ cancelText: ReactNode; /** * Whether to show the cancel button. * @default true */ showCancelButton?: true; } interface ModalFooterWithoutCancelButtonProps extends ModalFooterBaseProps { /** * Text content of the cancel button. * Cannot be provided when showCancelButton is false. */ cancelText?: never; /** * Whether to show the cancel button. */ showCancelButton: false; } export type ModalFooterProps = ModalFooterWithCancelButtonProps | ModalFooterWithoutCancelButtonProps; /** * The react component for `mezzanine` modal footer. */ declare const ModalFooter: import("react").ForwardRefExoticComponent>; export default ModalFooter;