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 : unknown;
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":{"borderBottomLeftRadius":"4px","overflow":"auto","borderTopRightRadius":"4px","boxShadow":"0 2px 4px 0 rgba(0, 0, 0, 0.15)","borderBottomRightRadius":"4px","backgroundColor":"hsl(0, 0%, 100%)","width":"300px","borderTopLeftRadius":"4px"}},"overlay":{"normal":{"opacity":"30%","backgroundColor":"hsl(5, 100%, 60%)"}}},"variants":{}}}/>
  );
});


