import React from 'react';
import { Table as TablePrimitive, TableProps as TablePropsPrimitive } from '@modulz/primitives';

export type TableProps = TablePropsPrimitive

type ExtractRefType<TypesThatMayContainReactRef> = TypesThatMayContainReactRef extends {ref?: React.Ref<infer T>} ? T : unknown;
type PrimitiveRefType = ExtractRefType<TablePropsPrimitive>  

export const Table = React.forwardRef<PrimitiveRefType, TableProps>((props, ref) => {
  return (
    <TablePrimitive {...props} ref={ref}  styleConfig={{"base":{"tr":{"normal":{"color":"rgba(19, 19, 21, 1)","borderRight":"none","backgroundColor":"rgba(0, 0, 0, 0)"}},"th":{"normal":{"paddingBottom":"8px","color":"inherit","boxShadow":"none","paddingTop":"8px","borderBottom":"2px solid","borderBottomColor":"rgba(128, 128, 128, 1)","paddingLeft":"4px","paddingRight":"4px"}},"td":{"normal":{"boxShadow":"none","paddingLeft":"4px","color":"inherit","borderBottom":"1px solid","borderBottomColor":"rgba(128, 128, 128, 1)","paddingRight":"4px","paddingBottom":"8px","paddingTop":"8px"}}},"variants":{}}}/>
  );
});

export {Thead ,Tfoot ,Tbody ,Tr ,Th ,Td} from '@modulz/primitives';
