import { AlertTriangle } from 'lucide-react'
import { Column } from 'react-data-grid'
import { cn, IconBroadcast, IconDatabaseChanges, IconPresence } from 'ui'
import type { LogData, PreviewLogData } from './Messages.types'
import { RowLayout } from './MessagesFormatters'
import { isErrorLog } from './MessagesTable'
const ICONS = {
PRESENCE: ,
BROADCAST: ,
POSTGRES: ,
SYSTEM: ,
}
export const ColumnRenderer: Column[] = [
{
name: 'timestamp-with-truncated-text',
key: 'main-column',
renderHeaderCell: () => null,
renderCell: (data: { row: PreviewLogData }) => {
const type = data.row.message as keyof typeof ICONS
return (
{ICONS[type]}
{new Date(data.row.timestamp).toISOString()}
{JSON.stringify(data.row.metadata)}
)
},
},
]