import PropTypes from 'prop-types';
import customStyleProps, { customStyle } from '@zohodesk/utils/es/props/customStyleProps';
import tagAttributeProps, { tagAttributes } from '@zohodesk/utils/es/props/tagAttributeProps';
import tagGeneralAttributeProps, { tagGeneralAttributes } from '@zohodesk/utils/es/props/tagGeneralAttributeProps';
import textBoxAriaProps from './TextBox.ariaPropTypes';
import automationProps, { automationPropsName } from '../../propTypes/automation.propTypes';
import defaultCustomIds from './TextBox.customIds';
import textBoxConstants from './TextBox.constantProps';
const textBoxPropTypes = {
  placeholder: PropTypes.string,
  name: PropTypes.string,
  value: PropTypes.string,
  id: PropTypes.string,
  maxlength: PropTypes.number,
  minlength: PropTypes.number,
  min: PropTypes.number,
  max: PropTypes.number,
  step: PropTypes.number,
  pattern: PropTypes.string,
  required: PropTypes.bool,
  autoFocus: PropTypes.bool,
  autocomplete: PropTypes.oneOf(['on', 'off']),
  variant: PropTypes.oneOf([textBoxConstants.variant.outlined, textBoxConstants.variant.flushed, textBoxConstants.variant.filled, textBoxConstants.variant.plain]),
  color: PropTypes.oneOf([textBoxConstants.color.primary, textBoxConstants.color.secondary, textBoxConstants.color.danger]),
  type: PropTypes.oneOf([textBoxConstants.type.text, textBoxConstants.type.number, textBoxConstants.type.email, textBoxConstants.type.password, textBoxConstants.type.url, textBoxConstants.type.search]),
  size: PropTypes.oneOf([textBoxConstants.size.small, textBoxConstants.size.medium, textBoxConstants.size.large, textBoxConstants.size.stretch]),
  shape: PropTypes.oneOf([textBoxConstants.shape.square, textBoxConstants.shape.oval, textBoxConstants.shape.roundedCorner]),
  active: PropTypes.bool,
  hovered: PropTypes.bool,
  disabled: PropTypes.bool,
  readonly: PropTypes.bool,
  startIcon: PropTypes.any,
  endIcon: PropTypes.any,
  onClick: PropTypes.func,
  onFocus: PropTypes.func,
  onBlur: PropTypes.func,
  onChange: PropTypes.func,
  onKeyPress: PropTypes.func,
  onKeyUp: PropTypes.func,
  onKeyDown: PropTypes.func,
  onMouseUp: PropTypes.func,
  onMouseDown: PropTypes.func,
  getRef: PropTypes.func,
  ...textBoxAriaProps,
  ...customStyleProps,
  ...automationProps,
  ...tagAttributeProps,
  ...tagGeneralAttributeProps
};
export default textBoxPropTypes;
export const defaultProps = {
  variant: textBoxConstants.variant.outlined,
  color: textBoxConstants.color.primary,
  size: textBoxConstants.size.medium,
  shape: textBoxConstants.shape.square,
  [automationPropsName]: defaultCustomIds,
  [customStyle]: {},
  [tagAttributes]: {},
  [tagGeneralAttributes]: {}
};
export const propsDescription = {};
export const textboxControlledPropTypes = {
  defaultValue: PropTypes.string,
  ...textBoxPropTypes
};
export const textboxControlledDescription = {
  defaultValue: 'The default value (uncontrolled).',
  ...propsDescription
};