text: import _pt from "prop-types";
  
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
  
  import React from 'react';
  import { mutuallyExclusiveTrueProps, forbidExtraProps } from 'airbnb-prop-types';
  import useStyles from '../../hooks/useStyles';
  import Text from '../Text';
  import { STATUSES } from '../../constants';
  import { styleSheet } from './styles';
  
  /** Display a string of classified text with colorful statuses. */
  function StatusText(_ref) {
    let {
      children,
      danger,
      info,
      muted,
      notice,
      success,
      warning
    } = _ref,
        restProps = _objectWithoutPropertiesLoose(_ref, ["children", "danger", "info", "muted", "notice", "success", "warning"]);
  
    const [styles, cx] = useStyles(styleSheet);
    return React.createElement(Text, restProps, React.createElement("span", {
      className: cx(danger && styles.text_danger, info && styles.text_info, muted && styles.text_muted, notice && styles.text_notice, success && styles.text_success, warning && styles.text_warning)
    }, children));
  }
  
  const statusPropType = mutuallyExclusiveTrueProps(...STATUSES);
  StatusText.propTypes = {
    children: _pt.any.isRequired,
    danger: statusPropType,
    info: statusPropType,
    muted: statusPropType,
    notice: statusPropType,
    success: statusPropType,
    warning: statusPropType
  };
  export default StatusText;