import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["value", "secondaryValue", "className", "href", "title"];

/**
 * Modified from https://github.com/IBM/carbon-components-react/
 *
 * This source code is licensed under the Apache-2.0 license found in the
 * LICENSE file in the root directory of this source tree.
 */
import PropTypes from 'prop-types';
import React from 'react';
import classnames from 'classnames';
import { settings } from '../../globals/js';
var prefix = settings.prefix;
/** Value are typically used to show KPI values and additional information. */

var Value = function Value(_ref) {
  var value = _ref.value,
      secondaryValue = _ref.secondaryValue,
      className = _ref.className,
      href = _ref.href,
      title = _ref.title,
      other = _objectWithoutProperties(_ref, _excluded);

  var classNames = classnames("".concat(prefix, "--value"), className);
  return /*#__PURE__*/React.createElement("div", _extends({
    className: classNames
  }, other), /*#__PURE__*/React.createElement("h4", {
    className: "".concat(prefix, "--value__title")
  }, title), /*#__PURE__*/React.createElement("div", {
    className: "".concat(prefix, "--value__primary-value")
  }, value), /*#__PURE__*/React.createElement("div", {
    className: "".concat(prefix, "--value__secondary-value")
  }, secondaryValue));
};

Value.propTypes = {
  /**
   * Provide the content for the primary Value
   */
  value: PropTypes.node,

  /**
   * Provide the content for the secondary Value
   */
  secondaryValue: PropTypes.node,

  /**
   * Provide the content for the title
   */
  title: PropTypes.node,

  /**
   * Provide a custom className to be applied to the containing <a> node
   */
  className: PropTypes.string
};
export default Value;