import PropTypes from 'prop-types';
import popupAriaProps from './Popup.ariaPropTypes';
import automationProps, { automationPropsName } from '../../propTypes/automation.propTypes';
import constantProps from './Popup.constantProps';
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'; // Popup

export default {
  isPopupOpen: PropTypes.bool,
  isParentBasedAutoPlacement: PropTypes.bool,
  ...automationProps,
  ...popupAriaProps,
  ...customStyleProps,
  ...tagAttributeProps,
  ...tagGeneralAttributeProps
};
export const defaultProps = {
  isParentBasedAutoPlacement: false,
  [customStyle]: {},
  [tagAttributes]: {},
  [tagGeneralAttributes]: {}
};
export const propsDescription = {
  isPopupOpen: ''
}; // Popcontent

export const popupContentProps = {
  children: PropTypes.node,
  togglePopup: PropTypes.func,
  isPopupOpen: PropTypes.bool,
  removeClose: PropTypes.func,
  position: PropTypes.object,
  arrowPosition: PropTypes.object,
  placement: PropTypes.oneOf(Object.keys(constantProps.placement)),
  color: PropTypes.oneOf(Object.keys(constantProps.color)),
  size: PropTypes.oneOf(Object.keys(constantProps.size)),
  getContainerRef: PropTypes.func,
  hasArrow: PropTypes.bool,
  ...customStyleProps,
  ...tagAttributeProps,
  ...tagGeneralAttributeProps
};
export const popupContentDefaultProps = {
  size: constantProps.size.default,
  color: constantProps.color.default,
  hasArrow: true,
  [customStyle]: {},
  [tagAttributes]: {},
  [tagGeneralAttributes]: {}
};
export const popupContentPropsDescription = {
  children: '',
  togglePopup: '',
  isPopupOpen: '',
  removeClose: '',
  position: '',
  arrowPosition: '',
  placement: '',
  color: '',
  size: '',
  getContainerRef: '',
  hasArrow: ''
}; // Poptarget

export const popupTargetProps = {
  isPopupOpen: PropTypes.bool,
  getTargetRef: PropTypes.func,
  handleToggle: PropTypes.func
};
export const popupTargetDefaultProps = {
  color: constantProps.color.primary
};
export const popupTargetPropsDescription = {
  isPopupOpen: '',
  getTargetRef: '',
  handleToggle: ''
};