"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.FormStatus = void 0;

var _react = _interopRequireDefault(require("react"));

var _ = require("../..");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var FormStatus = function FormStatus(_ref) {
  var message = _ref.message,
      type = _ref.type,
      id = _ref.id;
  return /*#__PURE__*/_react.default.createElement("span", {
    className: "usa-".concat(type, "-message"),
    id: id,
    role: type === 'error' ? 'alert' : 'status'
  }, type === 'warning' && message ? /*#__PURE__*/_react.default.createElement(_.InlineIcon, {
    icon: "incomplete"
  }) : '', ' ', message);
};

exports.FormStatus = FormStatus;