"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.Search = void 0;
var _react = _interopRequireDefault(require("react"));
var _styledComponents = _interopRequireDefault(require("styled-components"));
var _ = require("../../../../..");
var _Text = require("../../../Text");
var _VisuallyHidden = require("../../../../../Atoms/VisuallyHidden");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var StyledInputText = (0, _styledComponents.default)(_Text.Text).withConfig({
  displayName: "Search__StyledInputText",
  componentId: "sc-ym17w8-0"
})(["", " color:", ""], function (p) {
  return p.hidden ? "".concat(_VisuallyHidden.visuallyHiddenCss) : '';
}, function (p) {
  return p.theme.color.text;
});
var Search = exports.Search = _react.default.forwardRef(function (props, ref) {
  return _react.default.createElement(_.Box, {
    px: props.fullscreenOnMobile ? 0 : 3,
    my: props.hidden ? 0 : 2,
    mb: props.hidden ? 0 : 1
  }, _react.default.createElement(StyledInputText, _extends({
    leftAddon: _react.default.createElement(_.OldIcon.Search, {
      size: 4
    }),
    label: "Search",
    ref: ref,
    size: !props.fullscreenOnMobile ? 's' : undefined,
    hideLabel: true,
    width: "100%"
  }, props)));
});