import { forwardRef } from 'react'; import { Container, ContainerRef } from '@cleartrip/ct-design-container'; import { Typography, TypographyVariant } from '@cleartrip/ct-design-typography'; import { useStyles } from '@cleartrip/ct-design-style-manager'; import type { IAlertCalloutProps } from './type'; import staticStyles, { getAlertCalloutColourCode } from './style'; const AlertCallout = forwardRef( ({ textNode, rightActionNode, prefixIconNode, variant, description, onClick, styleConfig }, forwardedRef) => { const { root = [], rootContainer = [], prefixIconContainer = [], textNodeContainerWrapper = [], textNodeContainer = [], rightActionContainer = [], } = styleConfig || {}; const dynamicStyles = useStyles( () => ({ variantBackground: { backgroundColor: getAlertCalloutColourCode(variant), }, }), [variant], ); return ( {!!prefixIconNode && ( {prefixIconNode} )} {typeof textNode === 'string' ? ( {textNode} ) : ( textNode )} {!!rightActionNode && ( {rightActionNode} )} {!!description && description} ); }, ); AlertCallout.displayName = 'AlertCallout'; export default AlertCallout;