import PropTypes from "prop-types";
import textAriaProps from "./Text.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 "./Text.customIds";
import textConstants from  "./Text.constantProps";

export default {

    textEllipsis: PropTypes.bool,
    wordWrap: PropTypes.bool,
    variant: PropTypes.oneOf([
        textConstants.variant.normal,
        textConstants.variant.primary,
        textConstants.variant.secondary
    ]),
    size : PropTypes.oneOf([
        textConstants.size.xSmall,
        textConstants.size.small,
        textConstants.size.medium,
        textConstants.size.large,
        textConstants.size.xLarge,
        textConstants.size.xxLarge
    ]),
    direction : PropTypes.oneOf([
         textConstants.direction.vertical,
         textConstants.direction.horizontal
    ]),
    auto : PropTypes.bool,
    stretch : PropTypes.bool,
    align : PropTypes.oneOf([
        textConstants.align.left,
        textConstants.align.center,
        textConstants.align.right
    ]),
    weight : PropTypes.oneOf([
        textConstants.weight.xSmall,
        textConstants.weight.small,
        textConstants.weight.medium,
        textConstants.weight.large,
        textConstants.weight.xLarge,
        textConstants.weight.bold ,
        textConstants.weight.bolder,
        textConstants.weight.lighter,
        textConstants.weight.normal,
    ]),
    transform : PropTypes.oneOf([
        textConstants.transform.upperCase,
        textConstants.transform.lowerCase,
        textConstants.transform.capitalize
    ]),
    colorPalette : PropTypes.oneOf([
        textConstants.colorPalette.darknight,
        textConstants.colorPalette.danger,
        textConstants.colorPalette.grayness,
        textConstants.colorPalette.whiteness,
        textConstants.colorPalette.success,
        textConstants.colorPalette.info,
        textConstants.colorPalette.highlight,
        textConstants.colorPalette.lighter
    ]),
    lineHeight :  PropTypes.oneOf([
        textConstants.lineHeight.xSmall,
        textConstants.lineHeight.small,
        textConstants.lineHeight.medium,
        textConstants.lineHeight.large,
        textConstants.lineHeight.xLarge,
        textConstants.lineHeight.xxLarge
    ]),
    letterSpacing : PropTypes.oneOf([
        textConstants.letterSpacing.xSmall,
        textConstants.letterSpacing.small,
        textConstants.letterSpacing.medium,
        textConstants.letterSpacing.large,
        textConstants.letterSpacing.xLarge,
        textConstants.letterSpacing.xxLarge
    ]),
    indent :PropTypes.oneOf([
        textConstants.indent.small,
        textConstants.indent.medium,
        textConstants.indent.large
    ]),
    decoration : PropTypes.oneOf([
        textConstants.decoration.lineThrough,
        textConstants.decoration.underLine,
        textConstants.decoration.overLine
    ]),
    decorationColor : PropTypes.oneOf([
        textConstants.decorationColor.darknight,
        textConstants.decorationColor.danger,
        textConstants.decorationColor.grayness,
        textConstants.decorationColor.whiteness,
        textConstants.decorationColor.success,
        textConstants.decorationColor.info,
        textConstants.decorationColor.highlight,
        textConstants.decorationColor.lighter
    ]),
    type : PropTypes.oneOf([
        textConstants.type.heading,
        textConstants.type.paragraph,
        textConstants.type.blockquote
    ]),
    level: PropTypes.oneOf([    
        textConstants.level.one,
        textConstants.level.two,
        textConstants.level.three,
        textConstants.level.four,
        textConstants.level.five,
        textConstants.level.six
    ]),

    children : PropTypes.any,
    content : PropTypes.string,
    tagName : PropTypes.string,

    onClick : PropTypes.func,


    startIcon : PropTypes.any,
    endIcon : PropTypes.any,

    ...textAriaProps,
    ...customClassProps,
    ...automationProps,
    ...tagAttributeProps
}

export const defaultProps={
    [automationPropsName] : defaultCustomIds,
    [customClassPropName] : {},
    [tagAttributePropsName] : {}
}

export const propsDescription={
    variant: "The Text can be any of the two available variants.",
    textEllipsis : "The Text ellipsis is a method to display the overflow property",
    wordWrap : "The Text Wrap is used for wrap the words in sentence",
    weight : "The Text weight is given based on  user centric values",
    align: "The Text is aligned based of the position",
    direction : "The Text and icons can be showing as direction defined",
    auto : "The Text component will take remaining with of parent area",
    stretch :"The Text componet will take 100 percenatge of parent area",
    tagName : "the TagName defines the text to be rendered in given tags",
    size: "The size defines the font size of the text",
    dimension : "The dimension defines the respective measurement of the text parent",
    transform: "The Transform property denotes the whethet the text is in case",
    type : "the Type defines the type of text of available",
    level : "the level used to show heading level like h1, h2, h3...",
    colorPalette: "The Text can be displayed in available colors",
    decoration : "the decoration can be any of three of available",
    decorationColor : "the decoration color can be any these of available",
    indent : "the indent can  be any of three of available",
    startIcon : "the icon component will be display in start of text",
    endIcon : "the icon component will be display in end of text",
    tagAttributeProps : "the tag Attribute props defines the attributes that can be directly given to the tag",
    children : "the children defines the child nodes that are directly given to the tag",
    customClassName : "the CustomClassName defines the classnames that can be directly given to the component",
}