import PropTypes from 'prop-types';
//import radioGroupAriaProps from "./RadioGroup.ariaPropTypes";
import tagAttributeProps,{tagAttributePropsName} from "../../propTypes/htmlAttributes.propTypes"
import customClassProps,{customClassPropName} from "../../propTypes/customClassName.propTypes";
import automationProps,{automationPropsName} from "../../propTypes/automation.propTypes";
import defaultCustomIds from "./RadioGroup.customIds";
import RadioConstants,{RadioGroupConstant} from './RadioGroup.constantProps';
export default {
  text : PropTypes.string.isRequired,
  name : PropTypes.string,
  value : PropTypes.string,
  variant : PropTypes.oneOf([
      RadioConstants.variant.inner,
      RadioConstants.variant.outer]
  ),
  size : PropTypes.oneOf([  
      RadioConstants.size.small, 
      RadioConstants.size.medium, 
      RadioConstants.size.large]
  ),
  color : PropTypes.oneOf([
      RadioConstants.color.primary, 
      RadioConstants.color.danger
  ]),
  selectedValue : PropTypes.string,
  disabled : PropTypes.bool,
  onChange : PropTypes.func,
  radioCondition : PropTypes.func,
  ...customClassProps,
  ...automationProps,
  ...tagAttributeProps
  //...radioGroupAriaProps
}

export const radioDefaultProps = {
  variant : RadioConstants.variant.inner,
  size : RadioConstants.size.medium,
  color : RadioConstants.color.primary,
  disabled : false,
  [automationPropsName] : defaultCustomIds,
  [customClassPropName] : {},
  [tagAttributePropsName] : {}
}

export const radioPropsDescription = {
    text:"This defines the text that is show the name",
    size:"This defines the size of Radio",
    name:"it unique identification for radiogroup",
    variant:"This defines the structural view of Radio",
    color:"This defines the color of Radio",
    disabled:"This defines the disabled state",
    tagAttributeProps : "The tag Attribute props defines the attributes that can be directly given to the tag",
    customClassName : "The CustomClassName defines the classnames that can be directly given to the component",
    customId:"This defines the dataId that are used by automation purpose",
    customIdPrefix: "This defines the dataId that are used by automation purpose",
    customIdSuffix: "This defines the dataId that are used by automation purpose",
    onChange : "This define the function, on radio button current selected value"
};


export const radioGroupProps={
    children: PropTypes.node,
    name: PropTypes.string.isRequired,
    onChange: PropTypes.func,
    setSelectedValue : PropTypes.func,
    direction : PropTypes.oneOf([
        RadioGroupConstant.direction.horizontal,
        RadioGroupConstant.direction.vertical]
    ),
    defaultValue: PropTypes.string,
    selectedId : PropTypes.string,
    ...customClassProps,
    ...tagAttributeProps,
    ...automationProps
}

export const radioGroupDefaultProps = {
    direction : RadioGroupConstant.direction.horizontal,
    [customClassPropName] : {},
    [tagAttributePropsName] : {},
    [automationPropsName] : defaultCustomIds
}

export const radioGroupPropsDescription = {
    children:"This defines the children of the component",
    name:"it's defined for unique identification",
    direction : "This define the radio direction",
    defaultValue: "This define the default selected radio value",
    selectedId : "This define the state handling default selected radio value",
    customClassName : "The CustomClassName defines the classnames that can be directly given to the component",
    tagAttributeProps : "The tag Attribute props defines the attributes that can be directly given to the tag",
    customId:"This defines the dataId that are used by automation purpose",
    customIdPrefix: "This defines the dataId that are used by automation purpose",
    customIdSuffix: "This defines the dataId that are used by automation purpose",
    onChange: "This define the function, on radio button current selected value"
}

export const radioContextProps={
    children: PropTypes.node,
    name: PropTypes.string.isRequired,
    onChange: PropTypes.func,
    setSelectedValue : PropTypes.func,
    direction : PropTypes.oneOf([
        RadioGroupConstant.direction.horizontal,
        RadioGroupConstant.direction.vertical]
    ),
    defaultValue: PropTypes.string,
    selectedId : PropTypes.string,
    ...customClassProps,
    ...tagAttributeProps,
    ...automationProps
}

export const radioContextDefaultProps={
    direction : RadioGroupConstant.direction.horizontal,
    [customClassPropName] : {},
    [tagAttributePropsName] : {},
    [automationPropsName] : defaultCustomIds
}

export const radioContextPropsDescription={
    children:"This defines the children of the component",
    name:"it's defined for unique identification",
    direction : "This define the radio direction",
    defaultValue: "This define the default selected radio value",
    selectedId : "This define the state handling default selected radio value",
    customClassName : "The CustomClassName defines the classnames that can be directly given to the component",
    tagAttributeProps : "The tag Attribute props defines the attributes that can be directly given to the tag",
    customId:"This defines the dataId that are used by automation purpose",
    customIdPrefix: "This defines the dataId that are used by automation purpose",
    customIdSuffix: "This defines the dataId that are used by automation purpose",
    onChange: "This define the function, on radio button current selected value"
}


