"use strict";

exports.__esModule = true;
exports.default = exports.InputComponent = void 0;
var _react = _interopRequireWildcard(require("react"));
var _styledComponents = _interopRequireDefault(require("styled-components"));
var _reactIntl = require("react-intl");
var _utils = require("../utils");
var _excluded = ["placeholder"];
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
(function () {
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
  enterModule && enterModule(module);
})();
(function () {
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
  enterModule && enterModule(module);
})();
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
  return a;
};
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
  return a;
};
var defaultFormatMessage = function defaultFormatMessage(message) {
  throw new Error("Attempting to translate message " + message.id + " outside of Intl context");
};
var maybeTranslate = function maybeTranslate(formatMessage, message) {
  if (formatMessage === void 0) {
    formatMessage = defaultFormatMessage;
  }
  return message && message.id ? formatMessage(message) : message;
};
var useIntlSoft = function useIntlSoft() {
  return (0, _react.useContext)(_reactIntl.IntlContext) || {};
};
__signature__(useIntlSoft, "useContext{}");
__signature__(useIntlSoft, "useContext{}");
var InputComponent = exports.InputComponent = _styledComponents.default.input.withConfig({
  displayName: "Input__InputComponent",
  componentId: "sc-19q5ujg-0"
})(["font-family:", ";box-sizing:border-box;flex:0 0 auto;height:30px;padding:5px 10px;border:1px solid ", ";border-radius:5px;&:focus{border-color:#4fa1f0;box-shadow:0 0 4px #4fa1f0;outline:none;}"], (0, _utils.getThemeProp)(["fonts", "base"], "sans-serif"), (0, _utils.getThemeProp)(["colors", "borderLight"], "#cccccc"));
var Input = function Input(_ref) {
  var placeholder = _ref.placeholder,
    props = _objectWithoutProperties(_ref, _excluded);
  var _useIntlSoft = useIntlSoft(),
    formatMessage = _useIntlSoft.formatMessage;
  return /*#__PURE__*/_react.default.createElement(InputComponent, _extends({}, props, {
    placeholder: maybeTranslate(formatMessage, placeholder)
  }));
};
__signature__(Input, "useIntlSoft{{ formatMessage }}", function () {
  return [useIntlSoft];
});
__signature__(Input, "useIntlSoft{{ formatMessage }}", function () {
  return [useIntlSoft];
});
var _default = Input;
var _default2 = _default;
var _default3 = exports.default = _default2;
;
(function () {
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
  if (!reactHotLoader) {
    return;
  }
  reactHotLoader.register(defaultFormatMessage, "defaultFormatMessage", "/home/vsts/work/1/s/src/components/Input.js");
  reactHotLoader.register(maybeTranslate, "maybeTranslate", "/home/vsts/work/1/s/src/components/Input.js");
  reactHotLoader.register(useIntlSoft, "useIntlSoft", "/home/vsts/work/1/s/src/components/Input.js");
  reactHotLoader.register(InputComponent, "InputComponent", "/home/vsts/work/1/s/src/components/Input.js");
  reactHotLoader.register(Input, "Input", "/home/vsts/work/1/s/src/components/Input.js");
  reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/Input.js");
})();
;
(function () {
  var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
  leaveModule && leaveModule(module);
})();
;
(function () {
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
  if (!reactHotLoader) {
    return;
  }
  reactHotLoader.register(defaultFormatMessage, "defaultFormatMessage", "/home/vsts/work/1/s/src/components/Input.js");
  reactHotLoader.register(maybeTranslate, "maybeTranslate", "/home/vsts/work/1/s/src/components/Input.js");
  reactHotLoader.register(useIntlSoft, "useIntlSoft", "/home/vsts/work/1/s/src/components/Input.js");
  reactHotLoader.register(InputComponent, "InputComponent", "/home/vsts/work/1/s/src/components/Input.js");
  reactHotLoader.register(Input, "Input", "/home/vsts/work/1/s/src/components/Input.js");
  reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/Input.js");
})();
;
(function () {
  var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
  leaveModule && leaveModule(module);
})();