import { FunctionComponent, MouseEvent as ReactMouseEvent, KeyboardEvent as ReactKeyboardEvent } from 'react'; import Message from '@patternfly/chatbot/dist/dynamic/Message'; import patternflyAvatar from './patternfly_avatar.jpg'; import { Button, Flex, FlexItem, Label, Popover } from '@patternfly/react-core'; import { OutlinedQuestionCircleIcon } from '@patternfly/react-icons'; export const MessageWithSourcesExample: FunctionComponent = () => { const onSetPage = (_event: ReactMouseEvent | ReactKeyboardEvent | MouseEvent, newPage: number) => { // eslint-disable-next-line no-console console.log(`Page changed to ${newPage}`); }; const date = new Date(); const datePart = date.toLocaleDateString('en', { year: 'numeric', month: 'short', day: 'numeric' }); const timePart = date.toLocaleTimeString('en', { hour: '2-digit', minute: '2-digit', hour12: true }); const formattedDate = `${datePart}, ${timePart}`; return ( <> Why this confidence score? } bodyContent={ <> A high confidence score indicates a strong match. The system found significant overlap in key data points, including text content, names, dates, and organizational details, with a high degree of certainty. This match is highly reliable. } > {`Last updated: ${formattedDate}`} ) } ] }} /> ); };