import React from 'react';
import { Card as CardPrimitive, CardProps as CardPropsPrimitive } from '@modulz/primitives';

export type CardProps = CardPropsPrimitive

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

export const Card = React.forwardRef<PrimitiveRefType, CardProps>((props, ref) => {
  return (
    <CardPrimitive {...props} ref={ref}  styleConfig={{"base":{"card":{"normal":{"borderBottomRightRadius":"8px","paddingTop":"16px","borderBottomLeftRadius":"8px","paddingRight":"16px","borderTopLeftRadius":"8px","paddingBottom":"16px","boxShadow":"0 2px 4px 0 rgba(0, 0, 0, 0.15)","backgroundColor":"rgba(128, 128, 128, 1)","paddingLeft":"16px","borderTopRightRadius":"8px"}}},"variants":{}}}/>
  );
});


