import { mergeStyles , Theme } from '@fluentui/react' ; import { MoreIcon , MenuProps , Ref } from '@fluentui/react-northstar' ; import { _formatString } from '@internal/acs-ui-common' ; import React from 'react' ; import { chatActionsCSS , iconWrapperStyle } from '../styles/ChatMessageComponent.styles' ; private export type ChatMessageActionMenuProps = MenuProps & { showActionMenu ? : boolean | undefined ; } ; private export const chatMessageActionMenuProps = ( menuProps ) : ChatMessageActionMenuProps | undefined => { if ( ! menuProps . enabled ) { return undefined ; } const menuClass = mergeStyles ( chatActionsCSS , { 'ul&' : { boxShadow : menuProps . theme . effects . elevation4 , backgroundColor : menuProps . theme . palette . white } } ) ; const actionMenuProps = { showActionMenu : menuProps . forceShow === true ? true : undefined , iconOnly : true , activeIndex : - 1 , className : menuClass , onItemClick : ( ) => menuProps . onActionButtonClick ( ) , items : [ { children : ( < Ref innerRef = { menuProps . menuButtonRef } > < MoreIcon className = { iconWrapperStyle } { ... { outline : true } } / > < /Ref>), key : 'menuButton' , indicator : false } ] } ; return actionMenuProps ; } ;