import React, { FC, ReactNode } from 'react' import { css, SimpleInterpolation } from 'styled-components' import { ZIndexNodeName, zIndexValue } from '@monorail/helpers/zIndex' import { PopOverChildProps } from '@monorail/metaComponents/popOver/PopOver' import { IconType } from '@monorail/visualComponents/icon/IconType' import { BBModalBackground, BBModalHeader, largeModalCloseAnimation, largeModalOpenAnimation, modalAnimationDuration, useModalAnimation, } from '@monorail/visualComponents/modals/Modals' import { ModalSize } from '@monorail/visualComponents/modals/modalTypes' import { Overlay } from '@monorail/visualComponents/toggle/Overlay' type Props = Omit & { title: string iconLeft?: IconType headerStyles?: SimpleInterpolation headerRowChildren?: ReactNode zIndex?: number } export const LargeModal: FC = props => { const { isOpen, onClick, children, title = '', iconLeft = '', togglePopOver, headerStyles = css``, closingAnimationCompleted, zIndex = zIndexValue(ZIndexNodeName.Modal), headerRowChildren, ...otherProps } = props const { modalBackgroundRef, isRendered } = useModalAnimation({ closingAnimationCompleted, isOpen, }) return ( {children} ) }