import React from 'react';
import { Popover as PopoverPrimitive, PopoverProps as PopoverPropsPrimitive } from '@modulz/primitives';

export type PopoverProps = PopoverPropsPrimitive

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

export const Popover = React.forwardRef<PrimitiveRefType, PopoverProps>((props, ref) => {
  return (
    <PopoverPrimitive {...props} ref={ref}  styleConfig={{"base":{"content":{"normal":{"borderTopRightRadius":"6px","boxShadow":"0 2px 4px 0 rgba(0, 0, 0, 0.15), 0 2px 10px -5px rgba(0, 0, 0, 0.15)","borderBottomRightRadius":"6px","backgroundColor":"hsl(0, 0%, 100%)","width":"250px","borderTopLeftRadius":"6px","borderBottomLeftRadius":"6px"}},"arrow":{"normal":{"height":"8px","width":"16px","fill":"hsl(0, 0%, 100%)"}}},"variants":{}}}/>
  );
});


