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":{"th":{"normal":{"borderBottom":"2px solid","borderBottomColor":"hsl(240, 10%, 90%)","color":"hsl(0, 0%, 0%)","paddingTop":"8px","paddingBottom":"8px"}},"td":{"normal":{"paddingTop":"8px","paddingBottom":"8px","borderBottom":"1px solid","borderBottomColor":"hsl(240, 10%, 90%)","color":"hsl(0, 0%, 0%)"}}},"variants":{}}}/>
  );
});

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