var _TEXT_INPUT_FONT_SIZE, _TEXT_INPUT_INPUT_HEI;
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
import styled, { css } from 'styled-components';
import { selectors } from '@defencedigital/design-tokens';
import { COMPONENT_SIZE } from '../../Forms';
var color = selectors.color,
  fontSize = selectors.fontSize;
var TEXT_INPUT_FONT_SIZE = (_TEXT_INPUT_FONT_SIZE = {}, _defineProperty(_TEXT_INPUT_FONT_SIZE, COMPONENT_SIZE.FORMS, fontSize('m')), _defineProperty(_TEXT_INPUT_FONT_SIZE, COMPONENT_SIZE.SMALL, fontSize('base')), _TEXT_INPUT_FONT_SIZE);
export var TEXT_INPUT_INPUT_HEIGHT = (_TEXT_INPUT_INPUT_HEI = {}, _defineProperty(_TEXT_INPUT_INPUT_HEI, COMPONENT_SIZE.FORMS, '44px'), _defineProperty(_TEXT_INPUT_INPUT_HEI, COMPONENT_SIZE.SMALL, '31px'), _TEXT_INPUT_INPUT_HEI);
function removeAutoFillBackground() {
  return css(["&:-webkit-autofill,&:-webkit-autofill:hover,&:-webkit-autofill:focus,&:-webkit-autofill:active{transition:background-color 9999s ease-out;}filter:none;"]);
}
export var StyledInput = styled.input.withConfig({
  displayName: "StyledInput",
  componentId: "sc-139avnz-0"
})(["display:block;box-sizing:border-box;width:100%;margin:0;border:0;background:none;padding:", ";-webkit-tap-highlight-color:transparent;", " color:", ";font-size:", ";height:", ";&:focus{outline:0;}"], function (_ref) {
  var $hasLabel = _ref.$hasLabel,
    $size = _ref.$size;
  if ($size === COMPONENT_SIZE.SMALL || !$hasLabel) {
    return '7px 12px 7px 11px';
  }
  return '20px 12px 6px 11px';
}, removeAutoFillBackground(), color('neutral', '600'), function (_ref2) {
  var _ref2$$size = _ref2.$size,
    $size = _ref2$$size === void 0 ? COMPONENT_SIZE.FORMS : _ref2$$size;
  return TEXT_INPUT_FONT_SIZE[$size];
}, function (_ref3) {
  var _ref3$$size = _ref3.$size,
    $size = _ref3$$size === void 0 ? COMPONENT_SIZE.FORMS : _ref3$$size;
  return TEXT_INPUT_INPUT_HEIGHT[$size];
});