import React, { ReactElement, ReactNode } from 'react'; interface FocusableElement { focus(options?: FocusOptions): void; } export interface ModalProps { /** * If true, the modal is open. */ isOpen: boolean; /** * An optional title for the modal */ title?: string; /** * If false, the Header is not displayed. */ hasBackButton?: boolean; /** * If false, the Header is not displayed. */ hasHeader?: boolean; /** * Display Tooltip header variant */ hasTooltipHeader?: boolean; /** * If true, modal expands to takeover the viewport. Fullscreen is only designed for mobile view at the moment. */ isFullScreen?: boolean; /** * A single child content element. */ children?: ReactNode; /** * Defines the horizontal padding for the model content. Value can be small, medium or large */ contentPaddingX?: 'small' | 'medium' | 'large'; /** * Callback fired when the modal requests to be closed. */ onClose?: (event: React.MouseEvent) => void; /** * Callback fired when the back button on the modal is clicked */ onBackButton?: (event: React.MouseEvent) => void; /** * An optional background for the modal box */ background?: string; /** * Defines if the modal should have a minimum height */ hasMinHeight?: boolean; /** * If defined, will load as a Video Modal. Should be a complete YouTube embed URL; */ videoSrc?: string; /** * If `true`, the modal will return focus to the element that triggered it when it closes. */ returnFocusOnClose?: boolean; /** * `ref` of the element to return focus to when `modal` * unmounts */ finalFocusRef?: React.RefObject; } declare const Modal: ({ isOpen, title, hasBackButton, hasHeader, hasTooltipHeader, isFullScreen, returnFocusOnClose, finalFocusRef, children, contentPaddingX, onClose, onBackButton, background, hasMinHeight, videoSrc, }: ModalProps) => ReactElement; export default Modal;