import React from 'react';
import { Container as ContainerPrimitive, ContainerProps as ContainerPropsPrimitive } from '@modulz/primitives';

export type ContainerProps = ContainerPropsPrimitive & {
  size?: 'small' | 'large';
}

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

export const Container = React.forwardRef<PrimitiveRefType, ContainerProps>((props, ref) => {
  return (
    <ContainerPrimitive {...props} ref={ref}  styleConfig={{"base":{"container":{"normal":{"paddingRight":"24px","maxWidth":"none","paddingLeft":"24px"}}},"variants":{"size":{"small":{"container":{"normal":{"maxWidth":"360px"}}},"large":{"container":{"normal":{"maxWidth":"640px"}}}}}}}/>
  );
});


