'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _styledComponents = require('styled-components');

var _styledComponents2 = _interopRequireDefault(_styledComponents);

var _themeGet = require('../../../extensions/themeGet');

var _themeGet2 = _interopRequireDefault(_themeGet);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var InputStyles = _styledComponents2.default.input.withConfig({
  displayName: 'InputStyles'
})(['letter-spacing:0.02em;line-height:1.5;font-size:14px;font-family:', ';transition:all 0.2s ease;padding:calc(', ' - 1px) ', ';border-width:', ';border-style:solid;color:', ';background:', ';opacity:1;border-color:', ';outline:none;width:100%;&:focus{box-shadow:inset 0 -5px 0 ', ';border-color:', ';}&:disabled{background:', ';border-color:', ';opacity:1;color:', ';}&::placeholder{opacity:0.5;}', ' ', ';'], (0, _themeGet2.default)('fonts.brand'), (0, _themeGet2.default)('spacing.medium'), (0, _themeGet2.default)('spacing.medium'), (0, _themeGet2.default)('thicknesses.wide'), (0, _themeGet2.default)('colors.text.default'), (0, _themeGet2.default)('colors.background.default'), (0, _themeGet2.default)('colors.border.light'), (0, _themeGet2.default)('colors.primary.light'), (0, _themeGet2.default)('colors.border.medium'), (0, _themeGet2.default)('colors.background.disabled'), (0, _themeGet2.default)('colors.border.disabled'), (0, _themeGet2.default)('colors.text.disabled'), function (props) {
  return props.visited ? (0, _styledComponents.css)(['&:invalid{box-shadow:inset 0 -5px 0 ', ';border-color:', ';}'], (0, _themeGet2.default)('colors.negative.light')(props), (0, _themeGet2.default)('colors.negative.border')(props)) : '';
}, function (props) {
  return props.invalid || props.error ? '\n    box-shadow: inset 0 -5px ' + (0, _themeGet2.default)('colors.negative.light')(props) + ';\n    border-color: ' + (0, _themeGet2.default)('colors.negative.border')(props) + ';\n    ' : '';
});

InputStyles.Small = (0, _styledComponents2.default)(InputStyles).withConfig({
  displayName: 'InputStyles__Small'
})(['font-size:12px;padding:calc(var(--spacing-extra-small) - 1px) var(--spacing-extra-small);']);

exports.default = InputStyles;