// @ts-nocheck
import { PropsWithChildren } from 'react'
import type { RenderCellProps } from 'react-data-grid'

import { NullValue } from '../common/NullValue'
import { SupaRow } from '@/components/grid/types'
import { convertByteaToHex } from '@/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/RowEditor.utils'

export const BinaryFormatter = (p: PropsWithChildren<RenderCellProps<SupaRow, unknown>>) => {
  const value = p.row[p.column.key]
  if (!value) return <NullValue />
  const binaryValue = convertByteaToHex(value)
  return <>{binaryValue}</>
}
