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); }
import React from 'react';
import styled from 'styled-components';
import { Box, OldIcon } from '../../../../..';
import { Text } from '../../../Text';
import { visuallyHiddenCss } from '../../../../../Atoms/VisuallyHidden';
var StyledInputText = styled(Text).withConfig({
  displayName: "Search__StyledInputText",
  componentId: "sc-ym17w8-0"
})(["", " color:", ""], function (p) {
  return p.hidden ? "".concat(visuallyHiddenCss) : '';
}, function (p) {
  return p.theme.color.text;
});
export var Search = React.forwardRef(function (props, ref) {
  return React.createElement(Box, {
    px: props.fullscreenOnMobile ? 0 : 3,
    my: props.hidden ? 0 : 2,
    mb: props.hidden ? 0 : 1
  }, React.createElement(StyledInputText, _extends({
    leftAddon: React.createElement(OldIcon.Search, {
      size: 4
    }),
    label: "Search",
    ref: ref,
    size: !props.fullscreenOnMobile ? 's' : undefined,
    hideLabel: true,
    width: "100%"
  }, props)));
});