import React from 'react';
import { Dialog as DialogPrimitive, DialogProps as DialogPropsPrimitive } from '@modulz/primitives';

export type DialogProps = DialogPropsPrimitive

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

export const Dialog = React.forwardRef<PrimitiveRefType, DialogProps>((props, ref) => {
  return (
    <DialogPrimitive {...props} ref={ref}  styleConfig={{"base":{"wrapper":{"normal":{"alignItems":"center","display":"flex","justifyContent":"center"}},"content":{"normal":{"boxShadow":"0 2px 4px 0 rgba(0, 0, 0, 0.15)","borderTopRightRadius":"8px","height":"128px","width":"256px","borderTopLeftRadius":"8px","overflow":"auto","backgroundColor":"hsl(0, 0%, 100%)","borderBottomRightRadius":"8px","borderBottomLeftRadius":"8px"}},"overlay":{"normal":{"backgroundColor":"rgba(0, 0, 0, 1)","opacity":"30%"}}},"variants":{}}}/>
  );
});


