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 : unknown;
type PrimitiveRefType = ExtractRefType<LinkPropsPrimitive>  

export const Link = React.forwardRef<PrimitiveRefType, LinkProps>((props, ref) => {
  return (
    <LinkPrimitive {...props} ref={ref}  styleConfig={{"base":{"link":{"normal":{"fontFamily":"-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"","paddingTop":"4px","paddingBottom":"4px","color":"hsl(210, 100%, 50%)"},"hover":{"textDecoration":"underline"},"focus":{"boxShadow":"0 0 0 2px rgba(0, 128, 255, 1)"}}},"variants":{}}}/>
  );
});


