import React from 'react';
import { Tooltip as TooltipPrimitive, TooltipProps as TooltipPropsPrimitive } from '@modulz/primitives';

export type TooltipProps = TooltipPropsPrimitive

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

export const Tooltip = React.forwardRef<PrimitiveRefType, TooltipProps>((props, ref) => {
  return (
    <TooltipPrimitive {...props} ref={ref}  alignOffset={0} arrowOffset={10} collisionTolerance={0} noArrow={false} sideOffset={-5} styleConfig={{"base":{"content":{"normal":{"paddingLeft":"8px","paddingRight":"8px","borderTopRightRadius":"4px","color":"hsl(0, 0%, 100%)","fontSize":"12px","fontFamily":"Inter,sans-serif","borderTopLeftRadius":"4px","backgroundColor":"rgba(0, 0, 0, 1)","height":"32px","borderBottomLeftRadius":"4px","borderBottomRightRadius":"4px"}},"arrow":{"normal":{"fill":"rgba(0, 0, 0, 1)","width":"8px","height":"4px"}}},"variants":{}}}/>
  );
});


