import React from 'react';
import SwitchBehaviour from './Switch.Behaviour';
import SwitchControlledByParent, {SwitchWithLocalState} from "./Switch.skeleton";
import switchPropTypes, {defaultProps,propsDescription} from "./Switch.propTypes";
import componentGroups from "../../docs-utils/componentGroups";
import componentCategories from "../../docs-utils/componentCategories";
import constantProps from "./Switch.constantProps";

export default function Switch(props){
  
  return <SwitchBehaviour
    {...props}
    renderComponent={SwitchControlledByParent}
  />

}

Switch.defaultProps=defaultProps;
Switch.propTypes=switchPropTypes;
Switch.propsDescription=propsDescription;
Switch.constantProps=constantProps;


export  function SwitchControlled(props){

  return <SwitchBehaviour
    {...props}
    renderComponent={SwitchWithLocalState}
  />

}

SwitchControlled.defaultProps=defaultProps;
SwitchControlled.propTypes=switchPropTypes;
SwitchControlled.propsDescription=propsDescription;
SwitchControlled.constantProps=constantProps;


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


