import React from 'react';
import { Link as LinkPrimitive, LinkProps as LinkPropsPrimitive } from '@modulz/primitives';

export type LinkProps = LinkPropsPrimitive

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

export const Link = React.forwardRef<PrimitiveRefType, LinkProps>((props, ref) => {
  return (
    <LinkPrimitive {...props} ref={ref}  styleConfig={{"base":{"link":{"normal":{"color":"hsl(210, 100%, 50%)","paddingTop":"4px","paddingBottom":"4px","fontFamily":"Inter,sans-serif"},"hover":{"textDecoration":"underline"},"focus":{"boxShadow":"0 0 0 2px rgba(0, 128, 255, 1)"}}},"variants":{}}}/>
  );
});


