import React from 'react';
import { Checkbox as CheckboxPrimitive, CheckboxProps as CheckboxPropsPrimitive } from '@modulz/primitives';

export type CheckboxProps = CheckboxPropsPrimitive

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

export const Checkbox = React.forwardRef<PrimitiveRefType, CheckboxProps>((props, ref) => {
  return (
    <CheckboxPrimitive {...props} ref={ref}  styleConfig={{"base":{"checkbox":{"normal":{"borderTopLeftRadius":"4px","border":"1px solid","borderColor":"rgba(245, 247, 249, 1)","borderTopRightRadius":"4px","borderBottomRightRadius":"4px","borderBottomLeftRadius":"4px","backgroundColor":"hsl(0, 0%, 100%)","height":"24px","width":"24px"}},"icon":{"normal":{"color":"rgba(0, 0, 0, 1)"}}},"variants":{}}}/>
  );
});


