"use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;exports.__esModule = true;exports.InputLayoutAsideText = void 0;var _react = _interopRequireDefault(require("react"));


var _Emotion = require("../../../lib/theming/Emotion");
var _ThemeContext = require("../../../lib/theming/ThemeContext");

var _InputLayoutContext = require("./InputLayoutContext");
var _InputLayout = require("./InputLayout.styles");





var InputLayoutAsideText = exports.InputLayoutAsideText = function InputLayoutAsideText(_ref) {var _ref$text = _ref.text,text = _ref$text === void 0 ? null : _ref$text;
  var theme = _react.default.useContext(_ThemeContext.ThemeContext);
  var _React$useContext = _react.default.useContext(_InputLayoutContext.InputLayoutContext),disabled = _React$useContext.disabled;

  var asideClassName = _InputLayout.stylesLayout.aside();

  return text ? /*#__PURE__*/
  _react.default.createElement("span", { className: (0, _Emotion.cx)(asideClassName, _InputLayout.stylesLayout.text(theme), disabled && _InputLayout.stylesLayout.textDisabled(theme)) },
  text
  ) :
  null;
};