import React from 'react';
import RadioGroupBehaviour,{ RadioContextBehaviour,RadioBehaviour } from "./RadioGroup.behaviour";
import RadioGroupSkeleton,{ RadioGroupLayer,Radio as RadioSkeleton, RadioGroupContext as RadioGroupContextSkeleton  } from "./RadioGroup.skeleton";
import radioPropTypes, {
  radioDefaultProps,
  radioPropsDescription,
  radioGroupProps,
  radioGroupDefaultProps,
  radioGroupPropsDescription,
  radioContextProps,
  radioContextDefaultProps,
  radioContextPropsDescription
} from "./RadioGroup.propTypes";
import constantProps,{ RadioGroupConstant } from "./RadioGroup.constantProps";
import componentCategories from "../../docs-utils/componentCategories";
import componentGroups from "../../docs-utils/componentGroups";

export default function RadioGroup(props){
  return <RadioGroupBehaviour {...props}
    renderComponent={RadioGroupSkeleton}  
  />
}

RadioGroup.propTypes = radioGroupProps;
RadioGroup.defaultProps = radioGroupDefaultProps;
RadioGroup.propsDescription = radioGroupPropsDescription;
RadioGroup.constantProps = RadioGroupConstant;

export function RadioGroupContext(props){
  return <RadioContextBehaviour {...props}
  renderComponent={RadioGroupContextSkeleton}  
  />
}

RadioGroupContext.propTypes = radioContextProps;
RadioGroupContext.defaultProps = radioContextDefaultProps;
RadioGroupContext.propsDescription = radioContextPropsDescription;
RadioGroupContext.constantProps = RadioGroupConstant;


export function Radio(props){
  return <RadioBehaviour {...props}
  renderComponent={RadioSkeleton}  
  />
}

Radio.propTypes = radioPropTypes;
Radio.defaultProps = radioDefaultProps;
Radio.propsDescription = radioPropsDescription;
Radio.constantProps = constantProps;

if(__DOCS__){
  RadioGroup.docs = {
    componentGroup: componentGroups.Atom,
    folderName : componentCategories.Form
  }
}