'use strict';

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

var styled = require('styled-components');
var index = require('../../../utils/index.js');
var utils = require('../utils.js');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);

const TextFieldInput = styled__default['default'].input.withConfig({
    shouldForwardProp: index.convertToTransientProps(['hasError']),
}) `
  color: ${index.getColorAlias('contentDefault')};
  font-family: ${(props) => props.theme.font.familyPrimary};
  background: ${(props) => props.disabled ? index.getColorAlias('disabled01') : 'transparent'};
  ${index.getFontSize('size16')};
  ${(props) => utils.getFieldPadding(props.variant)};
  border-radius: ${(props) => props.theme.radius.roundedC};
  border: unset;
  width: 100%;
  ${index.getDefaultTransition('background')};

  &::placeholder {
    color: ${(props) => props.disabled
    ? index.getColorAlias('contentDisabled')
    : index.getColorAlias('contentSubdued')};
    font-weight: ${(props) => props.theme.font.weightRegular};
  }

  &:hover {
    cursor: ${(props) => (props.disabled ? 'not-allowed' : 'auto')};
  }

  &:focus:hover {
    background: ${(props) => props.disabled
    ? index.getColorAlias('disabled01')
    : index.getColorAlias('containerDefault')};
  }

  &:focus {
    outline: none;
    ${(props) => !props.hasError &&
    styled.css `
        border: none;
      `};
  }
`;
const PrefixSufix = styled__default['default'].div `
  display: flex;
  color: ${index.getColorAlias('contentDefault')};
  ${index.getFontSize('size16')};
  svg {
    color: ${index.getColorAlias('contentDefault')};
    height: 24px;
    width: 24px;
  }
`;
const Prefix = styled__default['default'](PrefixSufix) ``;
const Sufix = styled__default['default'](PrefixSufix) `
  cursor: ${(props) => (props.hasHandler ? 'pointer' : 'auto')};
`;

exports.Prefix = Prefix;
exports.PrefixSufix = PrefixSufix;
exports.Sufix = Sufix;
exports.TextFieldInput = TextFieldInput;
