'use client'

import classNames from 'classnames'
import type { HTMLAttributes, ReactNode } from 'react'

interface ITableDataCellProps extends HTMLAttributes<HTMLTableCellElement> {
  className?: string
  children?: ReactNode
  dataLabel?: string
}

export const PktTableDataCell = ({ children, className, dataLabel, ...props }: ITableDataCellProps) => (
  <td
    className={classNames(className, 'pkt-table__data-cell', {})}
    data-label={dataLabel}
    role="cell"
    data-testid="pkt-table__data-cell"
    {...props}
  >
    {children}
  </td>
)
