import React from 'react';
import { Menu as MenuPrimitive, MenuProps as MenuPropsPrimitive } from '@modulz/primitives';

export type MenuProps = MenuPropsPrimitive

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

export const Menu = React.forwardRef<PrimitiveRefType, MenuProps>((props, ref) => {
  return (
    <MenuPrimitive {...props} ref={ref}  styleConfig={{"base":{"menu":{"normal":{"borderBottomRightRadius":"4px","backgroundColor":"hsl(0, 0%, 100%)","borderTopLeftRadius":"4px","paddingLeft":"0","paddingBottom":"4px","paddingRight":"0","borderBottomLeftRadius":"4px","paddingTop":"4px","borderTopRightRadius":"4px","boxShadow":"0 2px 4px 0 rgba(0, 0, 0, 0.15)"}},"item":{"normal":{"paddingLeft":"24px","paddingRight":"32px","fontFamily":"-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"","fontSize":"14px","color":"hsl(0, 0%, 0%)","height":"24px"}},"itemIcon":{"normal":{"marginLeft":"4px"}},"label":{"normal":{"paddingLeft":"24px","paddingRight":"32px","fontFamily":"-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"","fontSize":"14px","color":"hsl(240, 3%, 60%)","height":"24px"}},"separator":{"normal":{"height":"1px","backgroundColor":"hsl(240, 10%, 90%)","marginBottom":"4px","marginLeft":"0","marginTop":"4px","marginRight":"0"}},"scrollIndicator":{"normal":{"color":"hsl(0, 0%, 0%)","height":"24px","backgroundColor":"hsl(0, 0%, 100%)"}}},"variants":{}}}/>
  );
});

export {MenuItem ,MenuItemCheckbox ,MenuItemRadioGroup ,MenuItemRadio ,MenuItemLabel ,MenuItemSeparator} from '@modulz/primitives';
