import React from 'react';
import { Code as CodePrimitive, CodeProps as CodePropsPrimitive } from '@modulz/primitives';

export type CodeProps = CodePropsPrimitive

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

export const Code = React.forwardRef<PrimitiveRefType, CodeProps>((props, ref) => {
  return (
    <CodePrimitive {...props} ref={ref}  styleConfig={{"base":{"code":{"normal":{"borderBottomRightRadius":"4px","paddingLeft":"8px","paddingBottom":"4px","paddingRight":"8px","borderBottomLeftRadius":"4px","borderTopRightRadius":"4px","color":"hsl(0, 0%, 0%)","backgroundColor":"hsl(240, 20%, 95%)","borderTopLeftRadius":"4px","fontFamily":"SF Mono, Consolas, Liberation Mono, Menlo, monospace","paddingTop":"4px","fontSize":"11px"}}},"variants":{}}}/>
  );
});


